- Timestamp:
- 12/05/14 13:53:55 (9 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/CHANGES.txt
r5840 r5892 74 74 November 20, 2014. A new feature: an "all" access mode is added. The user with this permission have 75 75 the same rights as the owner, that it he can update permissions on the annotation 76 and delete it at all. Also, the pieces of code handling permissions, have been refactored. 76 and delete it at all. Also, the pieces of code handling permissions, have been refactored. 77 78 November 24, 2014. The inconvenience is fixed. In the previous version when the user with "write" 79 access tried to update the whole annotation (including persmissions) the server ignored permission 80 update part but the user was not notified. Now it is fixed: 403 is thrown is the permissions differ 81 from the given ones. 82 83 December 5, 2014. The insecure API that allows to download pictures from the internet to the 84 database, as a cahced representation, has been removed (commented in the code). This API was used 85 for convenience to created demo data, and was not a part of the specification. -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/UPDATE.txt
r5850 r5892 1 Placing tarball: take the tar-ball of the new version 1.6.1-basic-authentication, and follow the 2 standard MPI deployment procedure. The "current-nonshib" should link to this package.1 This is the a simple deployemnt that does not demand changings in the context.xml, web.xml-s 2 and in the database. 3 3 4 No changings are to be done in context.xml and in the data-base because they are the same as 5 for the sibboleth version, abd it works. 4 Placing tarball: take the tar-ball of the version 1.6.3-basic-authentication, and follow the 5 standard first MPI deployment procedure. The "current" for lux17:mpi.nl/ds/webannotator-basic 6 (respectively corpus1:mpi.nl/ds/webannotator-basic) should link to this package. 6 7 7 The splitting between logging of shibboleth and basic versions will be implemented in8 next deployments9 8 10 9 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/pom.xml
r5850 r5892 5 5 <groupId>eu.dasish.annotation</groupId> 6 6 <artifactId>annotator-backend</artifactId> 7 <version>1.6. 1-basic-authentication</version>7 <version>1.6.3-shibboleth</version> 8 8 <packaging>war</packaging> 9 9 <name>annotator-backend Jersey Webapp</name> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.java
r5836 r5892 181 181 } 182 182 183 @PUT184 @Consumes("text/plain")185 @Produces(MediaType.APPLICATION_XML)186 @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/path/{isurl}")187 public String updateCachedBlobFromFile(@PathParam("cachedid") String cachedIdentifier,188 @PathParam("isurl") String isURL, String blobPath) throws IOException {189 Map params = new HashMap();190 InputStream input;191 192 if (isURL.equals("URL")) {193 URL blob = new URL(blobPath);194 input = blob.openStream();195 } else {196 input = new FileInputStream(blobPath);197 }198 199 params.put("stream", input);200 try {201 Integer result = (Integer) (new RequestWrappers(this)).wrapRequestResource(params, new UpdateCachedBlob(), Resource.CACHED_REPRESENTATION, Access.WRITE, cachedIdentifier);202 input.close();203 if (result != null) {204 return result + "rows are updated";205 } else {206 return "Nothing is updated. ";207 }208 } catch (NotInDataBaseException e1) {209 httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, e1.getMessage());210 return e1.getMessage();211 } catch (ForbiddenException e2) {212 httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, e2.getMessage());213 return e2.getMessage();214 }215 216 }217 183 // @PUT 184 // @Consumes("text/plain") 185 // @Produces(MediaType.APPLICATION_XML) 186 // @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/path/{isurl}") 187 // public String updateCachedBlobFromFile(@PathParam("cachedid") String cachedIdentifier, 188 // @PathParam("isurl") String isURL, String blobPath) throws IOException { 189 // Map params = new HashMap(); 190 // InputStream input; 191 // 192 // if (isURL.equals("URL")) { 193 // URL blob = new URL(blobPath); 194 // input = blob.openStream(); 195 // } else { 196 // input = new FileInputStream(blobPath); 197 // } 198 // 199 // params.put("stream", input); 200 // try { 201 // Integer result = (Integer) (new RequestWrappers(this)).wrapRequestResource(params, new UpdateCachedBlob(), Resource.CACHED_REPRESENTATION, Access.WRITE, cachedIdentifier); 202 // input.close(); 203 // if (result != null) { 204 // return result + "rows are updated"; 205 // } else { 206 // return "Nothing is updated. "; 207 // } 208 // } catch (NotInDataBaseException e1) { 209 // httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, e1.getMessage()); 210 // return e1.getMessage(); 211 // } catch (ForbiddenException e2) { 212 // httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN, e2.getMessage()); 213 // return e2.getMessage(); 214 // } 215 // 216 // } 217 // 218 218 private class UpdateCachedBlob implements ILambda<Map, Integer> { 219 219 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/DebugResource.java
r5685 r5892 164 164 Number remotePrincipalID = this.getPrincipalID(); 165 165 if (remotePrincipalID == null) { 166 return "null in ;ogged principal";166 return "null inlogged principal"; 167 167 } 168 168 String typeOfAccount = dbDispatcher.getTypeOfPrincipalAccount(remotePrincipalID); -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/shhaa.xml
r5850 r5892 38 38 <username>anonymous</username> 39 39 </fallback> 40 <sso action="lI">https:// lux17.mpi.nl/Shibboleth.sso/Login</sso>41 <slo action="lO">https:// lux17.mpi.nl/Shibboleth.sso/Logout</slo>40 <sso action="lI">https://corpus1.mpi.nl/Shibboleth.sso/Login</sso> 41 <slo action="lO">https://corpus1.mpi.nl/Shibboleth.sso/Logout</slo> 42 42 </authentication> 43 43 -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/web.xml
r5850 r5892 40 40 <context-param> 41 41 <param-name>eu.dasish.annotation.backend.isShibbolethSession</param-name> 42 <param-value> false</param-value>42 <param-value>true</param-value> 43 43 </context-param> 44 44 <context-param> … … 48 48 <context-param> 49 49 <param-name>eu.dasish.annotation.backend.logout.shibboleth</param-name> 50 <param-value>https:// lux17.mpi.nl/Shibboleth.sso/Logout</param-value>50 <param-value>https://corpus1.mpi.nl/Shibboleth.sso/Logout</param-value> 51 51 </context-param> 52 52 … … 111 111 112 112 <!-- Spring security --> 113 <filter>113 <!-- <filter> 114 114 <filter-name>springSecurityFilterChain</filter-name> 115 115 <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> … … 118 118 <filter-name>springSecurityFilterChain</filter-name> 119 119 <url-pattern>/*</url-pattern> 120 </filter-mapping> 120 </filter-mapping> --> 121 121 122 <!-- 123 <!--<filter>122 <!-- Shibboleth filter --> 123 <filter> 124 124 <filter-name>AAIFilter</filter-name> 125 125 <filter-class>de.mpg.aai.shhaa.AuthFilter</filter-class> … … 128 128 <filter-name>AAIFilter</filter-name> 129 129 <url-pattern>/*</url-pattern> 130 </filter-mapping> -->130 </filter-mapping> 131 131 132 132 </web-app> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/index.jsp
r5690 r5892 55 55 GET <a href="api/authentication/principal">api/authentication/principal</a> <br> 56 56 GET <a href="api/principals/admin">api/principals/admin</a><br> 57 GET <a href="api/principals/ 00000000-0000-0000-0000-0000000000112">api/principals/00000000-0000-0000-0000-0000000000112</a> <br>58 GET <a href="api/principals/ 00000000-0000-0000-0000-0000000000112/current">api/principals/00000000-0000-0000-0000-0000000000112/current</a><br>57 GET <a href="api/principals/a0000000-0000-0000-0000-0000000000114">api/principals/a0000000-0000-0000-0000-0000000000114</a> <br> 58 GET <a href="api/principals/a0000000-0000-0000-0000-0000000000114/current">api/principals/a0000000-0000-0000-0000-0000000000114/current</a><br> 59 59 <!-- !Problem: how to ask the servlet if the given user is logged in, may be by some other running somewhere client<br> --> 60 GET <a href="api/principals/info?email=Twan.Goosen@mpi.nl">api/principals/info?email= Twan.Goosen@mpi.nl</a> <br>60 GET <a href="api/principals/info?email=Twan.Goosen@mpi.nl">api/principals/info?email=twan.Goosen@mpi.nl</a> <br> 61 61 GET <a href="api/annotations?link=Sagrada&matchMode=contains">api/annotations?link=Sagrada&matchMode=contains</a> <br> 62 62 GET <a href="api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia&matchMode=exact">api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia&matchMode=exact</a> <br> … … 65 65 GET <a href="api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia">api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia</a> <br> 66 66 GET <a href="api/annotations?link=http://nl.wikipedia.org/wiki/Antoni_Gaud%C3%AD">api/annotations?link=http://nl.wikipedia.org/wiki/Antoni_Gaud%C3%AD</a> <br> 67 GET <a href="api/annotations?after=2013-02-04 15:57:58.046908&before=2014- 06-25 10:08:16.213186">api/annotations?after=2014-02-04 15:57:58.046908&before=2014-04-0610:08:16.213186</a><br>67 GET <a href="api/annotations?after=2013-02-04 15:57:58.046908&before=2014-12-31 10:08:16.213186">api/annotations?after=2014-02-04 15:57:58.046908&before=2014-12-31 10:08:16.213186</a><br> 68 68 <!-- !Comment: What is "namespace" query parameter? Must be implemented and tested <br>--> 69 GET <a href="api/annotations/00000000-0000-0000-0000-000000000022">api/annotations/00000000-0000-0000-0000-000000000022</a> </br> 70 GET <a href="api/annotations/00000000-0000-0000-0000-000000000022/targets">api/annotations/00000000-0000-0000-0000-000000000022/targets</a> </br> 71 GET <a href="api/annotations/00000000-0000-0000-0000-000000000022/permissions">api/annotations/00000000-0000-0000-0000-000000000022/permissions</a><br> 72 GET <a href="api/targets/00000000-0000-0000-0000-000000000032">api/targets/00000000-0000-0000-0000-000000000032</a> <br> 73 GET <a href="api/targets/00000000-0000-0000-0000-000000000032/versions">api/targets/00000000-0000-0000-0000-000000000032/versions</a> <br> 74 GET <a href="api/cached/b0d3f18c-eecf-40ea-9979-eecbbdca7d68/metadata">api/cached/b0d3f18c-eecf-40ea-9979-eecbbdca7d68/metadata</a><br> 75 GET <a href="api/cached/b0d3f18c-eecf-40ea-9979-eecbbdca7d68/stream">api/cached/b0d3f18c-eecf-40ea-9979-eecbbdca7d68/stream</a><br> 76 GET <a href="api/cached/00000000-0000-0000-0000-000000000051/content">api/cached/00000000-0000-0000-0000-000000000051/content</a><br> 77 GET <a href="api/cached/de82f9d5-6b84-4c9d-8b8a-0736c8b1dd79/stream">api/cached/de82f9d5-6b84-4c9d-8b8a-0736c8b1dd79/stream</a><br> 69 GET <a href="api/annotations/a0000000-0000-0000-0000-000000000022">api/annotations/a0000000-0000-0000-0000-000000000022</a> </br> 70 GET <a href="api/annotations/a0000000-0000-0000-0000-000000000022/targets">api/annotations/a0000000-0000-0000-0000-000000000022/targets</a> </br> 71 GET <a href="api/annotations/a0000000-0000-0000-0000-000000000022/permissions">api/annotations/a0000000-0000-0000-0000-000000000022/permissions</a><br> 72 GET <a href="api/targets/a0000000-0000-0000-0000-000000000032">api/targets/a0000000-0000-0000-0000-000000000032</a> <br> 73 GET <a href="api/targets/a0000000-0000-0000-0000-000000000032/versions">api/targets/a0000000-0000-0000-0000-000000000032/versions</a> <br> 74 GET <a href="api/cached/a0000000-0000-0000-0000-000000000051/metadata">api/cached/a0000000-0000-0000-0000-000000000051/metadata</a><br> 75 GET <a href="api/cached/a0000000-0000-0000-0000-000000000511/content">api/cached/a0000000-0000-0000-0000-0000000000511/content</a><br> 76 GET <a href="api/cached/a0000000-0000-0000-0000-000000000051/stream">api/cached/a0000000-0000-0000-0000-000000000051/stream</a><br> 78 77 79 78
Note: See TracChangeset
for help on using the changeset viewer.