Changeset 5307


Ignore:
Timestamp:
05/28/14 14:11:28 (10 years ago)
Author:
Twan Goosen
Message:

removed custom authentication filters. for now, entire web app requires authentication

Location:
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry

    • Property svn:ignore
      •  

        old new  
        1 .settings
        2 target
         1nb-configuration.xml
        32.classpath
        43.project
         4target
         5.settings
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/auth/AuthFilter.java

    r1133 r5307  
    2121import javax.servlet.http.HttpSession;
    2222
     23/**
     24 *
     25 * @deprecated no need for custom authentication
     26 * @see BasicAuthStrategy
     27 * @see ShibbolethAuthStrategy
     28 */
     29@Deprecated
    2330public final class AuthFilter implements Filter {
     31
    2432    private final class RequestWrapper extends HttpServletRequestWrapper {
     33
    2534        private final AuthStrategy.Result result;
    2635
     
    4453        public String getRemoteUser() {
    4554            return result.isAuthenticated()
    46                  ? result.getPrincipal().getName()
    47                  : null;
     55                    ? result.getPrincipal().getName()
     56                    : null;
    4857        }
    4958    } // class RequestWrapper
     
    5160    private static final class ResponseWrapper
    5261            extends HttpServletResponseWrapper {
     62
    5363        private boolean authRequested = false;
    54        
     64
    5565        public ResponseWrapper(HttpServletResponse response) {
    5666            super(response);
    57            
     67
    5868        }
    5969
     
    7383            super.setStatus(sc);
    7484        }
    75        
     85
    7686        public boolean isAuthRequested() {
    7787            return authRequested;
     
    7989    } // class ResponseWrapper
    8090
    81     private static final String CONFIG_PARAM_AUTH_STRATEGY =
    82         "authfilter.strategy";
     91    private static final String CONFIG_PARAM_AUTH_STRATEGY
     92            = "authfilter.strategy";
    8393    private static final String STRATEGY_BASIC = "basic";
    8494    private static final String STRATEGY_SHIBBOLETH = "shibboleth";
     
    8797    private static final String SESSION_PARAM_FORCED_AUTH = "authfilter.force";
    8898    private AuthStrategy strategy;
    89 
    9099
    91100    @Override
     
    107116                strategy = new ShibbolethAuthStrategy();
    108117            } else {
    109                 throw new UnavailableException("invalid value for init " +
    110                         "parameter '" + CONFIG_PARAM_AUTH_STRATEGY +
    111                         "' (" + s + ")");
     118                throw new UnavailableException("invalid value for init "
     119                        + "parameter '" + CONFIG_PARAM_AUTH_STRATEGY
     120                        + "' (" + s + ")");
    112121            }
    113122            try {
    114123                strategy.init(config, cfg);
    115124            } catch (ServletException e) {
    116                 throw new UnavailableException("error initalizing auth " +
    117                         "filter: " + e.getMessage());
     125                throw new UnavailableException("error initalizing auth "
     126                        + "filter: " + e.getMessage());
    118127            }
    119128        } else {
    120             throw new UnavailableException("missing init parameter '" +
    121                         CONFIG_PARAM_AUTH_STRATEGY + "'");
     129            throw new UnavailableException("missing init parameter '"
     130                    + CONFIG_PARAM_AUTH_STRATEGY + "'");
    122131        }
    123132    }
     
    151160                StringBuffer url = request.getRequestURL();
    152161                boolean firstParam = true;
    153                 Iterator<?> params =
    154                     request.getParameterMap().entrySet().iterator();
     162                Iterator<?> params
     163                        = request.getParameterMap().entrySet().iterator();
    155164                while (params.hasNext()) {
    156165                    @SuppressWarnings("unchecked")
    157                     Map.Entry<String, String[]> entry =
    158                         (Map.Entry<String, String[]>) params.next();
     166                    Map.Entry<String, String[]> entry
     167                            = (Map.Entry<String, String[]>) params.next();
    159168                    if (AUTH_ACTION_PARAM.equals(entry.getKey())) {
    160169                        continue;
     
    180189        }
    181190
    182         AuthStrategy.Result result =
    183             strategy.handleAuth(request, response);
     191        AuthStrategy.Result result
     192                = strategy.handleAuth(request, response);
    184193        if (result == null) {
    185194            throw new UnavailableException(
     
    187196        }
    188197        switch (result.getAction()) {
    189         case CONTINUE_AUTHENTICATED:
     198            case CONTINUE_AUTHENTICATED:
    190199            /* FALL-TROUGH */
    191         case CONTINUE_UNAUTHENTICATED:
    192             final RequestWrapper request2 =
    193                 new RequestWrapper(request, result);
    194             final ResponseWrapper response2 =
    195                 new ResponseWrapper(response);
    196             chain.doFilter(request2, response2);
    197             /*
    198              * lazy auth: if request returned a status of 401 (unauthorized),
    199              * request strategy to perform authorization
    200              */
    201             if (response2.isAuthRequested()) {
    202                 strategy.requestAuth(request2, response2);
    203             }
    204             break;
    205         case RETRY:
    206             strategy.requestAuth(request, response);
    207             break;
    208         case ABORT:
    209             response.sendError(HttpServletResponse.SC_FORBIDDEN,
    210                     "Authorization failed");
    211             break;
    212         case ERROR:
    213             response.sendError(HttpServletResponse.SC_BAD_REQUEST,
    214                     "Authorization error due to bad request");
     200            case CONTINUE_UNAUTHENTICATED:
     201                final RequestWrapper request2
     202                        = new RequestWrapper(request, result);
     203                final ResponseWrapper response2
     204                        = new ResponseWrapper(response);
     205                chain.doFilter(request2, response2);
     206                /*
     207                 * lazy auth: if request returned a status of 401 (unauthorized),
     208                 * request strategy to perform authorization
     209                 */
     210                if (response2.isAuthRequested()) {
     211                    strategy.requestAuth(request2, response2);
     212                }
     213                break;
     214            case RETRY:
     215                strategy.requestAuth(request, response);
     216                break;
     217            case ABORT:
     218                response.sendError(HttpServletResponse.SC_FORBIDDEN,
     219                        "Authorization failed");
     220                break;
     221            case ERROR:
     222                response.sendError(HttpServletResponse.SC_BAD_REQUEST,
     223                        "Authorization error due to bad request");
    215224        } // switch
    216225    }
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/auth/BasicAuthStrategy.java

    r1133 r5307  
    2323import org.apache.commons.codec.digest.DigestUtils;
    2424
    25 
     25/**
     26 *
     27 * @deprecated to be replaced with basic authentication mechanism at container
     28 * level (e.g. tomcat-users)
     29 */
     30@Deprecated
    2631final class BasicAuthStrategy implements AuthStrategy {
    2732    private enum HashMethod {
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/auth/ShibbolethAuthStrategy.java

    r906 r5307  
    1414import javax.servlet.http.HttpSession;
    1515
    16 
     16/**
     17 *
     18 * @deprecated to be replaced with SHHAA filter
     19 */
     20@Deprecated
    1721final class ShibbolethAuthStrategy implements AuthStrategy {
     22
    1823    private static final String SHIB_PARAM_RETURN = "return";
    1924    private static final String SHIB_PARAM_TARGET = "target";
    2025    private static final String SHIB_PARAM_PROVIDER = "providerId";
    21     private static final String CONFIG_PARAM_SSO =
    22         "authfilter.shibboleth.sso";
    23     private static final String CONFIG_PARAM_SLO =
    24         "authfilter.shibboleth.slo";
    25     private static final String CONFIG_PARAM_PROVIDER =
    26         "authfilter.shibboleth.provider";
    27     private static final String CONFIG_PARAM_HOST =
    28         "authfilter.shibboleth.host";
    29     private static final String CONFIG_PARAM_CONTEXT =
    30         "authfilter.shibboleth.context";
    31     private static final String CONFIG_PARAM_SESSION =
    32         "authfilter.shibboleth.session";
    33     private static final String CONFIG_PARAM_IDP =
    34         "authfilter.shibboleth.idp";
    35     private static final String CONFIG_PARAM_TIMESTAMP =
    36         "authfilter.shibboleth.timestamp";
    37     private static final String CONFIG_PARAM_USERNAME =
    38         "authfilter.shibboleth.username";
    39     private static final String CONFIG_PARAM_ATTRIBUTES =
    40         "authfilter.shibboleth.attributes";
     26    private static final String CONFIG_PARAM_SSO
     27            = "authfilter.shibboleth.sso";
     28    private static final String CONFIG_PARAM_SLO
     29            = "authfilter.shibboleth.slo";
     30    private static final String CONFIG_PARAM_PROVIDER
     31            = "authfilter.shibboleth.provider";
     32    private static final String CONFIG_PARAM_HOST
     33            = "authfilter.shibboleth.host";
     34    private static final String CONFIG_PARAM_CONTEXT
     35            = "authfilter.shibboleth.context";
     36    private static final String CONFIG_PARAM_SESSION
     37            = "authfilter.shibboleth.session";
     38    private static final String CONFIG_PARAM_IDP
     39            = "authfilter.shibboleth.idp";
     40    private static final String CONFIG_PARAM_TIMESTAMP
     41            = "authfilter.shibboleth.timestamp";
     42    private static final String CONFIG_PARAM_USERNAME
     43            = "authfilter.shibboleth.username";
     44    private static final String CONFIG_PARAM_ATTRIBUTES
     45            = "authfilter.shibboleth.attributes";
    4146    private static final String SESSION_PARAM_SID = "shib.sid";
    4247    private static final String SESSION_PARAM_IDP = "shib.idp";
     
    7782        HttpSession session = request.getSession();
    7883        String oldSid = (String) session.getAttribute(SESSION_PARAM_SID);
    79         String sid    = getHeader(request, sessionHeaderName);
     84        String sid = getHeader(request, sessionHeaderName);
    8085
    8186        if (sid != null) {
     
    8590                 *        logout or expired; pass that information on
    8691                 */
    87                 final AuthPrincipal principal =
    88                     refreshPrinicpal(request, session, sid);
     92                final AuthPrincipal principal
     93                        = refreshPrinicpal(request, session, sid);
    8994                if (principal != null) {
    9095                    result.setAction(Action.CONTINUE_AUTHENTICATED);
     
    9297                }
    9398            } else if (sid.equals(oldSid)) {
    94                 final AuthPrincipal principal =
    95                     (AuthPrincipal) session.getAttribute(SESSION_PARAM_PRINCIPAL);
     99                final AuthPrincipal principal
     100                        = (AuthPrincipal) session.getAttribute(SESSION_PARAM_PRINCIPAL);
    96101                result.setAction(Action.CONTINUE_AUTHENTICATED);
    97102                result.setPrinicpal(principal);
     
    120125                }
    121126            }
    122             AuthPrincipal principal = new AuthPrincipal(username, attributes);            session.setAttribute(SESSION_PARAM_SID, sid);
     127            AuthPrincipal principal = new AuthPrincipal(username, attributes);
     128            session.setAttribute(SESSION_PARAM_SID, sid);
    123129            session.setAttribute(SESSION_PARAM_IDP, idp);
    124130            session.setAttribute(SESSION_PARAM_TIMESTAMP, timestamp);
     
    172178            }
    173179            target.append(request.getServerName());
    174             if ((scheme.equalsIgnoreCase("http") && (port != 80)) ||
    175                 (scheme.equalsIgnoreCase("https") && (port != 443))) {
     180            if ((scheme.equalsIgnoreCase("http") && (port != 80))
     181                    || (scheme.equalsIgnoreCase("https") && (port != 443))) {
    176182                target.append(':');
    177183                target.append(port);
     
    192198        while (params.hasNext()) {
    193199            @SuppressWarnings("unchecked")
    194             Map.Entry<String, String[]> entry =
    195                 (Map.Entry<String, String[]>) params.next();
     200            Map.Entry<String, String[]> entry
     201                    = (Map.Entry<String, String[]>) params.next();
    196202            for (String value : entry.getValue()) {
    197203                if (firstParam) {
     
    207213        StringBuilder url = new StringBuilder(shibUrl);
    208214        url.append('?')
    209             .append(param)
    210             .append('=')
    211             .append(urlEncode(target.toString()));
     215                .append(param)
     216                .append('=')
     217                .append(urlEncode(target.toString()));
    212218        if (SHIB_PARAM_TARGET.equals(param) && (provider != null)) {
    213219            url.append('&')
    214                 .append(SHIB_PARAM_PROVIDER)
    215                 .append('=')
    216                 .append(provider);
     220                    .append(SHIB_PARAM_PROVIDER)
     221                    .append('=')
     222                    .append(provider);
    217223        }
    218224        return url.toString();
     
    220226
    221227    private void loadConfig(Map<String, String> cfg) {
    222         ssoUrl               = readProperty(cfg, CONFIG_PARAM_SSO, "sso");
    223         sloUrl               = readProperty(cfg, CONFIG_PARAM_SLO, "slo");
    224         provider             = readProperty(cfg, CONFIG_PARAM_PROVIDER, null);
    225         host                 = readProperty(cfg, CONFIG_PARAM_HOST, null);
    226         context              = readProperty(cfg, CONFIG_PARAM_CONTEXT, null);
    227         sessionHeaderName    =
    228             readProperty(cfg, CONFIG_PARAM_SESSION, "Shib-Session-ID");
    229         idpHeaderName        =
    230             readProperty(cfg, CONFIG_PARAM_IDP, "Shib-Identity-Provider");
    231         timestampHeaderName  = readProperty(cfg, CONFIG_PARAM_TIMESTAMP,
    232                                             "Shib-Authentication-Instant");
    233         usernameHeaderNames  = readProperties(cfg, CONFIG_PARAM_USERNAME,
    234                                               new String[] {
    235                                                  "eduPersonPrincipalName" ,
    236                                                  "eppn"
    237                                               });
    238         attributeHeaderNames =
    239             readProperties(cfg, CONFIG_PARAM_ATTRIBUTES, null);
     228        ssoUrl = readProperty(cfg, CONFIG_PARAM_SSO, "sso");
     229        sloUrl = readProperty(cfg, CONFIG_PARAM_SLO, "slo");
     230        provider = readProperty(cfg, CONFIG_PARAM_PROVIDER, null);
     231        host = readProperty(cfg, CONFIG_PARAM_HOST, null);
     232        context = readProperty(cfg, CONFIG_PARAM_CONTEXT, null);
     233        sessionHeaderName
     234                = readProperty(cfg, CONFIG_PARAM_SESSION, "Shib-Session-ID");
     235        idpHeaderName
     236                = readProperty(cfg, CONFIG_PARAM_IDP, "Shib-Identity-Provider");
     237        timestampHeaderName = readProperty(cfg, CONFIG_PARAM_TIMESTAMP,
     238                "Shib-Authentication-Instant");
     239        usernameHeaderNames = readProperties(cfg, CONFIG_PARAM_USERNAME,
     240                new String[]{
     241                    "eduPersonPrincipalName",
     242                    "eppn"
     243                });
     244        attributeHeaderNames
     245                = readProperties(cfg, CONFIG_PARAM_ATTRIBUTES, null);
    240246    }
    241247
     
    251257        return (s != null) ? s : defaulValue;
    252258    }
    253    
     259
    254260    private static String[] readProperties(Map<String, String> cfg,
    255261            String name, String[] defaultValue) {
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/webapp/WEB-INF/web.xml

    r929 r5307  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3   xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    4   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    5   id="WebApp_ID" version="2.5">
    6   <display-name>CLARIN Virtual Collection Registry</display-name>
     3         xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     4         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     5         id="WebApp_ID" version="2.5">
     6    <display-name>CLARIN Virtual Collection Registry</display-name>
    77
    8   <listener>
    9     <listener-class>eu.clarin.cmdi.virtualcollectionregistry.rest.ContextListener</listener-class>
    10   </listener>
     8    <listener>
     9        <listener-class>eu.clarin.cmdi.virtualcollectionregistry.rest.ContextListener</listener-class>
     10    </listener>
    1111
    12   <filter>
    13     <filter-name>PersistenceFilter</filter-name>
    14     <filter-class>eu.clarin.cmdi.virtualcollectionregistry.rest.PersistenceFilter</filter-class>
    15   </filter>
     12    <filter>
     13        <filter-name>PersistenceFilter</filter-name>
     14        <filter-class>eu.clarin.cmdi.virtualcollectionregistry.rest.PersistenceFilter</filter-class>
     15    </filter>
    1616
    17   <filter-mapping>
    18     <filter-name>PersistenceFilter</filter-name>
    19     <servlet-name>REST-Web-Service</servlet-name>
    20   </filter-mapping>
     17    <filter-mapping>
     18        <filter-name>PersistenceFilter</filter-name>
     19        <servlet-name>REST-Web-Service</servlet-name>
     20    </filter-mapping>
    2121
    22   <filter>
    23     <filter-name>CharacterEncodingFilter</filter-name>
    24     <filter-class>eu.clarin.cmdi.virtualcollectionregistry.gui.CharacterEncodingFilter</filter-class>
    25   </filter>
     22    <filter>
     23        <filter-name>CharacterEncodingFilter</filter-name>
     24        <filter-class>eu.clarin.cmdi.virtualcollectionregistry.gui.CharacterEncodingFilter</filter-class>
     25    </filter>
    2626
    27   <filter-mapping>
    28     <filter-name>CharacterEncodingFilter</filter-name>
    29     <url-pattern>/app/*</url-pattern>
    30   </filter-mapping>
     27    <filter-mapping>
     28        <filter-name>CharacterEncodingFilter</filter-name>
     29        <url-pattern>/app/*</url-pattern>
     30    </filter-mapping>
    3131
    32   <filter>
    33     <filter-name>AuthFilter</filter-name>
    34     <filter-class>eu.clarin.cmdi.virtualcollectionregistry.gui.auth.AuthFilter</filter-class>
    35   </filter>
     32    <filter>
     33        <filter-name>VirtualCollectionRegistryApplication</filter-name>
     34        <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
     35        <init-param>
     36            <param-name>applicationClassName</param-name>
     37            <param-value>eu.clarin.cmdi.virtualcollectionregistry.gui.Application</param-value>
     38        </init-param>
     39        <init-param>
     40            <param-name>configuration</param-name>
     41            <!--
     42           <param-value>deployment</param-value>
     43            -->
     44            <param-value>development</param-value>
     45        </init-param>
     46    </filter>
    3647
    37   <filter-mapping>
    38     <filter-name>AuthFilter</filter-name>
    39     <url-pattern>/app/*</url-pattern>
    40   </filter-mapping>
     48    <filter-mapping>
     49        <filter-name>VirtualCollectionRegistryApplication</filter-name>
     50        <url-pattern>/app/*</url-pattern>
     51    </filter-mapping>
    4152
    42   <filter>
    43     <filter-name>VirtualCollectionRegistryApplication</filter-name>
    44     <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
    45     <init-param>
    46         <param-name>applicationClassName</param-name>
    47         <param-value>eu.clarin.cmdi.virtualcollectionregistry.gui.Application</param-value>
    48     </init-param>
    49     <init-param>
    50         <param-name>configuration</param-name>
    51         <!--
    52         <param-value>deployment</param-value>
    53          -->
    54         <param-value>development</param-value>
    55     </init-param>
    56   </filter>
     53    <servlet>
     54        <display-name>Virtual Collection Registry REST web service</display-name>
     55        <servlet-name>REST-Web-Service</servlet-name>
     56        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
     57        <init-param>
     58            <param-name>com.sun.jersey.config.property.packages</param-name>
     59            <param-value>eu.clarin.cmdi.virtualcollectionregistry.rest</param-value>
     60        </init-param>
     61        <load-on-startup>1</load-on-startup>
     62    </servlet>
    5763
    58   <filter-mapping>
    59     <filter-name>VirtualCollectionRegistryApplication</filter-name>
    60     <url-pattern>/app/*</url-pattern>
    61   </filter-mapping>
     64    <servlet-mapping>
     65        <servlet-name>REST-Web-Service</servlet-name>
     66        <url-pattern>/service/*</url-pattern>
     67    </servlet-mapping>
    6268
    63   <servlet>
    64     <display-name>Virtual Collection Registry REST web service</display-name>
    65     <servlet-name>REST-Web-Service</servlet-name>
    66     <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    67     <init-param>
    68       <param-name>com.sun.jersey.config.property.packages</param-name>
    69       <param-value>eu.clarin.cmdi.virtualcollectionregistry.rest</param-value>
    70     </init-param>
    71     <load-on-startup>1</load-on-startup>
    72   </servlet>
     69    <servlet>
     70        <display-name>Virtual Collection Registry OAI-PMH Provider</display-name>
     71        <servlet-name>OAI-PMH-Provider</servlet-name>
     72        <servlet-class>eu.clarin.cmdi.oai.provider.ProviderServlet</servlet-class>
     73        <load-on-startup>2</load-on-startup>
     74    </servlet>
    7375
    74   <servlet-mapping>
    75     <servlet-name>REST-Web-Service</servlet-name>
    76     <url-pattern>/service/*</url-pattern>
    77   </servlet-mapping>
     76    <servlet-mapping>
     77        <servlet-name>OAI-PMH-Provider</servlet-name>
     78        <url-pattern>/oai</url-pattern>
     79    </servlet-mapping>
    7880
    79   <servlet>
    80     <display-name>Virtual Collection Registry OAI-PMH Provider</display-name>
    81     <servlet-name>OAI-PMH-Provider</servlet-name>
    82     <servlet-class>eu.clarin.cmdi.oai.provider.ProviderServlet</servlet-class>
    83     <load-on-startup>2</load-on-startup>
    84   </servlet>
     81    <resource-ref>
     82        <description>Virtual Collection Datastore Connection</description>
     83        <res-ref-name>jdbc/VirtualCollectionStore</res-ref-name>
     84        <res-type>javax.sql.DataSource</res-type>
     85        <res-auth>Container</res-auth>
     86    </resource-ref>
    8587
    86   <servlet-mapping>
    87     <servlet-name>OAI-PMH-Provider</servlet-name>
    88     <url-pattern>/oai</url-pattern>
    89   </servlet-mapping>
     88    <!--
     89        Security constraints; authentication mechanism must be configured
     90        by means of a security realm (by default the UserDatabaseRealm is
     91        configured in Tomcat, which uses the tomcat-users.xml file)
     92    -->
     93    <security-constraint>
     94        <display-name>REST-Web-Service</display-name>
     95        <web-resource-collection>
     96            <web-resource-name>REST-Web-Service</web-resource-name>
     97            <description></description>
     98            <url-pattern>/service/virtualcollection</url-pattern>
     99            <http-method>POST</http-method>
     100        </web-resource-collection>
     101        <web-resource-collection>
     102            <web-resource-name>REST-Web-Service</web-resource-name>
     103            <description></description>
     104            <url-pattern>/service/virtualcollection/*</url-pattern>
     105            <http-method>DELETE</http-method>
     106            <http-method>POST</http-method>
     107            <http-method>PUT</http-method>
     108        </web-resource-collection>
     109        <web-resource-collection>
     110            <web-resource-name>REST-Web-Service</web-resource-name>
     111            <description></description>
     112            <url-pattern>/service/my-virtualcollections</url-pattern>
     113            <http-method>GET</http-method>
     114        </web-resource-collection>
     115        <web-resource-collection>
     116            <web-resource-name>VirtualCollectionRegistryApplication</web-resource-name>
     117            <description></description>
     118            <url-pattern>/app/*</url-pattern>
     119            <http-method>GET</http-method>
     120        </web-resource-collection>
     121        <auth-constraint>
     122            <role-name>*</role-name>
     123        </auth-constraint>
     124    </security-constraint>
    90125
    91   <security-constraint>
    92     <display-name>REST-Web-Service</display-name>
    93     <web-resource-collection>
    94       <web-resource-name>REST-Web-Service</web-resource-name>
    95       <description></description>
    96       <url-pattern>/service/virtualcollection</url-pattern>
    97       <http-method>POST</http-method>
    98     </web-resource-collection>
    99     <web-resource-collection>
    100       <web-resource-name>REST-Web-Service</web-resource-name>
    101       <description></description>
    102       <url-pattern>/service/virtualcollection/*</url-pattern>
    103       <http-method>DELETE</http-method>
    104       <http-method>POST</http-method>
    105       <http-method>PUT</http-method>
    106     </web-resource-collection>
    107     <web-resource-collection>
    108       <web-resource-name>REST-Web-Service</web-resource-name>
    109       <description></description>
    110       <url-pattern>/service/my-virtualcollections</url-pattern>
    111       <http-method>GET</http-method>
    112     </web-resource-collection>
    113     <web-resource-collection>
    114         <web-resource-name>VirtualCollectionRegistryApplication</web-resource-name>
    115         <description></description>
    116         <url-pattern>/app/login</url-pattern>
    117         <http-method>GET</http-method>
    118         <http-method>POST</http-method>
    119     </web-resource-collection>
    120     <auth-constraint>
    121       <role-name>*</role-name>
    122     </auth-constraint>
    123   </security-constraint>
     126    <login-config>
     127        <auth-method>BASIC</auth-method>
     128    </login-config>
    124129
    125   <resource-ref>
    126     <description>Virtual Collection Datastore Connection</description>
    127     <res-ref-name>jdbc/VirtualCollectionStore</res-ref-name>
    128     <res-type>javax.sql.DataSource</res-type>
    129     <res-auth>Container</res-auth>
    130   </resource-ref>
     130    <security-role>
     131        <role-name>*</role-name>
     132    </security-role>
    131133
    132   <login-config>
    133     <auth-method>BASIC</auth-method>
    134   </login-config>
     134    <mime-mapping>
     135        <extension>xsd</extension>
     136        <mime-type>application/xml</mime-type>
     137    </mime-mapping>
    135138
    136   <security-role>
    137     <role-name>*</role-name>
    138   </security-role>
    139 
    140   <mime-mapping>
    141     <extension>xsd</extension>
    142     <mime-type>application/xml</mime-type>
    143   </mime-mapping>
    144 
    145   <welcome-file-list>
    146     <welcome-file>index.jsp</welcome-file>
    147   </welcome-file-list>
     139    <welcome-file-list>
     140        <welcome-file>index.jsp</welcome-file>
     141    </welcome-file-list>
    148142</web-app>
Note: See TracChangeset for help on using the changeset viewer.