We're updating the issue view to help you get more done. 

CAS Authentication is not working

Steps to reproduce

Steps to reproduce:
1. Configure CAS ( https://docs.opencast.org/r/3.x/admin/configuration/security.cas/)
2. Start opencast

Actual Results:

CAS libraries does not load because dependency problems.
We are using mvn:org.jasig.cas/com.springsource.org.jasig.cas.client/3.1.12 and mvn:org.opensaml/com.springsource.org.opensaml/1.1.0 bundles for CAS
Those bundles uses a javax.servlet version 2.4, opencast is using 3.1.0

2017-07-03 11:57:54,878 | ERROR | (ShellUtil:149) - Exception caught while executing command

org.apache.karaf.shell.support.MultiException: Error executing command on bundles:

Error starting bundle 343: Uses constraint violation. Unable to resolve resource org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)] because it is exposed to package 'javax.servlet' from resources com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)] and javax.servlet-api [javax.servlet-api [29](R 29.0)] via two dependency chains.

Chain 1:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)]

Chain 2:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))

 

export: osgi.wiring.package=org.springframework.security.web; uses:=javax.servlet

org.springframework.security.web [org.springframework.security.web [333](R 333.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

javax.servlet-api [javax.servlet-api [29](R 29.0)] Unresolved requirements: [[org.springframework.security.cas [343](R 343.0)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))]

at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)

at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:69)[227:org.apache.karaf.bundle.core:4.0.8]

at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[227:org.apache.karaf.bundle.core:4.0.8]

at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[244:org.apache.karaf.shell.core:4.0.8]

at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[244:org.apache.karaf.shell.core:4.0.8]

at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]

Caused by: java.lang.Exception: Error starting bundle 343: Uses constraint violation. Unable to resolve resource org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)] because it is exposed to package 'javax.servlet' from resources com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)] and javax.servlet-api [javax.servlet-api [29](R 29.0)] via two dependency chains.

Chain 1:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)]

Chain 2:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))

 

export: osgi.wiring.package=org.springframework.security.web; uses:=javax.servlet

org.springframework.security.web [org.springframework.security.web [333](R 333.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

javax.servlet-api [javax.servlet-api [29](R 29.0)] Unresolved requirements: [[org.springframework.security.cas [343](R 343.0)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))]

at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:66)[227:org.apache.karaf.bundle.core:4.0.8]

... 12 more

Caused by: org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve resource org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)] because it is exposed to package 'javax.servlet' from resources com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)] and javax.servlet-api [javax.servlet-api [29](R 29.0)] via two dependency chains.

Chain 1:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)]

Chain 2:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))

 

export: osgi.wiring.package=org.springframework.security.web; uses:=javax.servlet

org.springframework.security.web [org.springframework.security.web [333](R 333.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

javax.servlet-api [javax.servlet-api [29](R 29.0)] Unresolved requirements: [[org.springframework.security.cas [343](R 343.0)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))]

at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.6.1.jar:]

at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.6.1.jar:]

at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.6.1.jar:]

at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38)[227:org.apache.karaf.bundle.core:4.0.8]

at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)[227:org.apache.karaf.bundle.core:4.0.8]

... 12 more

Error executing command: Error executing command on bundles:

Error starting bundle 343: Uses constraint violation. Unable to resolve resource org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)] because it is exposed to package 'javax.servlet' from resources com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)] and javax.servlet-api [javax.servlet-api [29](R 29.0)] via two dependency chains.

Chain 1:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

com.springsource.javax.servlet [com.springsource.javax.servlet [345](R 345.0)]

Chain 2:

org.springframework.security.cas [org.springframework.security.cas [343](R 343.0)]

import: (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))

 

export: osgi.wiring.package=org.springframework.security.web; uses:=javax.servlet

org.springframework.security.web [org.springframework.security.web [333](R 333.0)]

import: (&(osgi.wiring.package=javax.servlet)(version>=0.0.0))

 

export: osgi.wiring.package: javax.servlet

javax.servlet-api [javax.servlet-api [29](R 29.0)] Unresolved requirements: [[org.springframework.security.cas [343](R 343.0)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.security.web)(version>=3.1.0.RELEASE)(!(version>=3.2.0)))]

Expected Results:

CAS should work

Workaround (if any):

Status

Assignee

Unassigned

Reporter

Miguel Escriva

Severity

Non Functioning

Tags (folksonomy)

None

Components

Fix versions

Affects versions

3.0

Priority

Major