-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-12143 Create a vector of trust parser #9971
Conversation
1116b9c
to
b19b296
Compare
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]
8120d79
to
04cac6c
Compare
private | ||
|
||
def vot_parser_result | ||
vector_of_trust = JSON.parse(vtr).first if vtr.present? |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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:
- ACR values is still a string. This is necessary to parse them with the
VotParser
. - 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.
* 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]
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 performed2
: 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 transactions2
: AL2 conformant features engaged (e.g. no remember device)a
: A phishing resistant authenticator is requiredb
: A PIV or CAC is requiredThe 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 requiredphishing_resistant
: Phishing resistant authenticators are requiredhspd12
: PIV/CAC is requiredidentity_proofing
: Identity proofing is requiredbiometric_comparison
: A biometric comparison is requiredThis 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.