Skip to content

How to sign a SAML assertion? #398

Answered by srd90
ajinvise asked this question in Q&A
Discussion options

You must be logged in to vote

IMHO this is more like a discussion item/question and proper place would have been https://github.com/node-saml/xml-crypto/discussions instead of issue #393.

Here is an example of signing SAML 2.0 response with xml-crypto (with version < 4.0.0): node-saml/passport-saml#836 (comment)
It is trivial to modify that example to handle just Assertion input. Just drop code related to handling of surrounding Response and make minor modifications to xpaths related to Assertion signing. Pay attention to placement of signature element in the resulting signed Assertion (for further information see example code's code comments).

btw. your example Assertion's subject confirmation's NotOnOrAfter="2020-08…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ajinvise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #393 on October 06, 2023 22:02.