Configuring org.clazzes.login.sql 1.2+
Configuration of sql-login-service 1.2 and higher
The SQL login service may be configured using the OSGi configuration PIDÂ org.clazzes.login.sql
 using the configuration values shown in the table below.
Beginning with the version 1.1.0 (released 2013-02-13), all query strings default to the database structure used by the upcoming SDS (SQL Directory Service) bundle. When using another database structure that does not allow some of the queries, it is important set those configuration values to empty strings; deleting them will not help because default values would kick in right away.
Results of list queries (group memberships, group members) are sorted naturally in the Java layer, so there is no need to use ORDER BY clauses. ORDER BY clauses often provoke temporary tables and filesort, which is quite expensive for queries used quite often.
Global configuration directives
Key | Description |
---|---|
defaultDomain | Optional. Defaults to an empty string. |
Per-Domain configuration directives
Starting with version 1.2.0 sql-login-service supports multiple authentication domains, and therefore began to introduce authentication domain in the names of configuration keys.
The current approach presumes that one database usually provides authentication data for one authentication domain. Support for databases maintaining multiple authentication domains (in one database) might be added in the future (see LOGIN-11), but I do not believe multi-domain-databases even exist outside the LDAP/ADS world.
Version 1.3.2 reflects the changed table names of SDS' first release version 1.0.0, which started to use SDS_
prefixes for all table names, to make it easier to live in App's databases.
Â
Key | Description |
---|---|
domain.<domain>.dataSourceName | Required. Introduced with 1.2.0. Name of the JDBC-Provider's DataSource that provides access to the database containing the authentication data for this authentication domain. Example: |
domain.<domain>.deactivateUserStatement | Required non-empty for deactivateUser feature. SQL template for a prepared statement to deactivate a user. Default, appropriate for SDS' tables: |
domain.<domain>.groupsByUserIdQuery | Required non-empty for getGroups feature. SQL template for a prepared statement to query the group IDs and group names of the groups of which the user specified by a userId is a member. Default, appropriate for SDS' tables: |
domain.<domain>.defaultPasswordAlgorithm | Optional. Defaults to Values supported so far: Password fields may contain:
|
domain.<domain>.setUserPasswordStatement | Required non-empty for changePassword feature. SQL template for a prepared statement to set a new password for the user. Default, appropriate for SDS' tables: |
domain.<domain>.userByUserIdQuery | SQL template for a prepared statement to query userId, encrypted password, pretty name and e-mail address of a user specified by a userId. Example: |
domain.<domain>.usersByGroupIdQuery | Required non-empty for getGroupMembers feature. SQL template for a prepared statement to query the user IDs, user names and e-mail-addresses of the members of the group specified by a groupId. Example: |