Changeset 4257
- Timestamp:
- 01/13/14 15:32:38 (10 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/CHANGES.txt
r4217 r4257 4 4 deployment tar-ball which is from now on is generated using maven assembly 5 5 plug-in. 6 7 January 9-10, 2014. The spring-security settings (authentication and authorisation) 8 are removed. Shibboleth sshaa.xml is added, and web.xml is adapted. The boolean column admin_rights 9 is added to the table "principal" in the DB. Adding, updating and deleting a user 10 in the DB (only by admin) is debugged and tested. -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/INSTALL.txt
r4217 r4257 68 68 <server uri>/ds/webannotator 69 69 70 Note that the path "ds/webannotator" is the same as mentioned in ds#webannotator.xml above. 70 Note that the path "ds/webannotator" is the same as mentioned in ds#webannotator.xml 71 above. 71 72 72 73 On this web-page there is a number of test GET requests there which you can send if you want 73 to check if it works. For this you will need a login and a password. Ask the dasish backend's 74 responsible developer (Olha). 74 to check if it works. If you are not in the DB yet, any request will end up with the Server 75 error message "the logged-in-user". Ask Olha to add you providing with your shibboleth 76 remote ID. If you are in the DB you should be able to perform any request, except may be 77 getting annotation. If you have read access to the test annotation, you will get it. 78 79 75 80 76 81 If you want to test POST, PUT and DELETE requests use e.g. -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/UPDATE.txt
r4211 r4257 1 Take the tar-ball of the new version XXX, and follow the standard MPI deployment procedure 2 Consult the instructions from INSTALL.txt about placing war file. 1 1. Placing tarball: as always, take the tar-ball of the new version 1.1, and follow the 2 standard MPI deployment procedure. Consult the instructions from INSTALL.txt 3 about placing war file if you haveforgotte. 3 4 4 For testing consult "Testing" section of INSTALL.txt. 5 2. Adjusting shhaa.xml: you need to set "sso action" and "slo action". E.g. 6 for lux16 they look as follows: 7 <sso action="lI">https://lux16.mpi.nl/Shibboleth.sso/Login</sso> 8 <slo action="lO">https://lux16.mpi.nl/Shibboleth.sso/Logout</slo> 9 For the other servers the sysadmins should know. 10 11 3. This time the dasish database on lux17 is changed because we removed spring-security 12 related tables. You have 2 options. Option A: remove the databse and copy the database from lux16 13 to lux17. Option B: remove the tables "users" and "authorities" from the databse, and add 14 a boolean column "admin_rights" to the table "principal", with the default values "false"; 15 and set Olha's admin_rights to "true". 16 17 4. If the application is succesfully deployed, you will get the jsp page after requesting 18 19 <server uri>/ds/webannotator 20 21 On this web-page there is a number of test GET requests there which you can send if you want 22 to check if it works. If you are not in the DB yet, any request 23 will end up with the Server error message "the logged-in-user". Ask Olha to add you 24 providing with your shibboleth remote ID. If you are in the DB you should be able to perform any request, except may be 25 getting annotation. If you have read access to the test annotation, 26 you will get it. Ask Olha to test POST, PUT, DELETE or do it youself consulting "Testing" 27 section in INSTAL.txt. 5 28 6 29 30 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/nb-configuration.xml
r4209 r4257 19 19 <spring-data xmlns="http://www.netbeans.org/ns/spring-data/1"> 20 20 <config-files> 21 <config-file>src/main/resources/spring-config/applicationContext-security.xml</config-file> 22 <config-file>src/main/resources/spring-config/bCryptPasswordEncoder.xml</config-file> 21 <config-file>src/main/webapp/WEB-INF/web-shaa.xml</config-file> 23 22 </config-files> 24 23 <config-file-groups/> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/pom.xml
r4245 r4257 247 247 <version>8.4-702.jdbc4</version> 248 248 </dependency> 249 <!-- <dependency>249 <!-- <dependency> 250 250 <groupId>org.springframework.security</groupId> 251 251 <artifactId>spring-security-core</artifactId> … … 284 284 </dependency> 285 285 </dependencies> 286 287 <profiles> 288 <profile> 289 <id>lux16</id> 290 <properties> 291 <serviceRootUrl>http://lux16.mpi.nl/ds/webannotator/</serviceRootUrl> 292 <!-- Will be inserted in context.xml --> 293 <shibLI>http://lux16.mpi.nl/Shibboleth.sso/Login</shibLI> 294 <!-- Shibboleth login URI for SHHAA --> 295 <shibLO>http://lux16.mpi.nl/Shibboleth.sso/Logout</shibLO> 296 <!-- Shibboleth logout URI for SHHAA --> 297 <webXmlPath>src/main/webapp/WEB-INF/web-shib.xml</webXmlPath> 298 <!-- web.xml for shibboleth authentication --> 299 </properties> 300 </profile> 301 302 <profile> 303 <id>lux17</id> 304 <properties> 305 <serviceRootUrl>http://lux17.mpi.nl/ds/webannotator/</serviceRootUrl> 306 <!-- Will be inserted in context.xml --> 307 <shibLI>http://lux17.mpi.nl/Shibboleth.sso/Login</shibLI> 308 <!-- Shibboleth login URI for SHHAA --> 309 <shibLO>http://lux17.mpi.nl/Shibboleth.sso/Logout</shibLO> 310 <!-- Shibboleth logout URI for SHHAA --> 311 <webXmlPath>src/main/webapp/WEB-INF/web-shib.xml</webXmlPath> 312 <!-- web.xml for shibboleth authentication --> 313 </properties> 314 </profile> 315 316 <profile> 317 <id>localhost</id> 318 <activation> 319 <activeByDefault>true</activeByDefault> 320 </activation> 321 <properties> 322 <serviceRootUrl>localhost:8080/annotator-backend/api/</serviceRootUrl> 323 <webXmlPath>src/main/webapp/WEB-INF/web.xml</webXmlPath> 324 </properties> 325 </profile> 326 </profiles> 327 286 328 <properties> 287 329 <jersey.version>1.17.1</jersey.version> … … 294 336 <project.version>1.1</project.version> 295 337 </properties> 338 339 296 340 </project> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcUserDao.java
r4252 r4257 97 97 @Override 98 98 public boolean userExists(User user){ 99 String emailCriterion = user.getEMail() ;99 String emailCriterion = user.getEMail().toLowerCase(); 100 100 StringBuilder sqlTargets = new StringBuilder("SELECT "); 101 101 sqlTargets.append(principal_id).append(" FROM ").append(principalTableName).append(" WHERE ").append(e_mail).append("= ? LIMIT 1"); … … 152 152 params.put("externalId", newExternalIdentifier); 153 153 params.put("principalName", user.getDisplayName()); 154 params.put("email", user.getEMail() );154 params.put("email", user.getEMail().toLowerCase()); 155 155 params.put("remoteID", remoteID); 156 156 StringBuilder sql = new StringBuilder("INSERT INTO "); … … 166 166 StringBuilder sql = new StringBuilder("UPDATE "); 167 167 sql.append(principalTableName).append(" SET "). 168 append(e_mail).append("= '").append(user.getEMail() ).append("',").168 append(e_mail).append("= '").append(user.getEMail().toLowerCase()).append("',"). 169 169 append(principal_name).append("= '").append(user.getDisplayName()).append("' "). 170 170 append(" WHERE ").append(principal_id).append("= ?"); -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/shhaa.xml
r4252 r4257 22 22 <shhaa> 23 23 24 25 26 27 28 24 <authentication> 25 <shibheader> 26 <username>oid:eduPersonPrincipalName</username> 27 <username>mace:eduPersonPrincipalName</username> 28 <username>eduPersonPrincipalName</username> 29 29 30 31 32 30 <username>oid:eduPersonTargetedID</username> 31 <username>mace:eduPersonTargetedID</username> 32 <username>eduPersonTargetedID</username> 33 33 34 35 36 37 38 39 40 41 <sso action="lI">https://lux16.mpi.nl/Shibboleth.sso/Login</sso>42 <slo action="lO">https://lux16.mpi.nl/Shibboleth.sso/Logout</slo>43 34 <session>Shib-Session-ID</session> 35 <idp>Shib-Identity-Provider</idp> 36 <timestamp>Shib-Authentication-Instant</timestamp> 37 </shibheader> 38 <fallback> 39 <username>anonymous</username> 40 </fallback> 41 <sso action="lI">${shibLI}</sso> 42 <slo action="lO">${shibLO}</slo> 43 </authentication> 44 44 45 45 46 47 <shibheader>48 <attribute>displayName</attribute>49 <attribute>commonName</attribute>50 </shibheader>51 </composition> -->46 <!-- <composition action="rF"> 47 <shibheader> 48 <attribute>displayName</attribute> 49 <attribute>commonName</attribute> 50 </shibheader> 51 </composition> --> 52 52 53 53 54 <authorization> 55 <!-- lux16, 17, corpus1 --> 54 <authorization> 56 55 <location target="/*" /> 57 <!-- localhost --> 58 <location target="/dummy/*" /> 59 </authorization> 56 </authorization> 60 57 61 58 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/web.xml
r4254 r4257 65 65 </servlet-mapping> 66 66 67 <!-- lux16, 17, corpus 1 (shibbolized) -->68 <!-- <filter>69 <filter-name>AAIFilter</filter-name>70 <filter-class>de.mpg.aai.shhaa.AuthFilter</filter-class>71 </filter>72 <filter-mapping>73 <filter-name>AAIFilter</filter-name>74 <url-pattern>/*</url-pattern>75 </filter-mapping> -->76 77 78 <!-- localhost auth -->79 80 67 <security-constraint> 81 68 <display-name>Backend localhost</display-name> … … 101 88 <role-name>tomcat</role-name> 102 89 </security-role> 103 104 90 </web-app>
Note: See TracChangeset
for help on using the changeset viewer.