profileMapper: a class implementing the profile mapper. This is used to render the claims type information (using the metadata property). See PassportProfileMapper for more information.
endpointPath: this is the full path in your server to the auth route. By default the metadata handler uses the metadata request route without /FederationMetadata/2007..blabla.
Note: If x-forwarded-host or x-forwarded-proto are received during the HTTP request to the metadata endpoint the urls contained in the metadata will use those them as host or protocol respectively instead of the original ones from request.headers.host and request.protocol.
Logout - SLO (Single Logout)
Starting on version v2.0 Single Logout is supported (SAML 2.0 Single Logout Profile). General support for SLO among Session Participants is varies a lot. This module supports the following flows:
IdP Initiated: a logout is initiated by invoking the GET logout endpoint specified in the IdP metadata. The IdP creates a signed SAML LogoutRequest and propagates it to the involved Session Participants.
SP Initiated: a Session Participant starts a SLO by sending a SAML LogoutRequest to the IdP. The IdP propagates it to the involved Session Participants.
Both flows need the IdP to accept SAML LogoutResponses from the Session Participants. This is also supported by this module.
An empty object. It is REQUIRED if you want to use SLO
clearIdPSession
Notes
options.cert: This is the public certificate of the IdP
options.key: This is the private key of the IdP. The IdP will sign its SAML LogoutRequest and LogoutResponse with this key.
options.store: Since the logout flow will involve several requests/responses, we need to keep track of the transaction state. The default implementation uses req.session to store the transaction state via the 'flowstate' module
options.sessionParticipants: Will handle SessionParticipant objects. Each SessionParticipant object needs to have the following structure:
var sessionParticipant = { serviceProviderId : 'https://foobarsupport.zendesk.com', // The Issuer (Session Participant id) nameId: 'foo@example.com', // NameId Of the logged in user in the SP nameIdFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', // Format of the NameId sessionIndex: '1', // The session index generated by the IdP serviceProviderLogoutURL: 'https://foobarsupport.zendesk.com/logout', // The logout URL of the Session Participant cert: sp1_credentials.cert, // The Session Participant public certificate, used to verify the signature of the SAML requests made by this SP binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST' // Optional, participant-specific binding to use during SLO, if not provided - will use "protocolBinding" from provided options};
In some situations it is possible for session participants to have mixed bindings during one Single Log Out (SLO) transaction. By default the library will use the binding specified in options.protocolBinding, however if mixed bindings must be used - each participant must have the binding specified as an additional field. If the binding value is invalid - it will fall back to HTTP-POST.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.