Skip to content

Support WSS4J subject cert constraints #135

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

Conversation

runeflobakk
Copy link
Contributor

@runeflobakk runeflobakk commented Mar 11, 2019

If no Subject DN Certificate Constraint has been configured for the case described here http://koenserneels.blogspot.com/2013/09/ws-security-using-binarysecuritytoken.html WSS4J emits the following warning:

WARN - org.apache.wss4j.common.crypto.CryptoBase - No Subject DN Certificate Constraints were defined. This could be a security issue

CryptoBase.java

This PR is a work-in-progress for adding support for configuring Subject DN Certificate Constraint for WSS4J (SIG_SUBJECT_CERT_CONSTRAINTS ).

More info in JIRA-issue: https://jira.spring.io/browse/SWS-1058
Issue: #1124

A comma separated String of regular expressions which will be applied to the subject DN of the certificate used for signature validation, after trust verification of the certificate chain associated with the certificate.
https://ws.apache.org/wss4j/config.html
@pivotal-issuemaster
Copy link

@runeflobakk Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@runeflobakk Thank you for signing the Contributor License Agreement!

@runeflobakk runeflobakk changed the title [WIP] Support WSS4J subject cert constraints Support WSS4J subject cert constraints Feb 9, 2020
@runeflobakk
Copy link
Contributor Author

Is it something I can do to enable some progress on this pull request? Thank you.

@gregturn gregturn changed the base branch from master to main April 7, 2021 15:50
@free-ice
Copy link

Not affiliated with Spring but it looks like you could add test cases.
In particual there should be one test to verify that changes do not change defaults when option is not set by user, and then a test to verify behavior when set.
FYI:ws-proxy is a real asset, thanks ! FYI: wss4j 2.4.0 adds MS compatability for IssuerSerial DN

@snicoll
Copy link
Member

snicoll commented Mar 7, 2025

@runeflobakk sorry for the delay in reviewing this PR. Test cases that demonstrates the warning is gone with the change would be good (i.e. reverting the main code and running the tests would issue the warning). Also, is this still relevant?

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Mar 7, 2025
@runeflobakk
Copy link
Contributor Author

@snicoll It looks like this has been fixed in #1419 ? (thanks @wandi34 )
I am fine with closing this old pull-request, and the referred issue #1124. Thanks for following up!

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 7, 2025
@snicoll
Copy link
Member

snicoll commented Mar 7, 2025

@runeflobakk thank you very much for following-up so quickly. Let's continue the review in #1124. As I mentioned in #1456, I had to reset main to 4.0.x to clean things up and the PR you've referenced has been temporarily removed. I hope to be able to restore that for an upcoming 4.1.0-M1 release.

@snicoll snicoll closed this Mar 7, 2025
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants