Skip to content

66 improve the restaction flow to use parametrized restactions#67

Merged
FrancescoL96 merged 6 commits intomainfrom
66-improve-the-restaction-flow-to-use-parametrized-restactions
Oct 27, 2025
Merged

66 improve the restaction flow to use parametrized restactions#67
FrancescoL96 merged 6 commits intomainfrom
66-improve-the-restaction-flow-to-use-parametrized-restactions

Conversation

@FrancescoL96
Copy link
Contributor

The RESTAction implementation in Authn has been improved in this PR but it introduced a breaking change for those OAuthConfig and OIDCConfig that make use of RESTActions: previously, Authn would make a copy of the Endpoint used by the RESTAction to add and use the just acquired bearer token. Then, it would also create a copy of the RESTAction to use the newly created Endpoint to access the authenticated APIs (to gather the extra user details). Finally, it deleted both the Endpoint and the RESTAction.

This process has been made redundant by the introduction of the parametrized RESTAction, which allows to passing the RESTAction additional parameters. In this breaking change, we are passing the bearer token directly in the field .token, which will be used in the Authorization Header.

The change will require adding the authorization header manually in existing RESTActions for OAuth2 and OIDC when upgrading Authn:

    headers:
    - "${ \"Authorization: Bearer \" + .token }"

To see the complete examples diffs for the existing RESTActions for both OAuth2 and OIDC: diff.

The breaking change is scheduled for Authn version 0.22.0.

@FrancescoL96 FrancescoL96 self-assigned this Oct 6, 2025
@FrancescoL96 FrancescoL96 linked an issue Oct 6, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/helpers/restaction/resolver.go 0.00% 29 Missing ⚠️
internal/routes/auth/oauth/login.go 0.00% 9 Missing ⚠️
internal/routes/auth/oidc/login.go 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@FrancescoL96 FrancescoL96 merged commit 32bbf19 into main Oct 27, 2025
3 of 4 checks passed
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.

Improve the RESTAction flow to use parametrized RESTActions

1 participant