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
// if the auth type is OIDC, the oauth-apiserver is down and as such
211
-
// we cannot properly evaluate the user and/or group subjects. Fail fast
212
-
// if the RBR has user and/or group restrictions applied if auth type is OIDC
213
-
ifisAuthOIDC {
214
-
ifrbr.Spec.UserRestriction!=nil {
215
-
returnadmission.NewForbidden(a,errors.New("auth type is OIDC and rolebinding restriction specifies user restrictions. Unable to get user information due to OIDC configuration, rejecting"))
216
-
}
217
-
218
-
ifrbr.Spec.GroupRestriction!=nil {
219
-
returnadmission.NewForbidden(a, errors.New("auth type is OIDC and rolebinding restriction specifies group restrictions. Unable to get group information due to OIDC configuration, rejecting"))
220
-
}
221
-
}
231
+
// if the auth type is OIDC, the oauth-apiserver is down and as such
232
+
// we cannot properly evaluate the user and/or group subjects. Fail fast
233
+
// if the RBR has user and/or group restrictions applied if auth type is OIDC
234
+
ifisAuthOIDC {
235
+
ifrbr.Spec.UserRestriction!=nil {
236
+
returnadmission.NewForbidden(a,errors.New("authentication type is OIDC and rolebinding restriction specifies user restrictions. Unable to get user information due to OIDC configuration, rejecting"))
237
+
}
238
+
239
+
ifrbr.Spec.GroupRestriction!=nil {
240
+
returnadmission.NewForbidden(a, errors.New("authentication type is OIDC and rolebinding restriction specifies group restrictions. Unable to get group information due to OIDC configuration, rejecting"))
241
+
}
242
+
}
222
243
checker, err:=NewSubjectChecker(&rbr.Spec)
223
244
iferr!=nil {
224
245
returnadmission.NewForbidden(a, fmt.Errorf("could not create rolebinding restriction subject checker: %v", err))
225
246
}
226
247
checkers=append(checkers, checker)
227
248
}
228
249
250
+
// If auth type is OIDC, we should never create checkers for the user/group restrictions
251
+
// so it should be ok to provide a nil group cache
0 commit comments