Skip to content

Commit

Permalink
Restrict ial and aal determination to the idp app
Browse files Browse the repository at this point in the history
This was unnecessarily leaking into the saml_idp gem. A subsequent PR in
that repo will remove these concerns there.
  • Loading branch information
vrajmohan committed Aug 29, 2024
1 parent 0177872 commit 7761db1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/models/federated_protocols/saml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

module FederatedProtocols
class Saml
IAL_PREFIX = %r{^http://idmanagement.gov/ns/assurance/ial}
AAL_PREFIX = %r{^http://idmanagement.gov/ns/assurance/aal|urn:gov:gsa:ac:classes:sp:PasswordProtectedTransport:duo}

def initialize(request)
@request = request
end
Expand All @@ -19,11 +22,15 @@ def ial
end

def requested_ial_authn_context
request.requested_ial_authn_context
request.requested_authn_contexts.find do |classref|
IAL_PREFIX.match?(classref)
end
end

def aal
request.requested_aal_authn_context
request.requested_authn_contexts.find do |classref|
AAL_PREFIX.match?(classref)
end
end

def acr_values
Expand Down

0 comments on commit 7761db1

Please sign in to comment.