Skip to content

LG-12199 Add the vot to the SAML response when it is used as an AuthnContext for SAML#10203

Closed
jmhooper wants to merge 2 commits intomainfrom
jmhooper-add-vtr-to-saml-response
Closed

LG-12199 Add the vot to the SAML response when it is used as an AuthnContext for SAML#10203
jmhooper wants to merge 2 commits intomainfrom
jmhooper-add-vtr-to-saml-response

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented Mar 5, 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="vtr" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="vtr">
        <AttributeValue>A1.B2.C3</AttributeValue>
      </Attribute>
    </AttributeStatement>

Making the VTR 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.

@jmhooper jmhooper requested review from a team, Sgtpluck and zachmargolis March 5, 2024 15:38
@jmhooper jmhooper changed the title Add the vtr to the SAML response when it is used as an AuthnContext for SAML LG-12199 Add the vtr to the SAML response when it is used as an AuthnContext for SAML Mar 5, 2024
@jmhooper jmhooper force-pushed the jmhooper-add-vtr-to-saml-response branch from e0d5af1 to 901151b Compare March 5, 2024 20:15
@jmhooper jmhooper requested a review from solipet March 6, 2024 20:04
… 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="vtr" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="vtr">
        <AttributeValue>A1.B2.C3</AttributeValue>
      </Attribute>
    </AttributeStatement>
    ```

Making the VTR 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 force-pushed the jmhooper-add-vtr-to-saml-response branch from 901151b to cf1b2b6 Compare March 8, 2024 15:59
@jmhooper jmhooper changed the title LG-12199 Add the vtr to the SAML response when it is used as an AuthnContext for SAML LG-12199 Add the vot to the SAML response when it is used as an AuthnContext for SAML Mar 8, 2024
@jmhooper jmhooper closed this Mar 8, 2024
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.

3 participants