Skip to content

LG-12143 Create a vector of trust parser#9971

Merged
jmhooper merged 12 commits intomainfrom
jmhooper-vot-parser-3
Jan 29, 2024
Merged

LG-12143 Create a vector of trust parser#9971
jmhooper merged 12 commits intomainfrom
jmhooper-vot-parser-3

Conversation

@jmhooper
Copy link
Contributor

This commit introduces a service that can take a string representing a vector of trust and parse it into its components and values.

Vectors of trust are described in RFC 8485.

We are planning to use vectors of trust in our OIDC interface to allow service providers to describe the authentication and identity proofing feature set they need in place for their use case. This will be an alternative to ACR values. To that end this commit includes VoT 2 components with their own unique values. Together these form 6 valid pairs of components and values.

The P component represents identity proofing. It contains the following values:

  • 1: Identity proofing is performed
  • 2: A biometric comparison is performed as part of identity proofing (this is a future offering)

The C component represents credential usage. This essentially describes authentication features. It contains the following values:

  • 1: Password authentication + MFA - Implied for all transactions
  • 2: AL2 conformant features engaged (e.g. no remember device)
  • a: A phishing resistant authenticator is required
  • b: A PIV or CAC is required

The construction of this mapping satisfies LG-12151.

As an example for how this new tool behaves, consider the vector "C2.P1". The "P1" vector implies the "C2" vector which is already included. The "C2" vector implies the "C1" vector. This results in the vector being expanded into "C1.C2.P1".

The result that is returned form the parser includes fields for the requirements for the authentication and identity proofing transaction. It includes the following requirements:

  • aal2: AAL2 is required
  • phishing_resistant: Phishing resistant authenticators are required
  • hspd12: PIV/CAC is required
  • identity_proofing: Identity proofing is required
  • biometric_comparison: A biometric comparison is required

This allows the result to be used to describe an authentication context that can be used to construct policies that ensure the requirements for the vector of trust are met.

@jmhooper jmhooper force-pushed the jmhooper-vot-parser-3 branch from 1116b9c to b19b296 Compare January 25, 2024 16:00
This commit introduces a service that can take a string representing a vector of trust and parse it into its components and values.

Vectors of trust are described in RFC 8485.

We are planning to use vectors of trust in our OIDC interface to allow service providers to describe the authentication and identity proofing feature set they need in place for their use case. This will be an alternative to ACR values. To that end this commit includes VoT 2 components with their own unique values. Together these form 6 valid pairs of components and values.

The `P` component represents identity proofing. It contains the following values:

- `1`: Identity proofing is performed
- `2`: A biometric comparison is performed as part of identity proofing (this is a future offering)

The `C` component represents credential usage. This essentially describes authentication features. It contains the following values:

- `1`: Password authentication + MFA - Implied for all transactions
- `2`: AL2 conformant features engaged (e.g. no remember device)
- `a`: A phishing resistant authenticator is required
- `b`: A PIV or CAC is required

The construction of this mapping satisfies LG-12151.

As an example for how this new tool behaves, consider the vector "C2.P1". The "P1" vector implies the "C2" vector which is already included. The "C2" vector implies the "C1" vector. This results in the vector being expanded into "C1.C2.P1".

The result that is returned form the parser includes fields for the requirements for the authentication and identity proofing transaction. It includes the following requirements:

 - `aal2`: AAL2 is required
 - `phishing_resistant`: Phishing resistant authenticators are required
 - `hspd12`: PIV/CAC is required
 - `identity_proofing`: Identity proofing is required
 - `biometric_comparison`: A biometric comparison is required

This allows the result to be used to describe an authentication context that can be used to construct policies that ensure the requirements for the vector of trust are met.

[skip changelog]
@jmhooper jmhooper force-pushed the jmhooper-vot-parser-3 branch from 8120d79 to 04cac6c Compare January 29, 2024 15:57
private

def vot_parser_result
vector_of_trust = JSON.parse(vtr).first if vtr.present?
Copy link
Contributor

Choose a reason for hiding this comment

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

I am surprised by the JSON.parse, I'd expect an outside class to handle that? But we can also transition that easily in a future PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved it here in case we eventually want to support ["C1.P1", "C1"] in order to support ialmax for VTR users.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would have this take in an array of strings then? And always call Array(value) on the input

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it needs to be an array either way (or array of arrays initially even)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I just pushed a change:

  1. ACR values is still a string. This is necessary to parse them with the VotParser.
  2. VTR is an array. I am assuming here that upstream (perhaps in the OIDC form and in the SAML Request) we will parse the JSON into an array. This has the added benefit of allowing us to accept values that are not JSON even if that deviates from the spec.

jmhooper added a commit that referenced this pull request Jan 29, 2024
* Add the requested vectors of trust to `ServiceProviderRequest`

We are working on implementing a feature for partners to request identity proofing and authentication features using vectors of trust. This will involve sending param describing the vector of trust in the original SAML or OIDC request. Within the context of OIDC this param is named `vtr`.

This commit adds a `vtr` property to `ServiceProviderRequest`. This property is unused and unset in the persisted service provider request. This will allow us to write to it in the future and initialize `ServiceProviderRequest`s with the value without resulting in an `ArgumentError` (thus avoiding a dreaded 50/50 state bug)

This commit also adds an `acr_values` property. This is looking forward to when parameters are consumed by the parser introduced in #9971.

[skip changelog]
@jmhooper jmhooper merged commit d70e1de into main Jan 29, 2024
@jmhooper jmhooper deleted the jmhooper-vot-parser-3 branch January 29, 2024 20:55
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.

5 participants