I've been poking a bit around and noticed an uncommented line in security.xml, where you can enable classic AuthN. Adding DrupalAuthFilter among the other filters along with an entry looking like this further down the file: <bean id="DrupalAuthFilter" class="ca.upei.roblib.fedora.servletfilter.DrupalAuthModule" lazy-init="true" init-method="init"> <property name="config"> <bean class="org.fcrepo.common.http.FilterConfigBean"> <property name="filterName" value="DrupalAuthFilter" /> </bean> </property> </bean>
Though this makes Fedora throw this exception which I don't know how to resolve: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DrupalAuthFilter' defined in file [/usr/local/fedora-3.5-SNAPSHOT/server/config/spring/web/security.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'config' of bean class [ca.upei.roblib.fedora.servletfilter.DrupalAuthModule]: Bean property 'config' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... 43 common frames omitted Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'config' of bean class [ca.upei.roblib.fedora.servletfilter.DrupalAuthModule]: Bean property 'config' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1024) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:900) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... 51 common frames omitted Also the UserServlet is not present anymore so you cannot simply go there to get an XML representation of a user and her roles. On Fri, Jul 22, 2011 at 1:33 PM, Tomasz Cielecki <tom...@ostebaronen.dk> wrote: > Hello again, > > Is it true that there has been made some changes somewhere that could > make some servletfilters that worked in 3.4.2 stop working in 3.5. I > am using the Islandora Drupal Filter to authenticate and authorize > users and their roles in Fedora, but looking at the FeSL log it seems > like all the roles are missing, where in 3.4.2 they were present. > > As far as I understand the Islandora people have used the > XmlUsersFileModule.java as an example to write their own and comparing > it to the one in: > https://github.com/fcrepo/fcrepo/blob/master/fcrepo-security/fcrepo-security-jaas/src/main/java/org/fcrepo/server/security/jaas/auth/module/XmlUsersFileModule.java > > It seems like the required methods are all present. One thing I > noticed in the security.xml file is that it contains the > AuthFilterJAAS line a lot of places, and looking in the code in github > AuthFilterJAAS has recently been altered so that it works with Spring. > This probably means that the Islandora people probably have to adapt > their own filters to match AuthFilterJAAS, right? > > On Fri, Jul 22, 2011 at 12:12 PM, Tomasz Cielecki <tom...@ostebaronen.dk> > wrote: >> Hi Steve, >> >> Thanks I got it to work. I made a copy of the security.xml file and >> called it security.xml.pep and then made a similar copy called >> security.xml.nopep where I have deleted all PEPFilter references and >> finally I have deleted security.xml and using symlinks to those two >> files depending upon if I want PEP enabled or not. >> >> On Mon, Jul 18, 2011 at 6:06 PM, Stephen Bayliss >> <stephen.bayl...@acuityunlimited.net> wrote: >>> Hi Tomasz >>> >>> Yes, some changes have been made to the configuration as Spring is being >>> introduced in 3.5. You will find the configuration for the filters in >>> $FEDORA_HOME/server/config/spring/web - take a look at security.xml, I think >>> that contains what you want. I haven't actually tested this though, so if >>> you do find any problems disabling the PEP using the Spring configuration, >>> please report this on the main list so some of the people involved in the >>> Spring work will also see this and get a chance to respond. >>> >>> Regards >>> Steve >>> >>>> -----Original Message----- >>>> From: Tomasz Cielecki [mailto:tom...@ostebaronen.dk] >>>> Sent: 18 July 2011 13:16 >>>> To: Stephen Bayliss >>>> Subject: Re: [fcrepo-user] Trouble adding own attribute designator >>>> >>>> >>>> Hello again, >>>> >>>> I have some trouble finding out how to disable PEP >>>> temporarily to alter my policy objects if I have made >>>> mistakes in them and such. >>>> >>>> In Fedora 3.4.2 I went to >>>> $FEDORA_HOME/tomcat/webapps/fedora/WEB-INF/web.xml and >>>> uncommented PEPfilter lines, these do no appear in Fedora 3.5. >>>> >>>> Where should I look? >>>> >>>> On Mon, Jul 18, 2011 at 1:12 PM, Tomasz Cielecki >>>> <tom...@ostebaronen.dk> wrote: >>>> > Hello Stephen, >>>> > >>>> > I followed the instructions and to me they seem to be accurate and >>>> > easy to follow. >>>> > >>>> > One thing that I did not understand in the Upgrading instructions: >>>> > https://wiki.duraspace.org/display/FEDORA35/Upgrading+from+3.x >>>> > is step 3: Configure the Policy Index, maybe you should >>>> elaborate on >>>> > that as I, as a fairly new Fedora user does not entirely understand >>>> > what you mean by this step. Otherwise my installation seems to work >>>> > and I will try out implementing own attribute designators. >>>> > >>>> > On Mon, Jul 18, 2011 at 9:01 AM, Stephen Bayliss >>>> > <stephen.bayl...@acuityunlimited.net> wrote: >>>> >> Hi Tomasz >>>> >> >>>> >> I should have mentioned - Fedora 3.5 is not yet released, it is >>>> >> currently under test for hopefully a release quite soon. >>>> >> >>>> >> If you'd like to try out this version you will need to build it >>>> >> yourself from source from Github - >>>> https://github.com/fcrepo/fcrepo - >>>> >> see the README file in the root directory for information. >>>> >> >>>> >> Documentation for the new release (work-in-progress) is at >>>> >> >>>> https://wiki.duraspace.org/display/FEDORA35/Fedora+3.5+Documentation >>>> >> >>>> >> Particularly it would be worth looking at the FeSL installation >>>> >> information at >>>> >> https://wiki.duraspace.org/display/FEDORA35/FeSL+Installation. If >>>> >> you do have any comments on the FeSL documentation then >>>> please do let >>>> >> me know, we are aiming to add to the FeSL documentation for this >>>> >> release so any feedback we get would be great. >>>> >> >>>> >> Regards >>>> >> Steve >>>> >> >>>> >> >>>> >> >>>> >>> -----Original Message----- >>>> >>> From: Tomasz Cielecki [mailto:tom...@ostebaronen.dk] >>>> >>> Sent: 13 July 2011 14:17 >>>> >>> To: Support and info exchange list for Fedora users. >>>> >>> Subject: Re: [fcrepo-user] Trouble adding own attribute designator >>>> >>> >>>> >>> >>>> >>> Hello Stephen, >>>> >>> >>>> >>> Ahh yes, you are right. I am running 3.4.2. I will try >>>> upgrade to a >>>> >>> newer version and see if it works. >>>> >>> >>>> >>> On Wed, Jul 13, 2011 at 2:33 PM, Stephen Bayliss >>>> >>> <stephen.bayl...@acuityunlimited.net> wrote: >>>> >>> > Hello Tomasz >>>> >>> > >>>> >>> > I am guessing you are using Fedora 3.4.2 from the log. >>>> >>> > >>>> >>> > Resource index query-based attributes are a new feature in >>>> >>> Fedora 3.5; >>>> >>> > which would explain the error I think. >>>> >>> > >>>> >>> > Regards >>>> >>> > Steve >>>> >>> > >>>> >>> >> -----Original Message----- >>>> >>> >> From: Tomasz Cielecki [mailto:tom...@ostebaronen.dk] >>>> >>> >> Sent: 13 July 2011 13:04 >>>> >>> >> To: fedora-commons-users@lists.sourceforge.net >>>> >>> >> Subject: [fcrepo-user] Trouble adding own attribute designator >>>> >>> >> >>>> >>> >> >>>> >>> >> Hello, >>>> >>> >> >>>> >>> >> I am trying to add the following attribute designator in >>>> >>> >> $FEDORA_HOME/pdp/conf/config-attribute-finder.xml >>>> >>> >> >>>> >>> >> <attribute designator="resource" >>>> >>> >> name="http://kemibrug.dk/k2/rdf#notesPids"> >>>> >>> >> <config name="queryLang" >>>> value="sparql"/> >>>> >>> >> <config name="value" >>>> value="notesPids"/> >>>> >>> >> <config name="query" value="SELECT >>>> >>> ?pid WHERE >>>> >>> >> {?pid <dc:identifier> ?ident FILTER (REGEX(STR(?ident), >>>> >>> >> "note"))}"/> >>>> >>> >> </attribute> >>>> >>> >> >>>> >>> >> For some reason it makes fedora throw exceptions when >>>> trying to >>>> >>> >> access objects in the database: >>>> >>> >> >>>> >>> >> ERROR 2011-07-13 14:02:00.657 [http-8080-1] >>>> >>> (DirectPDPClient) Error >>>> >>> >> evaluating request. >>>> >>> >> java.lang.NullPointerException: null >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.finder.attribute.FedoraRI >>>> >>> >> AttributeFinder.getSupportedDesignatorTypes(FedoraRIAttributeF >>>> >>> >> inder.java:94) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> com.sun.xacml.finder.AttributeFinder.findAttribute(AttributeFi >>>> >>> >> nder.java:168) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> com.sun.xacml.BasicEvaluationCtx.callHelper(BasicEvaluationCtx >>>> >>> >> .java:661) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> com.sun.xacml.BasicEvaluationCtx.getGenericAttributes(BasicEva >>>> >>> >> luationCtx.java:617) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> com.sun.xacml.BasicEvaluationCtx.getSubjectAttribute(BasicEval >>>> >>> >> uationCtx.java:551) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> com.sun.xacml.BasicEvaluationCtx.getSubjectAttribute(BasicEval >>>> >>> >> uationCtx.java:523) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.data.DbXmlPolicyIndex.get >>>> >>> >> AttributeMap(DbXmlPolicyIndex.java:425) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.data.DbXmlPolicyIndex.get >>>> >>> >> Policies(DbXmlPolicyIndex.java:129) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.finder.policy.PolicyManag >>>> >>> >> er.getPolicy(PolicyManager.java:147) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.finder.policy.GenericPoli >>>> >>> >> cyFinderModule.findPolicy(GenericPolicyFinderModule.java:100) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> >>>> com.sun.xacml.finder.PolicyFinder.findPolicy(PolicyFinder.java:16 >>>> >>> >> 4) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at com.sun.xacml.PDP.evaluateContext(PDP.java:231) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at com.sun.xacml.PDP.evaluate(PDP.java:221) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at com.sun.xacml.PDP.evaluate(PDP.java:125) >>>> >>> >> [sunxacml-1.2-melcoe.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pdp.MelcoePDPImpl.evaluate(Me >>>> >>> >> lcoePDPImpl.java:118) >>>> >>> >> [fcrepo-security-pdp-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pep.DirectPDPClient.evaluate( >>>> >>> >> DirectPDPClient.java:74) >>>> >>> >> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pep.EvaluationEngineImpl.eval >>>> >>> >> uate(EvaluationEngineImpl.java:108) >>>> >>> >> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pep.EvaluationEngineImpl.eval >>>> >>> >> uate(EvaluationEngineImpl.java:80) >>>> >>> >> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pep.EvaluationEngineImpl.eval >>>> >>> >> uate(EvaluationEngineImpl.java:60) >>>> >>> >> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.xacml.pep.ContextHandlerImpl.evalua >>>> >>> >> te(ContextHandlerImpl.java:126) >>>> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> >>>> >>> >>>> org.fcrepo.server.security.xacml.pep.rest.PEP.doFilter(PEP.java:149) >>>> >>> >> [fcrepo-security-pep-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt >>>> >>> >> er(ApplicationFilterChain.java:235) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli >>>> >>> >> cationFilterChain.java:206) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.fcrepo.server.security.jaas.AuthFilterJAAS.doFilter(AuthFi >>>> >>> >> lterJAAS.java:295) >>>> >>> >> [fcrepo-security-jaas-3.4.2.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt >>>> >>> >> er(ApplicationFilterChain.java:235) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli >>>> >>> >> cationFilterChain.java:206) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW >>>> >>> >> rapperValve.java:233) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.StandardContextValve.invoke(StandardC >>>> >>> >> ontextValve.java:191) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut >>>> >>> >> henticatorBase.java:525) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.StandardHostValve.invoke(StandardHost >>>> >>> >> Valve.java:128) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport >>>> >>> >> Valve.java:102) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn >>>> >>> >> gineValve.java:109) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap >>>> >>> >> ter.java:293) >>>> >>> >> [catalina.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprP >>>> >>> >> rocessor.java:859) >>>> >>> >> [tomcat-coyote.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHan >>>> >>> >> dler.process(Http11AprProtocol.java:574) >>>> >>> >> [tomcat-coyote.jar:na] >>>> >>> >> at >>>> >>> >> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint. >>>> >>> >> java:1527) >>>> >>> >> [tomcat-coyote.jar:na] >>>> >>> >> at java.lang.Thread.run(Thread.java:662) [na:1.6.0_24] >>>> >>> >> >>>> >>> >> Did I do something wrong with the attribute designator? The >>>> >>> >> sparql query on its own works as intended. Did I miss >>>> something? >>>> >>> >> >>>> >>> >> -- >>>> >>> >> Med Venlig Hilsen / With Best Regards >>>> >>> >> Tomasz Cielecki >>>> >>> >> http://ostebaronen.dk >>>> >>> >> >>>> >>> >> -------------------------------------------------------------- >>>> >>> >> ---------------- >>>> >>> >> AppSumo Presents a FREE Video for the SourceForge >>>> >>> Community by Eric >>>> >>> >> Ries, the creator of the Lean Startup Methodology on "Lean >>>> >>> >> Startup Secrets Revealed." This video shows you how to validate >>>> >>> your ideas, >>>> >>> >> optimize your ideas and identify your business strategy. >>>> >>> >> http://p.sf.net/sfu/appsumosfdev2dev >>>> >>> >> _______________________________________________ >>>> >>> >> Fedora-commons-users mailing list >>>> >>> >> Fedora-commons-users@lists.sourceforge.net >>>> >>> >> >>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users >>>> >>> >> >>>> >>> > >>>> >>> > >>>> >>> > >>>> >>> >>>> -------------------------------------------------------------------- >>>> >>> -- >>>> >>> > -------- >>>> >>> > AppSumo Presents a FREE Video for the SourceForge Community by >>>> >>> > Eric Ries, the creator of the Lean Startup Methodology on "Lean >>>> >>> > Startup Secrets Revealed." This video shows you how to validate >>>> >>> > your ideas, optimize your ideas and identify your business >>>> >>> > strategy. http://p.sf.net/sfu/appsumosfdev2dev >>>> >>> > _______________________________________________ >>>> >>> > Fedora-commons-users mailing list >>>> >>> > Fedora-commons-users@lists.sourceforge.net >>>> >>> > >>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users >>>> >>> > >>>> >>> >>>> >>> >>>> >>> >>>> >>> -- >>>> >>> Med Venlig Hilsen / With Best Regards >>>> >>> Tomasz Cielecki >>>> >>> http://ostebaronen.dk >>>> >>> >>>> >>> -------------------------------------------------------------- >>>> >>> ---------------- >>>> >>> AppSumo Presents a FREE Video for the SourceForge >>>> Community by Eric >>>> >>> Ries, the creator of the Lean Startup Methodology on >>>> "Lean Startup >>>> >>> Secrets Revealed." This video shows you how to validate >>>> your ideas, >>>> >>> optimize your ideas and identify your business strategy. >>>> >>> http://p.sf.net/sfu/appsumosfdev2dev >>>> >>> _______________________________________________ >>>> >>> Fedora-commons-users mailing list >>>> >>> Fedora-commons-users@lists.sourceforge.net >>>> >>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users >>>> >>> >>>> >> >>>> >> >>>> > >>>> > >>>> > >>>> > -- >>>> > Med Venlig Hilsen / With Best Regards >>>> > Tomasz Cielecki >>>> > http://ostebaronen.dk >>>> > >>>> >>>> >>>> >>>> -- >>>> Med Venlig Hilsen / With Best Regards >>>> Tomasz Cielecki >>>> http://ostebaronen.dk >>>> >>> >>> >> >> >> >> -- >> Med Venlig Hilsen / With Best Regards >> Tomasz Cielecki >> http://ostebaronen.dk >> > > > > -- > Med Venlig Hilsen / With Best Regards > Tomasz Cielecki > http://ostebaronen.dk > -- Med Venlig Hilsen / With Best Regards Tomasz Cielecki http://ostebaronen.dk ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Fedora-commons-users mailing list Fedora-commons-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-users