Skip to content

Commit 546823b

Browse files
committed
Address review comments
Signed-off-by: Rita Zhang <[email protected]>
1 parent 1ffc47b commit 546823b

File tree

1 file changed

+12
-9
lines changed
  • keps/sig-auth/3221-structured-authorization-configuration

1 file changed

+12
-9
lines changed

keps/sig-auth/3221-structured-authorization-configuration/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,10 @@ start if the configuration is invalid.
300300
The API server will periodically reload the configuration. If it changes, the
301301
new configuration will be used for the Authorizer chain. If the new configuration
302302
is invalid, the last known valid configuration will be used. The reloader will also
303-
check if the webhook exists, thereby preventing any typo/misconfiguration with the
304-
Webhook resulting in bad Authorizer config. Logging and metrics would be used to
303+
check if the webhook is healthy, thereby preventing any typo/misconfiguration with the
304+
Webhook resulting in bad Authorizer config. If healthcheck on the wehobook failed, the
305+
last known good config will be used. The time-based loop will try later and when webhook
306+
health comes back, the new config will be used. Logging and metrics would be used to
305307
signal success/failure of a config reload so that cluster admins can have
306308
observability over this process.Reload must not add or remove Node or RBAC
307309
authorizers. They can be reordered, but cannot be added or removed.
@@ -439,7 +441,7 @@ This will be incremented on round-trip of an authorizer. It will track total
439441
authorization decision invocations across the following labels.
440442

441443
Labels {along with possible values}:
442-
- `mode` {<authorizer_name>}
444+
- `mode` {<authorizer_name>} # when authorizer is a webhook, prepend `webhook_`
443445
- `decision` {Allow, Deny}
444446

445447
**Note:** Some examples of <authorizer_name>: `RBAC`, `Node`, `ABAC`, `webhook{,_<name>}`.
@@ -461,19 +463,20 @@ Labels {along with possible values}:
461463
- `name`
462464
- `code` {"incomplete_request", "bad_response", "ok"}
463465

464-
4. `apiserver_authorization_step_webhook_error_total`
466+
4. `apiserver_authorization_webhook_evaluations_fail_open_total`
465467

466-
This metric will be incremented when a webhook returns a 4xx or 5xx (erroneous) response.
468+
This metric will be incremented when a webhook returns `code != errAuthzWebhookOKCode` and
469+
decision on error is not set to `deny`.
467470

468471
Labels {along with possible values}:
469472

470473
- `name`
471-
- `code` {4xx, 5xx}
472-
- `decision` {Deny, NoOpinion}
474+
- `code` {"incomplete_request", "bad_response"}
475+
- `decision` {NoOpinion}
473476

474477
5. `apiserver_authorization_configuration_reload_last_timestamp_seconds`
475478

476-
The last time in seconds when an authorization reload was performed.
479+
This Gauge metric will record last time in seconds when an authorization reload was performed.
477480
- `status` {success, fail}
478481

479482
### Test Plan
@@ -638,7 +641,7 @@ Or, they can look at the metrics exposed by `kube-apiserver`.
638641

639642
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
640643

641-
The total number of `apiserver_authorization_step_webhook_error_total` metric with failure code
644+
The total number of `apiserver_authorization_webhook_evaluations_fail_open_total` metric with failure code
642645
is within reasonable limits. A rising value indicates issues with either the
643646
authorizer chain or the webhook itself.
644647

0 commit comments

Comments
 (0)