Deprecate setting for JWKS custom endpoint (#272)

* Update core

* Deprecate JWKS custom endpoint

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2024-02-19 15:22:21 +00:00 committed by GitHub
parent 52b8ea153a
commit a88688ce93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 25 deletions

View file

@ -228,8 +228,9 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
Description: descriptions["token_custom_endpoint"],
},
"jwks_custom_endpoint": schema.StringAttribute{
Optional: true,
Description: descriptions["jwks_custom_endpoint"],
Optional: true,
Description: descriptions["jwks_custom_endpoint"],
DeprecationMessage: "Validation using JWKS was removed, for being redundant with token validation done in the APIs. This field has no effect, and will be removed in a later update",
},
},
}
@ -321,9 +322,6 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
if !(providerConfig.TokenCustomEndpoint.IsUnknown() || providerConfig.TokenCustomEndpoint.IsNull()) {
sdkConfig.TokenCustomUrl = providerConfig.TokenCustomEndpoint.ValueString()
}
if !(providerConfig.JWKSCustomEndpoint.IsUnknown() || providerConfig.JWKSCustomEndpoint.IsNull()) {
sdkConfig.JWKSCustomUrl = providerConfig.JWKSCustomEndpoint.ValueString()
}
roundTripper, err := sdkauth.SetupAuth(sdkConfig)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error configuring provider", fmt.Sprintf("Setting up authentication: %v", err))