wip: add JWT
as possible AuthorizationMode
#319
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is a proof-of-concept PR in order to start a discussion around allowing users to specify pre-signed JWTs in the SDK, with the end goal being for it to be possible to use pre-signed JWTs in the Okta Terraform provider.
I will update this description with a link to the matching PR in the Terraform provider once I have submitted it.See okta/terraform-provider-okta#1237.As a reminder for context: we'd like to explore using the Okta Terraform provider in an environment where the private key is opaque to us, that is, we have a mechanism for signing JWTs with some private key, but we don't know the actual value of the private key, and so we cannot configure the provider (nor the SDK) with the private key directly.
The change to the SDK is relatively minor; instead of always generating the JWT the code can now optionally use the
WithToken
configuration option as the JWT. I'm not tied to the exact implementation below, and would be open to a new configuration option, etc.Type of PR
Test Information
There are no tests for this as it is a proof-of-concept, but I would absolutely add tests in order to get this merged.
Signoff
make fmt
on my code