Repository navigation
Conversation
X509Svid.parse already rejected a leaf whose SPIFFE ID has no path, but verifyChain, used by SpiffeTrustManager for peer certificates, did not. Move the check into X509SvidProfile.validateLeaf so both paths enforce it. Fixes spiffe#510 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Member
|
hey @cvas22, thanks for this! Could you add a SpiffeTrustManagerTest regression asserting that both checkClientTrusted and checkServerTrusted reject a root-path leaf, even with acceptAnySpiffeId enabled? |
Cover checkClientTrusted and checkServerTrusted with a trust manager that accepts any SPIFFE ID, so the leaf path check can't be bypassed there. Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Author
|
Sure, added it in 31a44b0. It checks both checkClientTrusted and checkServerTrusted with the accept-any trust manager. thx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #510
I moved the non-root path check from X509Svid into X509SvidProfile so validateLeaf runs it too. That way SpiffeTrustManager rejects a peer leaf like
spiffe://example.orgthe same way X509Svid.parse already does, and the error message stays the same. Added a verifyChain test with a root-path leaf signed by a trusted CA, plus a changelog entry.