Skip to content

Add the vot to the SAML response when it is used as an AuthnContext for SAML#10224

Merged
jmhooper merged 1 commit intomainfrom
jmhooper-add-vtr-to-saml-response
Mar 8, 2024
Merged

Add the vot to the SAML response when it is used as an AuthnContext for SAML#10224
jmhooper merged 1 commit intomainfrom
jmhooper-add-vtr-to-saml-response

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented Mar 8, 2024

In #10178 we added the ability for SAML service providers to make a request with a vector of trust in the AuthnContext. When a SAML SP does this the vector of trust that is used for the authentication transaction should be reflected to the SP in the SAML response.

The authentication context appears in 2 places in the SAML request:

  1. In the authn context for the entire transaction:

    <AuthnStatement AuthnInstant="2024-01-01T00:00:00" SessionIndex="_abc-123-def-456">
      <AuthnContext>
        <AuthnContextClassRef>A1.B2.C3</AuthnContextClassRef>
      </AuthnContext>
    </AuthnStatement>
  2. In the attribute statement. With ACR values these appeared as seperated AAL and IAL nodes. For VTRs they appear in a single VTR node:

    <AttributeStatement>
      <!-- ... -->
      <Attribute Name="vot" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="vot">
        <AttributeValue>A1.B2.C3</AttributeValue>
      </Attribute>
    </AttributeStatement>

Making the VoT appear like this required changes in 2 places:

  1. In the SAML controller the correct authn_context value was passed to the #encode_response method. This is a method from the 18f/saml_idp gem which is overriden in SamlIdpController.
  2. The AttributeAsserter was modified to recognized a VTR request and add the correct values to the AttributeStatement node in the SAML response.

… for SAML

In #10178 we added the ability for SAML service providers to make a request with a vector of trust in the AuthnContext. When a SAML SP does this the vector of trust that is used for the authentication transaction should be reflected to the SP in the SAML response.

The authentication context appears in 2 places in the SAML request:

1. In the authn context for the entire transaction:

    ```xml
    <AuthnStatement AuthnInstant="2024-01-01T00:00:00" SessionIndex="_abc-123-def-456">
      <AuthnContext>
        <AuthnContextClassRef>A1.B2.C3</AuthnContextClassRef>
      </AuthnContext>
    </AuthnStatement>
    ```

2. In the attribute statement. With ACR values these appeared as seperated AAL and IAL nodes. For VTRs they appear in a single VTR node:

    ```xml
    <AttributeStatement>
      <!-- ... -->
      <Attribute Name="vot" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="vot">
        <AttributeValue>A1.B2.C3</AttributeValue>
      </Attribute>
    </AttributeStatement>
    ```

Making the VoT appear like this required changes in 2 places:

1. In the SAML controller the correct `authn_context` value was passed to the `#encode_response` method. This is a method from the `18f/saml_idp` gem which is overriden in `SamlIdpController`.
2. The `AttributeAsserter` was modified to recognized a VTR request and add the correct values to the `AttributeStatement` node in the SAML response.

changelog: Internal, SAML, VTR support was added to SAML Response
@jmhooper jmhooper requested a review from a team March 8, 2024 18:53
@jmhooper jmhooper merged commit ad03269 into main Mar 8, 2024
@jmhooper jmhooper deleted the jmhooper-add-vtr-to-saml-response branch March 8, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants