Eduix / crowd-shibboleth-module

Shibboleth authentication module and accompanying plugin for Atlassian Crowd
12 stars 11 forks source link

Unable to get working with Crowd 3.0.0/3.3.0 #8

Closed precurse closed 5 years ago

precurse commented 5 years ago

Hello,

I'm in the process of migrating from Crowd 2.7.2. I want to upgrade to 3.3.0, but the shibboleth-filter-config seems to say 3.0.0+. Both of these versions are giving me issues with the applicationContext-CrowdSecurity.xml:

This is the error I get when following the shibboleth-filter/README.md when trying Crowd 3.0.0:

2018-10-18 16:56:51,229 localhost-startStop-1 ERROR [ContainerBase.[Catalina].[localhost].[/crowd]] Exception sending context initialized event to listener instance of class com.atlassian.config.bootstrap.BootstrappedContextLoaderListener
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 117 in XML document from class path resource [applicationContext-CrowdSecurity.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 117; columnNumber: 136; The pre
fix "util" for element "util:constant" is not bound.

When I tried with 3.3.0, I was getting this error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 82; columnNumber: 62; cvc-complex-type.3.2.2: Attribute 'access-denied-page' is not allowed to appear in element 'security:http'.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 82 in XML document from class path resource [applicationContext-CrowdSecurity.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 82; columnNumber: 62; cvc-complex-type.3.2.2: Attribute 'access-denied-page' is not allowed to appear in element 'security:http'.

I'm wondering if there's something I'm missing? I'm confident that I'm following the install instructions verbatim, but maybe I'm missing something?

Thanks!

--- Update ---

Once I add the following to the top of the file:

xmlns:util="http://www.springframework.org/schema/util"

and

http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd

to the top of the file, I get past this error. However, I then get:

Error creating bean with name 'util:constant#1e3e794b': Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: com.atlassian.crowd.integration.springsecurity.SecurityConstants

Which, looking into it, Crowd 3.0.0 doesn't have that bean, but 3.1 does: https://docs.atlassian.com/atlassian-crowd/3.1.5/com/atlassian/crowd/integration/springsecurity/SecurityConstants.html

However, if I try using 3.1.5, I'm getting the same "access-denied-page" attribute error as I did with 3.3.0.

precurse commented 5 years ago

The issue I was having was because I was replacing the entire <security:http section with that in the README. I was able to get 3.2.5 working properly. 3.3.0 was still giving me this issue: nested exception is java.lang.ClassNotFoundException: net.nordu.crowd.shibboleth.ShibbolethSSOFilter

However, it appears it delete the atlassian home plugins folder during startup.