Skip to content

LG-12674 Ensure requested VTR is logged in SAML and OIDC endpoints#10311

Merged
jmhooper merged 6 commits intomainfrom
jmhooper-add-vtr-logging
Mar 27, 2024
Merged

LG-12674 Ensure requested VTR is logged in SAML and OIDC endpoints#10311
jmhooper merged 6 commits intomainfrom
jmhooper-add-vtr-logging

Conversation

@jmhooper
Copy link
Contributor

This commit adds logging to ensure we have visibility into the VTR param that is sent by a service provider using SAML or OIDC.

When the param is sent it is expanded to include implied components. For example, “Pb” will be expanded into “C1.C2.P1.Pb”. For debugging purposes we will want visibility into what the service provider actually requests.

Additionally, when looking at SP redirects that are served it may be helpful to see the VTR and ACR values that were operated on.

This addresses this concern on the following events:

  • OpenID Connect: authorization request
  • SAML Auth
  • SAML Auth Request
  • SP redirect initiated

This commit also updates the SAML request logging params in analytics_events to be inclusive of what is actually logged.

OpenID Connect: authorization request

This request already has a vtr value that is logged. However this is the parsed VTR value. If the VTR cannot be parsed this value is nil. This commit adds a new vtr_param value that includes the raw, unparsed vtr param.

SAML Auth

This event logs the result from SamlRequestValidator#call which includes the AuthnContext as an extra analytic attribute. This is where the raw VTR is read from. No changes were necessary here besides better documentation of the params.

SAML Auth Request

This commit added logging of the AuthnContext here to include both the raw ACR values and VTR param that are requested.

SP redirect initiated

This commit added logging of the vtr and acr_values that are present in sp_session. This will allow us to see the ACR and VTR values that were operated on.

This commit adds logging to ensure we have visibility into the VTR param that is sent by a service provider using SAML or OIDC.

When the param is sent it is expanded to include implied components. For example, “Pb” will be expanded into “C1.C2.P1.Pb”. For debugging purposes we will want visibility into what the service provider actually requests.

Additionally, when looking at SP redirects that are served it may be helpful to see the VTR and ACR values that were operated on.

This addresses this concern on the following events:

- OpenID Connect: authorization request
- SAML Auth
- SAML Auth Request
- SP redirect initiated

This commit also updates the SAML request logging params in `analytics_events` to be inclusive of what is actually logged.

### OpenID Connect: authorization request

This request already has a `vtr` value that is logged. However this is the parsed VTR value. If the VTR cannot be parsed this value is nil. This commit adds a new `vtr_param` value that includes the raw, unparsed `vtr` param.

### SAML Auth

This event logs the result from `SamlRequestValidator#call` which includes the AuthnContext as an extra analytic attribute. This is where the raw VTR is read from. No changes were necessary here besides better documentation of the params.

### SAML Auth Request

This commit added logging of the AuthnContext here to include both the raw ACR values and VTR param that are requested.

### SP redirect initiated

This commit added logging of the `vtr` and `acr_values` that are present in `sp_session`. This will allow us to see the ACR and VTR values that were operated on.

[skip changelog]
@jmhooper
Copy link
Contributor Author

This is a draft because I expect many tests to fail due to changed analytics attributes. I'll mark it ready for review when I have addressed those.

@jmhooper jmhooper marked this pull request as ready for review March 26, 2024 20:45
@jmhooper jmhooper requested a review from a team March 26, 2024 20:45
Copy link
Contributor

@theabrad theabrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmhooper jmhooper merged commit 4cf0a77 into main Mar 27, 2024
@jmhooper jmhooper deleted the jmhooper-add-vtr-logging branch March 27, 2024 16:50
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