Skip to content

Commit

Permalink
Merge #92406
Browse files Browse the repository at this point in the history
92406: ccl/jwtauthccl: allow tenants to set jwt auth settings r=kpatron-cockroachlabs a=kpatron-cockroachlabs

Previously, tenants were prevented from modifying the cluster settings that controlled jwt based auth. This prevented these customers from using external signers and made it more complicated for us to support CC
serverless cluster SSO.

This change makes it so that tenants can configure their JWT auth cluster settings. This paves the way for full support of cluster SSO in severless.

Release note (enterprise change): JWT authentication cluster settings can now be modified from within
tenants to better support serverless use cases.

Co-authored-by: Kyle Patron <kyle@cockroachlabs.com>
  • Loading branch information
craig[bot] and kpatron-cockroachlabs committed Nov 30, 2022
2 parents 4ac5789 + 4b4d925 commit 596c25e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ccl/jwtauthccl/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
// JWTAuthAudience sets accepted audience values for JWT logins over the SQL interface.
var JWTAuthAudience = func() *settings.StringSetting {
s := settings.RegisterValidatedStringSetting(
settings.TenantReadOnly,
settings.TenantWritable,
JWTAuthAudienceSettingName,
"sets accepted audience values for JWT logins over the SQL interface",
"",
Expand All @@ -41,7 +41,7 @@ var JWTAuthAudience = func() *settings.StringSetting {
// JWTAuthEnabled enables or disabled JWT login over the SQL interface.
var JWTAuthEnabled = func() *settings.BoolSetting {
s := settings.RegisterBoolSetting(
settings.TenantReadOnly,
settings.TenantWritable,
JWTAuthEnabledSettingName,
"enables or disabled JWT login for the SQL interface",
false,
Expand All @@ -53,7 +53,7 @@ var JWTAuthEnabled = func() *settings.BoolSetting {
// JWTAuthJWKS is the public key set for JWT logins over the SQL interface.
var JWTAuthJWKS = func() *settings.StringSetting {
s := settings.RegisterValidatedStringSetting(
settings.TenantReadOnly,
settings.TenantWritable,
JWTAuthJWKSSettingName,
"sets the public key set for JWT logins over the SQL interface (JWKS format)",
"{\"keys\":[]}",
Expand All @@ -65,7 +65,7 @@ var JWTAuthJWKS = func() *settings.StringSetting {
// JWTAuthIssuers is the list of "issuer" values that are accepted for JWT logins over the SQL interface.
var JWTAuthIssuers = func() *settings.StringSetting {
s := settings.RegisterValidatedStringSetting(
settings.TenantReadOnly,
settings.TenantWritable,
JWTAuthIssuersSettingName,
"sets accepted issuer values for JWT logins over the SQL interface either as a string or as a JSON "+
"string with an array of issuer strings in it",
Expand Down

0 comments on commit 596c25e

Please sign in to comment.