-
Notifications
You must be signed in to change notification settings - Fork 3
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
FI 3093: Transition to use auth info (WIP) #84
base: main
Are you sure you want to change the base?
Conversation
…s mode Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
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 really don't like all of the linting changes in this branch. The real changes in this PR are already large, and all the linting fixes make it harder to focus on what matters. This branch is also likely to be open for some time, so there's a lot of potential for conflicts due to these changes which are unrelated to the substance of this PR.
The token url is still defined as a separate input in a lot of places. Is this due to an http client relying on it? If so, I think it's worth just ditching those http clients which are doing very little and making requests using the full url.
title: 'Proof Key for Code Exchange (PKCE)', | ||
type: 'radio', | ||
default: 'false', | ||
input :url, :smart_authorization_url |
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.
The authorization url is one of the auth_info fields.
} | ||
] | ||
} | ||
|
||
input :smart_token_url, |
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.
This is an auth_info field.
:smart_token_url | ||
input :backend_services_jwks_kid, | ||
optional: true | ||
input :smart_token_url |
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.
This is an auth_info field.
@@ -30,11 +30,11 @@ class BackendServicesAuthorizationResponseBodyTest < Inferno::Test | |||
|
|||
output bearer_token: access_token | |||
|
|||
required_keys = ['token_type', 'expires_in', 'scope'] | |||
required_keys = %w[token_type expires_in scope] |
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.
Let's not use the %whatever
array forms.
:smart_token_url | ||
input :backend_services_jwks_kid, | ||
optional: true | ||
input :smart_token_url |
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.
This is an auth_info field.
:smart_token_url | ||
input :backend_services_jwks_kid, | ||
optional: true | ||
input :smart_token_url |
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.
This is an auth_info field.
:smart_token_url | ||
input :backend_services_jwks_kid, | ||
optional: true | ||
input :smart_token_url |
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.
This is an auth_info field.
end | ||
|
||
def jwt_payload | ||
{ iss:, sub:, aud:, exp:, jti: }.compact | ||
end | ||
|
||
def signing_key | ||
private_key() | ||
private_key |
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.
Get rid of this and just make the next line if private_key.nil?
.
} | ||
] | ||
} | ||
input :code, :smart_token_url |
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.
Token url is an auth_info field.
@@ -16,17 +16,18 @@ class TokenRefreshTest < Inferno::Test | |||
the Pragma response header field with a value of no-cache to be | |||
consistent with the requirements of the inital access token exchange. | |||
) | |||
input :smart_token_url, :refresh_token, :client_id, :received_scopes | |||
input :client_secret, optional: true | |||
input :smart_token_url, :refresh_token, :received_scopes |
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.
Token url and refresh token are auth_info fields. Received scopes isn't, but maybe it should be?
I'll disable the auto-lint from my editor. Regarding the other |
Aren't these tests also receiving an auth_info input, so the value could just be extracted from there? |
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
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.
Once the new core release is out, bump the core requirement in the gemspec to the new version, and update the version of this test kit to 0.5.0.dev
.
input :standalone_access_token, | ||
title: 'Access Token', | ||
description: 'The access token to be introspected. MUST be active.' | ||
input :standalone_smart_auth_info, type: :auth_info, options: { mode: 'auth' } |
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.
This should be access mode.
components: [ | ||
{ | ||
name: :auth_type, | ||
type: 'select', |
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.
You shouldn't have to specify the type for these, right?
@@ -16,22 +16,20 @@ class OpenIDTokenPayloadTest < Inferno::Test | |||
- `sub` must be a non-blank string not exceeding 255 characters in length | |||
) | |||
|
|||
REQUIRED_CLAIMS = ['iss', 'sub', 'aud', 'exp', 'iat'].freeze | |||
REQUIRED_CLAIMS = %w[iss sub aud exp iat].freeze |
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.
Please revert this change.
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Signed-off-by: Vanessa Fotso <[email protected]>
Summary
This branch fully transitions all versions of the SMART App Launch (STU1, STU2, and STU2.2) to use the
auth_info
feature for collecting authentication credentials during tests, replacing the use ofoauth_credentials
.Testing Instructions
Todo:
inferno_core
gem to its repository'smain
branch (required to customize theauth_info
authentication type options) and test theauth_type
customization.inferno_core
version.