Closed ericnorris closed 10 months ago
As the API supports this, the SDK should as well. We need to write some tests around this PR and as well as explanation and usage documentation in the README.
This PR has been marked stale because there has been no activity within the last 28 days. To keep this PR active, remove the stale
label.
This is now supported in v3
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 https://github.com/okta/terraform-provider-okta/pull/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