Changeset 4245


Ignore:
Timestamp:
01/09/14 17:02:09 (10 years ago)
Author:
olhsha
Message:

shibbolized

Location:
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
Files:
3 deleted
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/pom.xml

    r4210 r4245  
    247247            <version>8.4-702.jdbc4</version>
    248248        </dependency>
    249         <dependency>
     249       <!-- <dependency>
    250250            <groupId>org.springframework.security</groupId>
    251251            <artifactId>spring-security-core</artifactId>
     
    260260            <groupId>org.springframework.security</groupId>
    261261            <artifactId>spring-security-web</artifactId>
    262             <version>${spring.version}</version>
    263         </dependency>
     262            <version>${spring.version}</version> 
     263        </dependency> -->
    264264        <dependency>
    265265            <groupId>cglib</groupId>
     
    271271            <artifactId>slf4j-log4j12</artifactId>
    272272            <version>${slf4j.version}</version>
     273        </dependency>
     274        <dependency>
     275            <groupId>de.mpg.mpgaai</groupId>
     276            <artifactId>mpgaai-shhaa</artifactId>
     277            <version>1.0.3</version>
     278            <exclusions>
     279                <exclusion>
     280                    <groupId>commons-logging</groupId>
     281                    <artifactId>commons-logging</artifactId>
     282                </exclusion>
     283            </exclusions>
    273284        </dependency>
    274285    </dependencies>
     
    281292        <netbeans.hint.license>gpl20</netbeans.hint.license> 
    282293        <plugin.license.copyrightYear>2013</plugin.license.copyrightYear>
    283         <project.version>1.0</project.version>
     294        <project.version>1.1</project.version>
    284295    </properties>
    285296</project>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java

    r4217 r4245  
    5555import javax.xml.bind.JAXBElement;
    5656import org.springframework.beans.factory.annotation.Autowired;
    57 import org.springframework.security.access.annotation.Secured;
    5857import org.springframework.stereotype.Component;
    5958import org.slf4j.Logger;
     
    105104    @Produces(MediaType.TEXT_XML)
    106105    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}")
    107     @Secured("ROLE_USER")
    108106    @Transactional(readOnly = true)
    109107    public JAXBElement<Annotation> getAnnotation(@PathParam("annotationid") String ExternalIdentifier) throws IOException {
     
    135133    @Produces(MediaType.TEXT_XML)
    136134    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/targets")
    137     @Secured("ROLE_USER")
    138135    @Transactional(readOnly = true)
    139136    public JAXBElement<ReferenceList> getAnnotationTargets(@PathParam("annotationid") String ExternalIdentifier) throws IOException {
     
    160157    @Produces(MediaType.TEXT_XML)
    161158    @Path("")
    162     @Secured("ROLE_USER")
    163159    @Transactional(readOnly = true)
    164160    public JAXBElement<AnnotationInfoList> getFilteredAnnotations(@QueryParam("link") String link,
     
    183179    @Produces(MediaType.TEXT_XML)
    184180    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions")
    185     @Secured("ROLE_USER")
    186181    @Transactional(readOnly = true)
    187182    public JAXBElement<UserWithPermissionList> getAnnotationPermissions(@PathParam("annotationid") String ExternalIdentifier) throws IOException {
     
    208203    @DELETE
    209204    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}")
    210     @Secured("ROLE_USER")
    211205    public String deleteAnnotation(@PathParam("annotationid") String externalIdentifier) throws IOException {
    212206        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
     
    234228    @Produces(MediaType.APPLICATION_XML)
    235229    @Path("")
    236     @Secured("ROLE_USER")
    237230    public JAXBElement<ResponseBody> createAnnotation(Annotation annotation) throws IOException {
    238231        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
     
    249242    @Produces(MediaType.APPLICATION_XML)
    250243    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}")
    251     @Secured("ROLE_USER")
    252244    public JAXBElement<ResponseBody> updateAnnotation(@PathParam("annotationid") String externalIdentifier, Annotation annotation) throws IOException {
    253245        String path = uriInfo.getBaseUri().toString();
     
    281273    @Produces(MediaType.APPLICATION_XML)
    282274    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/body")
    283     @Secured("ROLE_USER")
    284275    public JAXBElement<ResponseBody> updateAnnotationBody(@PathParam("annotationid") String externalIdentifier, AnnotationBody annotationBody) throws IOException {
    285276        String path = uriInfo.getBaseUri().toString();
     
    307298    @Produces(MediaType.APPLICATION_XML)
    308299    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions/{userid: " + BackendConstants.regExpIdentifier + "}")
    309     @Secured("ROLE_USER")
    310300    public String updatePermission(@PathParam("annotationid") String annotationExternalId, @PathParam("userid") String userExternalId, Permission permission) throws IOException {
    311301        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
     
    335325    @Produces(MediaType.APPLICATION_XML)
    336326    @Path("{annotationid: " + BackendConstants.regExpIdentifier + "}/permissions/")
    337     @Secured("ROLE_USER")
    338327    public JAXBElement<ResponseBody> updatePermissions(@PathParam("annotationid") String annotationExternalId, UserWithPermissionList permissions) throws IOException {
    339328        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/CachedRepresentationResource.java

    r4217 r4245  
    4040import javax.xml.parsers.ParserConfigurationException;
    4141import org.springframework.beans.factory.annotation.Autowired;
    42 import org.springframework.security.access.annotation.Secured;
    4342import org.springframework.stereotype.Component;
    4443import org.springframework.transaction.annotation.Transactional;
     
    7170    @Produces(MediaType.TEXT_XML)
    7271    @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/metadata")
    73     @Secured("ROLE_USER")
    7472    @Transactional(readOnly = true)
    7573    public JAXBElement<CachedRepresentationInfo> getCachedRepresentationInfo(@PathParam("cachedid") String externalId) throws SQLException, IOException {
     
    8886    @Produces({"image/jpeg", "image/png"})
    8987    @Path("{cachedid: " + BackendConstants.regExpIdentifier + "}/content")
    90     @Secured("ROLE_USER")
    9188    @Transactional(readOnly = true)
    9289    public BufferedImage getCachedRepresentationContent(@PathParam("cachedid") String externalId) throws SQLException, IOException {
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/TargetResource.java

    r4217 r4245  
    4545import javax.xml.parsers.ParserConfigurationException;
    4646import org.springframework.beans.factory.annotation.Autowired;
    47 import org.springframework.security.access.annotation.Secured;
    4847import org.springframework.stereotype.Component;
    4948import org.springframework.transaction.annotation.Transactional;
     
    8281    @Produces(MediaType.TEXT_XML)
    8382    @Path("{targetid: " + BackendConstants.regExpIdentifier + "}")
    84     @Secured("ROLE_USER")
    8583    @Transactional(readOnly = true)
    8684    public JAXBElement<Target> getTarget(@PathParam("targetid") String ExternalIdentifier) throws SQLException, IOException {
     
    10098    @Produces(MediaType.TEXT_XML)
    10199    @Path("{targetid: " + BackendConstants.regExpIdentifier + "}/versions")
    102     @Secured("ROLE_USER")
    103100    @Transactional(readOnly = true)
    104101    public JAXBElement<ReferenceList> getSiblingTargets(@PathParam("targetid") String ExternalIdentifier) throws SQLException, IOException {
     
    133130    @Produces(MediaType.APPLICATION_XML)
    134131    @Path("{targetid: " + BackendConstants.regExpIdentifier + "}/fragment/{fragmentDescriptor}/cached")
    135     @Secured("ROLE_USER")
    136132    public JAXBElement<CachedRepresentationInfo> postCached(@PathParam("targetid") String targetIdentifier,
    137133            @PathParam("fragmentDescriptor") String fragmentDescriptor,
     
    151147    @DELETE
    152148    @Path("{targetid: " + BackendConstants.regExpIdentifier + "}/cached/{cachedid: " + BackendConstants.regExpIdentifier + "}")
    153     @Secured("ROLE_ADMIN")
    154149    public String deleteCachedForTarget(@PathParam("targetid") String targetExternalIdentifier,
    155150            @PathParam("cachedid") String cachedExternalIdentifier) throws SQLException, IOException {
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/UserResource.java

    r4217 r4245  
    4242import javax.xml.parsers.ParserConfigurationException;
    4343import org.springframework.beans.factory.annotation.Autowired;
    44 import org.springframework.security.access.annotation.Secured;
    4544import org.springframework.stereotype.Component;
    4645import org.springframework.transaction.annotation.Transactional;
     
    7473    @Produces(MediaType.TEXT_XML)
    7574    @Path("{userid: " + BackendConstants.regExpIdentifier + "}")
    76     @Secured("ROLE_USER")
    7775    @Transactional(readOnly = true)
    7876    public JAXBElement<User> getUser(@PathParam("userid") String ExternalIdentifier) throws SQLException, IOException {
     
    9189    @Produces(MediaType.TEXT_XML)
    9290    @Path("/info")
    93     @Secured("ROLE_USER")
    9491    @Transactional(readOnly = true)
    9592    public JAXBElement<User> getUserByInfo(@QueryParam("email") String email) throws SQLException, IOException {
     
    107104    @Produces(MediaType.TEXT_XML)
    108105    @Path("{userid: " + BackendConstants.regExpIdentifier + "}/current")
    109     @Secured("ROLE_USER")
    110106    @Transactional(readOnly = true)
    111107    public JAXBElement<CurrentUserInfo> getCurrentUserInfo(@PathParam("userid") String ExternalIdentifier) throws IOException {
     
    127123    @Produces(MediaType.TEXT_XML)
    128124    @Path("{remoteId: " + BackendConstants.regExpIdentifier + "}")
    129     @Secured("ROLE_ADMIN")
    130125    public JAXBElement<User> addUser(@PathParam("userid") String remoteId, User user) throws SQLException {
    131126        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
     
    139134    @Produces(MediaType.TEXT_XML)
    140135    @Path("")
    141     @Secured("ROLE_ADMIN")
    142136    public JAXBElement<User> updateUser(User user) throws IOException{
    143137        dbIntegrityService.setServiceURI(uriInfo.getBaseUri().toString());
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/shhaa.xml

    r4190 r4245  
    11<?xml version="1.0" encoding="UTF-8"?>
     2<!--
    23
     4    Copyright (C) 2013 DASISH
     5
     6    This program is free software; you can redistribute it and/or
     7    modify it under the terms of the GNU General Public License
     8    as published by the Free Software Foundation; either version 2
     9    of the License, or (at your option) any later version.
     10
     11    This program is distributed in the hope that it will be useful,
     12    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     14    GNU General Public License for more details.
     15
     16    You should have received a copy of the GNU General Public License
     17    along with this program; if not, write to the Free Software
     18    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     19
     20-->
    321<ROOT>
    422    <shhaa>
     
    2139                <username>anonymous</username>
    2240            </fallback>
    23             <sso action="lI">${shibLI}</sso>
    24             <slo action="lO">${shibLO}</slo>     
     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            <!-- <sso action="lI">http://localhost:8080/annotator-backend/api/index.jsp</sso>
     44            <slo action="lO">http://localhost:8080/annotator-backend/api/index.jsp</slo>  -->
    2545        </authentication>
    2646       
    2747       
    28         <composition action="rF">
     48        <!-- <composition action="rF">
    2949            <shibheader>
    3050                <attribute>displayName</attribute>
    3151                <attribute>commonName</attribute>
    3252            </shibheader>
    33         </composition>
     53        </composition> -->
    3454
    3555       
    3656        <authorization>
    37             <location  target="/admin/*" />
     57            <location  target="/hvwkejfhvwkehf/*" />
    3858        </authorization>
    3959       
    4060       
    41         <handler>
    42             <ignore>
    43                 <location target="/css/*" />
    44                 <location target="/img/*" />
    45             </ignore>
    46                
    47             <!-- configures the view-control targets -->
    48             <pages>
    49                 <!--  <info action="dI">/protected/info.jsp</info> -->
    50                 <denied action="dD">pages/noaccess.jsp</denied>
    51             </pages>
    52                
    53         </handler>
    5461       
    5562    </shhaa>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/WEB-INF/web.xml

    r4211 r4245  
    6666        <url-pattern>/webresources/*</url-pattern>
    6767    </servlet-mapping>
    68     <filter>
    69         <filter-name>springSecurityFilterChain</filter-name>
    70         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
     68   
     69     <filter>
     70        <filter-name>AAIFilter</filter-name>
     71        <filter-class>de.mpg.aai.shhaa.AuthFilter</filter-class>
    7172    </filter>
    7273    <filter-mapping>
    73         <filter-name>springSecurityFilterChain</filter-name>
     74        <filter-name>AAIFilter</filter-name>
    7475        <url-pattern>/*</url-pattern>
    7576    </filter-mapping>
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/index.jsp

    r3949 r4245  
    4040        DELETE <form action="api/notebooks/_nid_" method="DELETE"><input type="submit" /></form>api/notebooks/_nid_     Delete _nid_. Annotations stay, they just lose connection to _nid_.<br>
    4141 -->
    42     <br>
     42    <!-- <br>
    4343     <a href="spring_security_login"> Login</a> <br>
    4444     <br>
    45      <a href="j_spring_security_logout"> Logout</a> <br>
     45     <a href="j_spring_security_logout"> Logout</a> <br> -->
    4646     <br>
    4747      <b>Test URI-s</b><br>
Note: See TracChangeset for help on using the changeset viewer.