You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -109,10 +109,10 @@ Proxy flags:
109
109
OIDC flags:
110
110
111
111
--oidc-ca-file string If set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used.
112
-
--oidc-clientID string The client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.
113
112
--oidc-groups-claim string Identifier of groups in JWT claim, by default set to 'groups' (default "groups")
114
113
--oidc-groups-prefix string If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies.
115
114
--oidc-issuer string The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT).
115
+
--oidc-required-audience aud The audience that must appear in all incoming tokens' aud claim. Must be set if `oidc-issuer` is configured.
flagset.StringVar(&o.IssuerURL, "oidc-issuer", "", "The URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT).")
32
-
flagset.StringVar(&o.ClientID, "oidc-clientID", "", "The client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.")
34
+
flagset.StringVar(&o.RequiredAudience, "oidc-required-audience", "", "The audience that must appear in all incoming tokens' `aud` claim. Must be set if `oidc-issuer` is configured.")
33
35
flagset.StringVar(&o.UsernameClaim, "oidc-username-claim", "email", "Identifier of the user in JWT claim, by default set to 'email'")
34
36
flagset.StringVar(&o.GroupsClaim, "oidc-groups-claim", "groups", "Identifier of groups in JWT claim, by default set to 'groups'")
35
37
flagset.StringVar(&o.UsernamePrefix, "oidc-username-prefix", "", "If provided, the username will be prefixed with this value to prevent conflicts with other authentication strategies.")
@@ -41,6 +43,14 @@ func (o *OIDCOptions) AddFlags(flagset *pflag.FlagSet) {
41
43
42
44
func (o*OIDCOptions) Validate() []error {
43
45
varerrs []error
46
+
iflen(o.IssuerURL) ==0 {
47
+
returnerrs
48
+
}
49
+
50
+
iflen(o.RequiredAudience) ==0 {
51
+
errs=append(errs, fmt.Errorf("oidc-required-audience must be set when `oidc-issuer` is configured"))
0 commit comments