Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute parsing error- http://digst.dk/oiosaml/basic_privilege_profile #68

Open
theroys opened this issue Jan 20, 2022 · 1 comment
Open

Comments

@theroys
Copy link

theroys commented Jan 20, 2022

OIOSAML code fails to parse attribute http://digst.dk/oiosaml/basic_privilege_profile throws following error
java.lang.ClassCastException: dk.gov.oio.saml.oiobpp.PrivilegeList cannot be cast to javax.xml.bind.JAXBElement
at dk.gov.oio.saml.oiobpp.OIOBPPUtil.parse(OIOBPPUtil.java:38)
at dk.gov.oio.saml.session.AssertionWrapper.(AssertionWrapper.java:155)
at dk.gov.oio.saml.servlet.AssertionHandler.handlePost(AssertionHandler.java:164)
at dk.gov.oio.saml.servlet.DispatcherServlet.doPost(DispatcherServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

The result is AssertionWrapper getPrivilegeList() always returns null

@TauBeblein
Copy link
Collaborator

TauBeblein commented Jan 24, 2022

In OIOSAML 3.1.0 you should also have this error log statement "Failed to parse input string: {}" it might be relevant for a solution.
I think that the unmarshalling delivered by your JAXB context is a little different from the one used in OIOBPPUtilTest.
My guess is that you have added something that marshalls the PrivilegeList, so that it's no longer handled by dk.gov.oio.saml.oiobpp.ObjectFactory, and so you are no longer getting JAXBElement as a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants