Changes for page org.clazzes.login.sql

Last modified by christoph_lechleitner@iteg_at on 2013-07-15 01.30:42

From version 9.1
edited by christoph_lechleitner@iteg_at
on 2013-02-13 11.31:05
Change comment: 1.1.0 released
To version 4.1
edited by christoph_lechleitner@iteg_at
on 2013-01-22 12.10:58
Change comment: Clarifying semantics of defaultDomain config property and domain parameter

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -org.clazzes.login.sql
1 +org.clazzes.login.sql (work in progress)
Content
... ... @@ -22,14 +22,12 @@
22 22  
23 23  === {{id name="org.clazzes.login.sql-Configuration"/}}Configuration ===
24 24  
25 -The SQL login service may be configured using the OSGi configuration PID {{code language="none"}}org.clazzes.login.sql{{/code}} using the configuration values shown in the table below.
25 +The SQL login service may be configured using the OSGi configuration PID {{code language="none"}}org.clazzes.login.sql{{/code}} using these configuration values:
26 26  
27 -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)>>confluencePage:page:LOGIN.SDS (SQL Directory Service) (work in progress)]] 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.
28 -
29 -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.
30 -
31 31  (% class="wiki-content" %)
32 32  (((
29 +
30 +
33 33  |=(((
34 34  (% class="tablesorter-header-inner" %)
35 35  (((
... ... @@ -46,12 +46,12 @@
46 46  deactivateUserStatement
47 47  {{/code}}
48 48  )))|(((
49 -Required non-empty for //deactivateUser// feature.
47 +Not implemented yet. Optional. Required for //deactivateUser// feature.
50 50  
51 51  SQL template for a prepared statement to deactivate a user.
52 52  
53 -Default, appropriate for SDS' tables:
54 -{{code language="none"}}UPDATE USERS SET PASSWORD='{disabled}' WHERE USERID=?{{/code}}
51 +Example:
52 +{{code language="none"}}UPDATE users SET encryptedPassword='{disabled}' WHERE userId=?{{/code}}
55 55  )))
56 56  |(((
57 57  {{code language="none"}}
... ... @@ -71,12 +71,16 @@
71 71  groupsByUserIdQuery
72 72  {{/code}}
73 73  )))|(((
74 -Required non-empty for //getGroups// feature.
72 +Optional. Required for //getGroups// feature.
75 75  
76 76  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.
77 77  
78 -Default, appropriate for SDS' tables:
79 -{{code language="none"}}SELECT g.GROUPID, g.GROUPNAME FROM GROUPS AS g, USERS AS u, GROUPMEMBERSHIPS AS m WHERE u.USERID='?' AND m.USER_ID = u.ID AND g.ID = m.GROUP_ID{{/code}}
76 +Example:
77 +{{code language="none"}}SELECT g.groupId, g.groupName FROM groups AS g, users AS u, memberships AS mgroupName
78 + WHERE u.userId=?
79 +AND m.userId = u.id
80 + AND g.id = m.groupId
81 + ORDER BY g.groupId {{/code}}
80 80  )))
81 81  |(((
82 82  {{code language="none"}}
... ... @@ -97,12 +97,12 @@
97 97  setUserPasswordStatement
98 98  {{/code}}
99 99  )))|(((
100 -Required non-empty for //changePassword// feature.
102 +Optional. Required for //changePassword// feature.
101 101  
102 102  SQL template for a prepared statement to set a new password for the user.
103 103  
104 -Default, appropriate for SDS' tables:
105 -{{code language="none"}}UPDATE USERS SET PASSWORD=? WHERE USERID=?{{/code}}
106 +Example:
107 +{{code language="none"}}UPDATE users SET encryptedPassword=? WHERE userId=?{{/code}}
106 106  )))
107 107  |(((
108 108  {{code language="none"}}
... ... @@ -114,7 +114,7 @@
114 114  If the e-mail address is not part of the database, use a constant like '' or null.
115 115  
116 116  Example:
117 -{{code language="none"}}SELECT USERID, PASSWORD, USERNAME, EMAIL FROM USERS WHERE USERID=?{{/code}}
119 +{{code language="none"}}SELECT userId, encryptedPassword, userName, mailAdr FROM users WHERE userId=?{{/code}}
118 118  )))
119 119  |(((
120 120  {{code language="none"}}
... ... @@ -121,11 +121,16 @@
121 121  usersByGroupIdQuery
122 122  {{/code}}
123 123  )))|(((
124 -Required non-empty for //getGroupMembers// feature.
126 +Optional. Required for //getGroupMembers// feature.
125 125  
126 126  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.
127 127  
128 128  Example:
129 -{{code language="none"}}SELECT u.USERID, u.USERNAME, u.EMAIL FROM GROUPS AS g, USERS AS u, GROUPMEMBERSHIPS AS m WHERE g.GROUPID=? AND m.GROUP_ID = g.ID AND u.ID = m.USER_ID{{/code}}
131 +{{code language="none"}}SELECT u.userId, u.userName, u.mailAdr
132 + FROM groups AS g, users AS u, memberships AS mgroupName
133 + WHERE g.groupId=?
134 +AND m.groupId = g.id
135 + AND u.id = m.userId
136 + ORDER BY g.userId {{/code}}
130 130  )))
131 131  )))
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -688781
1 +688979
Title
... ... @@ -1,1 +1,1 @@
1 -org.clazzes.login.sql
1 +org.clazzes.login.sql (work in progress)
URL
... ... @@ -1,1 +1,1 @@
1 -https://clazzes.atlassian.net/wiki/spaces/LOGIN/pages/688781/org.clazzes.login.sql
1 +https://clazzes.atlassian.net/wiki/spaces/LOGIN/pages/688979/org.clazzes.login.sql (work in progress)