Skip to content

JCL-337: End-to-end test of UMA auth for Access Grants endpoints - #520

Merged
NSeydoux merged 10 commits into
mainfrom
JCL-337_access-grants-e2e
Jun 13, 2023
Merged

NSeydoux merged 10 commits into
mainfrom
JCL-337_access-grants-e2e

Conversation

@NSeydoux

Copy link
Copy Markdown
Contributor

This adds tests to verify that the expected authentication mechanism (UMA or OpenId) gets used when accessing the Access Grants endpoints (e.g. /issue)

@NSeydoux
NSeydoux force-pushed the JCL-337_access-grants-e2e branch 3 times, most recently from 061ac9e to a6e632a Compare June 12, 2023 16:23
NSeydoux added 3 commits June 12, 2023 18:24
The OpenID session was disregarding the provided authenticator, resulting in only ever using the ID Token as an Access Token instead of using the ID Token as a credential to get an UMA-issued Access Token.

If no authenticator is provided, use the ID Token as an Access Token.
- Extend base test suite with an UMA-specific scenario verifying that UMA authentication is enforced.

- Enable caching in tests

- Enable UMA auth to mock VC issuer
@NSeydoux
NSeydoux force-pushed the JCL-337_access-grants-e2e branch from a6e632a to 8df11be Compare June 12, 2023 16:29
This checks that the appropriate authenticator is being used in OpenID-specific tests
@NSeydoux
NSeydoux force-pushed the JCL-337_access-grants-e2e branch from 8df11be to 1654225 Compare June 12, 2023 16:34
import org.jose4j.lang.UncheckedJoseException;

final class Utils {
public final class Utils {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we're making this public, should we also make the other fields public? (That could also be a follow-on PR to keep this one simpler)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's no reason not to, and it would probably look more consistent. I'll open a follow-up PR.

Comment thread openid/src/main/java/com/inrupt/client/openid/OpenIdSession.java Outdated
Comment thread openid/src/main/java/com/inrupt/client/openid/OpenIdSession.java Outdated
Comment thread openid/src/main/java/com/inrupt/client/openid/OpenIdSession.java Outdated
NSeydoux added a commit that referenced this pull request Jun 12, 2023
This follows up from #520, and updates the integration test utils so that all fields are public for consistency.
NSeydoux added a commit that referenced this pull request Jun 12, 2023
This follows up from #520, and updates the integration test utils so that all fields are public for consistency.
@NSeydoux
NSeydoux marked this pull request as ready for review June 12, 2023 22:17
@NSeydoux
NSeydoux requested a review from a team June 12, 2023 22:17

@acoburn acoburn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@NSeydoux
NSeydoux merged commit c6d20b5 into main Jun 13, 2023
@NSeydoux
NSeydoux deleted the JCL-337_access-grants-e2e branch June 13, 2023 11:18
NSeydoux added a commit that referenced this pull request Jun 13, 2023
This follows up from #520, and updates the integration test utils so that all fields are public for consistency.
NSeydoux added a commit that referenced this pull request Jun 13, 2023
This follows up from #520, and updates the integration test utils so that all fields are public for consistency.
acoburn pushed a commit that referenced this pull request Jun 13, 2023
This follows up from #520, and updates the integration test utils so that all fields are public for consistency.
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.

2 participants