Skip to content

Use of PasswordProtectedTransport in the request #688

@Ptr32Void

Description

@Ptr32Void

Hi,

I am struggling to understand how to configure pysaml2 and add the RequestedAuthnContext in my requests. I have a SP and I would need to add the following SAML assertions in my request during the login:

<samlp:RequestedAuthnContext> <saml:AuthnContextClassRef> urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport </saml:AuthnContextClassRef> </samlp:RequestedAuthnContext>

I am struggling because I cannot see a configuration to apply these assertions.
I tried to implement it in different ways in the code but I cannot make it work.
I believe this is possible as I can see it from here:
https://github.com/IdentityPython/pysaml2/blob/master/src/saml2/samlp.py

I can see:
AUTHN_PASSWORD = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password" AUTHN_PASSWORD_PROTECTED = \ "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"

I also saw a test here:

def test_authn_1():

I just do not know how to reference that unfortunately. I have a simple configuration like this:

"service": {
"sp": {
"name": "BLABLA",
"allow_unsolicited": true,
"want_response_signed": false,
"logout_requests_signed": true,
"endpoints": {
"assertion_consumer_service": ["https://mywebste..."],
"single_logout_service": [["https://mywebste...", "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"]]
}
}
}

Anybody knows how to perform that request using the "saml:AuthnContextClassRef"?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions