Skip to content

Add support for RFC 8693 token exchange requests#581

Merged
hadley merged 1 commit into
r-lib:mainfrom
atheriel:rfc8693-token-exchange-flow
Nov 14, 2024
Merged

Add support for RFC 8693 token exchange requests#581
hadley merged 1 commit into
r-lib:mainfrom
atheriel:rfc8693-token-exchange-flow

Conversation

@atheriel

@atheriel atheriel commented Nov 13, 2024

Copy link
Copy Markdown
Collaborator

This commit adds a new OAuth "flow" to perform the token exchange protocol described in RFC 8693. This is a pretty obscure and advanced OAuth feature, but I thought it would be nice to have some helpers to support it in httr2, anyway.

I'm not aware of that many implementations of this RFC, though there are a few to note:

Closes #460.

@atheriel
atheriel force-pushed the rfc8693-token-exchange-flow branch from 214d728 to 1641c2a Compare November 13, 2024 19:57
Comment thread R/oauth-flow-token-exchange.R Outdated
actor_token = NULL,
actor_token_type = NULL,
token_params = list()) {
oauth_client_get_token(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This implementation was much simpler than I expected 😆

This commit adds a new OAuth "flow" to perform the token exchange
protocol described in RFC 8693 [0]. This is a pretty obscure and
advanced OAuth feature, but I thought it would be nice to have some
helpers to support it in `httr2`, anyway.

I'm not aware of *that* many implementations of this RFC, though there
are a few to note:

- GCP uses it for a couple of identity federation features [1].

- Okta uses it for some advanced delegation features [2].

- Some open-source auth tools like Curity seem to support it [3], as do
  various commercial identity management platforms like Asgardeo [4].

- Posit Connect uses it to power its OAuth integration feature [5].

Closes r-lib#460.

[0]: https://datatracker.ietf.org/doc/html/rfc8693
[1]: https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials
[2]: https://developer.okta.com/docs/guides/set-up-token-exchange/main/
[3]: https://curity.io/resources/learn/token-exchange-flow/
[4]: https://wso2.com/asgardeo/docs/guides/authentication/configure-token-exchange/
[5]: https://docs.posit.co/connect/admin/integrations/oauth-integrations/

Signed-off-by: Aaron Jacobs <aaron.jacobs@posit.co>
@atheriel
atheriel force-pushed the rfc8693-token-exchange-flow branch from 1641c2a to 40b2aea Compare November 14, 2024 18:03
@atheriel

Copy link
Copy Markdown
Collaborator Author

I don't have write access to merge, you might have to do so on my behalf.

@hadley
hadley merged commit 9271f32 into r-lib:main Nov 14, 2024
@hadley

hadley commented Nov 14, 2024

Copy link
Copy Markdown
Member

I also gave you write access since you contribute quite a bit 😄

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.

Implement oauth_flow_exchange()

2 participants