Skip to content

Commit 6706e65

Browse files
committed
use json tag name in the field comment
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
1 parent 7fc222e commit 6706e65

File tree

1 file changed

+12
-12
lines changed
  • keps/sig-auth/3331-structured-config-for-oidc-authentication

1 file changed

+12
-12
lines changed

keps/sig-auth/3331-structured-config-for-oidc-authentication/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ type JWTAuthenticator struct {
339339
// Required to be unique.
340340
URL string `json:"url,omitempty"`
341341

342-
// If specified, overrides the URL used to fetch discovery information.
342+
// discoveryURL if specified, overrides the URL used to fetch discovery information.
343343
// Format must be https://url/path.
344344
// Example:
345345
// curl oidc.oidc-namespace (.discoveryURL field)
@@ -369,24 +369,24 @@ type JWTAuthenticator struct {
369369

370370
```go
371371
type ClaimValidationRule struct {
372-
// Claim is the name of a required claim.
372+
// claim is the name of a required claim.
373373
// Same as --oidc-required-claim flag.
374374
// Only string claims are supported.
375375
// Mutually exclusive with expression and message.
376376
// +optional
377377
Claim string `json:"claim"`
378-
// RequiredValue is the value of a required claim.
378+
// requiredValue is the value of a required claim.
379379
// Same as --oidc-required-claim flag.
380380
// Mutually exclusive with expression and message.
381381
// +optional
382382
RequiredValue string `json:"requiredValue"`
383383

384-
// Expression is a logical expression that is written in CEL https://github.com/google/cel-go.
384+
// expression is a logical expression that is written in CEL https://github.com/google/cel-go.
385385
// Must return true for the validation to pass.
386386
// Mutually exclusive with claim and requiredValue.
387387
// +optional
388388
Expression string `json:"expression"`
389-
// Message customizes the returned error message when expression returns false.
389+
// message customizes the returned error message when expression returns false.
390390
// Mutually exclusive with claim and requiredValue.
391391
// Note that messageExpression is explicitly not supported to avoid
392392
// misconfigured expressions from leaking JWT payload contents.
@@ -417,7 +417,7 @@ type JWTAuthenticator struct {
417417

418418
```go
419419
type ClaimMappings struct {
420-
// Username represents an option for the username attribute.
420+
// username represents an option for the username attribute.
421421
// Claim must be a singular string claim.
422422
// TODO: decide whether to support a distributed claim for username (what are we required to correlate between the data retrieved for distributed claims? sub? something else?). Limit distributed claim support to OIDC things with clientID validation?
423423
// Expression must produce a string value.
@@ -427,20 +427,20 @@ type JWTAuthenticator struct {
427427
// (3) if userName.expression is set instead, result of expression is used as-is without any implicit prefix
428428
// (1) and (2) ensure backward compatibility with the --oidc-username-claim and --oidc-username-prefix flags
429429
Username PrefixedClaimOrExpression `json:"username"`
430-
// Groups represents an option for the groups attribute.
430+
// groups represents an option for the groups attribute.
431431
// Claim must be a string or string array claim.
432432
// Expression must produce a string or string array value.
433433
// "", [], missing, and null values are treated as having no groups.
434434
// TODO: investigate if you could make a single expression to construct groups from multiple claims. If not, maybe []PrefixedClaimOrExpression?
435435
// +optional
436436
Groups PrefixedClaimOrExpression `json:"groups,omitempty"`
437-
// UID represents an option for the uid attribute.
437+
// uid represents an option for the uid attribute.
438438
// Claim must be a singular string claim.
439439
// Expression must produce a string value.
440440
// TODO: this is net new, should it just be expression?
441441
// +optional
442442
UID ClaimOrExpression `json:"uid,omitempty"`
443-
// Extra represents an option for the extra attribute.
443+
// extra represents an option for the extra attribute.
444444
//
445445
// # hard-coded extra key/value
446446
// - key: "foo"
@@ -479,7 +479,7 @@ type JWTAuthenticator struct {
479479
}
480480
481481
type ClaimOrExpression struct {
482-
// Claim is the JWT claim to use.
482+
// claim is the JWT claim to use.
483483
// Either claim or expression must be set.
484484
// +optional
485485
Claim string `json:"claim"`
@@ -490,11 +490,11 @@ type JWTAuthenticator struct {
490490
491491
492492
type PrefixedClaimOrExpression struct {
493-
// Claim is the JWT claim to use.
493+
// claim is the JWT claim to use.
494494
// Either claim or expression must be set.
495495
// +optional
496496
Claim string `json:"claim"`
497-
// Prefix is prepended to claim to prevent clashes with existing names.
497+
// prefix is prepended to claim to prevent clashes with existing names.
498498
// Mutually exclusive with expression.
499499
// +optional
500500
Prefix string `json:"prefix"`

0 commit comments

Comments
 (0)