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

Error loading SAML properties file [SWS-815] #895

Closed
gregturn opened this issue Dec 4, 2012 · 4 comments
Closed

Error loading SAML properties file [SWS-815] #895

gregturn opened this issue Dec 4, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@gregturn
Copy link
Member

@gregturn gregturn commented Dec 4, 2012

jaminh opened SWS-815 and commented

Wss4j is unable to load the properties file when it is given an absolute path. Wss4j is using the ClassLoader to load the properties file. See http://grepcode.com/file/repository.springsource.com/org.apache.ws/com.springsource.org.apache.ws.security/1.6.5/org/apache/ws/security/saml/SAMLIssuerFactory.java#SAMLIssuerFactory.getProperties%28java.lang.String%29 for how the saml properties file gets loaded by Wss4j.


Affects: 2.1.2

Issue Links:

  • #878 Ability to specify SAML properties file in Wss4jInterceptor

Referenced from: commits e014fbf

@gregturn
Copy link
Member Author

@gregturn gregturn commented Dec 4, 2012

@gregturn
Copy link
Member Author

@gregturn gregturn commented Dec 4, 2012

jaminh commented

It is probably worth mentioning that I used a ClassPathResource for specifying the saml properties location. Perhaps if I used a different kind of Resource getAbsolutePath() would just return the string I pass into it when I construct it? Ultimately I think using Resource for the parameter on the setSamlProperties() method in the Wss4jSecurityInterceptor is inappropriate since the properties file has to be on the Classpath. Perhaps it would make sense to require a ClassPathResource that way we can ensure that the file is on the classpath and that it exists, but instead of calling getFile().getAbsolutePath() we can just call getPath().

@gregturn
Copy link
Member Author

@gregturn gregturn commented Dec 5, 2012

Arjen Poutsma commented

I'm sorry for this. I thought that using a Resource would allow for more flexibility, but it turns out WSS4J is a bit picky (as always).

I have changed the Resource parameter into a String in SVN. I've also triggered a snapshot build of 2.1.3 that contains this change. Could you please try a snapshot and see if it works? See http://static.springsource.org/spring-ws/site/downloads/snapshots.html

@gregturn
Copy link
Member Author

@gregturn gregturn commented Dec 5, 2012

jaminh commented

Tried it with the snapshot and it worked. Thanks.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.