server: keep auth applier when an alarm is raised - #22386
Conversation
Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vivekpatani The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@vivekpatani: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
etcd uses a chain of appliers to apply each request. The auth applier is the first item in the chain. It checks permissions.
When the database becomes full, etcd sets the
NOSPACEalarm. The alarm handler then builds a new chain. The new chain is not correct. It does not contain the auth applier.While the alarm is active, etcd does not check permissions for these operations:
AuthDisable,AuthEnable, and all user and role operationsDeleteRangeLeaseRevokeA user needs write permission for only one key prefix. The user writes data to that prefix until the database is full. This makes the alarm active. The user can then stop authentication for the cluster.
Note:
Steps to reproduce
/tenant/to/tenant0./secret/key.--quota-backend-bytesto a small value. Then restart the member./secret/key/secret/key/tenant/fill. Repeat this step until etcd shows the error database space exceeded.Result: In step 6, etcd refuses all three operations. In step 8, etcd refuses the read operation, but etcd permits the delete operation and the AuthDisable operation.
Expected result: etcd refuses all three operations in step 8.