Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
832d0ff
[skip changelog]
Jeremy1026 Jan 25, 2023
d3ff5d1
[skip changelog]
Jeremy1026 Jan 30, 2023
0abe32f
changelog: additional clean up
Jeremy1026 Jan 30, 2023
c6913ad
changelog: Improvements, OpenID Connect Add ial and aal to userinfo r…
Jeremy1026 Feb 7, 2023
b906b7d
Use the existing constants
Jeremy1026 Feb 7, 2023
55e954b
Merge branch 'main' into jcurcio/lg-8704-add-ial-and-aal-to-userinfo-…
Jeremy1026 Feb 7, 2023
d4bbc41
Add default AAL value
Jeremy1026 Feb 7, 2023
8b221f3
With default values, don’t need to verify presence
Jeremy1026 Feb 7, 2023
780be4f
Lint cleanup
Jeremy1026 Feb 7, 2023
0348f5c
does need a blank line
Jeremy1026 Feb 7, 2023
0a51dbf
Update spec to expect URL instead of int
Jeremy1026 Feb 7, 2023
de0e998
Add feature flag for IAL and AAL in OIDC response
Jeremy1026 Feb 9, 2023
55b48bf
Merge branch 'main' into jcurcio/lg-8704-add-ial-and-aal-to-userinfo-…
Jeremy1026 Feb 9, 2023
eaf1d0f
Clean ups
Jeremy1026 Feb 9, 2023
a58da23
Remove feature flag gating
Jeremy1026 Feb 13, 2023
a206e15
Remove migration
Jeremy1026 Feb 15, 2023
a2cb484
If nil, use default
Jeremy1026 Feb 15, 2023
b8617b1
Shorten the line length for lint
Jeremy1026 Feb 15, 2023
bef3710
Revert schema from my local, un-merged migration
Jeremy1026 Feb 15, 2023
5c2ae1f
move default to openid_connect_authorize_form
Jeremy1026 Feb 15, 2023
023a7e4
Rework for lint
Jeremy1026 Feb 15, 2023
09f76ed
Remove extra line
Jeremy1026 Feb 15, 2023
031d5b8
Add tests for ial and aal in userinfo
Jeremy1026 Feb 15, 2023
381629b
Add specs for defaul aal and aal+ial in same acr
Jeremy1026 Feb 16, 2023
96af05d
Shorten lines to make lint :)
Jeremy1026 Feb 16, 2023
ae573b6
Another lint fix
Jeremy1026 Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/presenters/openid_connect_user_info_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def user_info
info.merge!(ial2_attributes) if scoper.ial2_scopes_requested?
info.merge!(x509_attributes) if scoper.x509_scopes_requested?
info[:verified_at] = verified_at if scoper.verified_at_requested?
info[:ial] = identity.ial if identity.ial.present?
info[:aal] = identity.aal if identity.aal.present?
info[:ial] = Saml::Idp::Constants::AUTHN_CONTEXT_IAL_TO_CLASSREF[identity.ial]
info[:aal] = Saml::Idp::Constants::AUTHN_CONTEXT_AAL_TO_CLASSREF[identity.aal]

scoper.filter(info)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddDefaultValueToIdentityAal < ActiveRecord::Migration[7.0]
Comment thread
Jeremy1026 marked this conversation as resolved.
Outdated
def change
change_column_default :identities, :aal, 0
Comment thread
Jeremy1026 marked this conversation as resolved.
Outdated
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_01_26_195401) do
ActiveRecord::Schema[7.0].define(version: 2023_02_06_172633) do
Comment thread
Jeremy1026 marked this conversation as resolved.
Outdated
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "pgcrypto"
Expand Down Expand Up @@ -272,7 +272,7 @@
t.datetime "last_ial1_authenticated_at", precision: nil
t.datetime "last_ial2_authenticated_at", precision: nil
t.datetime "deleted_at", precision: nil
t.integer "aal"
t.integer "aal", default: 0
t.index ["access_token"], name: "index_identities_on_access_token", unique: true
t.index ["session_uuid"], name: "index_identities_on_session_uuid", unique: true
t.index ["user_id", "service_provider"], name: "index_identities_on_user_id_and_service_provider", unique: true
Expand Down
2 changes: 1 addition & 1 deletion spec/features/openid_connect/openid_connect_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def oidc_end_client_secret_jwt(prompt: nil, user: nil, redirs_to: nil)
expect(decoded_id_token[:email]).to eq(user.email)
expect(decoded_id_token[:given_name]).to eq('John')
expect(decoded_id_token[:social_security_number]).to eq('111223333')
expect(decoded_id_token[:ial]).to eq(2)
expect(decoded_id_token[:ial]).to eq(Saml::Idp::Constants::AUTHN_CONTEXT_IAL_TO_CLASSREF[2])

access_token = token_response[:access_token]
expect(access_token).to be_present
Expand Down