-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drain: use authenticated ID as source of drained-by metadata #20317
Conversation
31379e8
to
3fe661c
Compare
3fe661c
to
93ea1ec
Compare
When a node is set to drain, the state store reads the auth token off the request to record `LastDrain` metadata about the token used to drain the node. This code path in the state store can't correctly handle signed Workload Identity tokens or bearer tokens that may have expired (for example, while restarting a server and applying uncompacted Raft logs). Rather than re-authenticating the request at the time of FSM apply, record the string derived from the authenticated identity as part of the Raft log entry. Fixes: #17471
93ea1ec
to
0f6f344
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
When a node is set to drain, the state store reads the auth token off the request to record `LastDrain` metadata about the token used to drain the node. This code path in the state store can't correctly handle signed Workload Identity tokens or bearer tokens that may have expired (for example, while restarting a server and applying uncompacted Raft logs). Rather than re-authenticating the request at the time of FSM apply, record the string derived from the authenticated identity as part of the Raft log entry. Fixes: #17471
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
When a node is set to drain, the state store reads the auth token off the request to record
LastDrain
metadata about the token used to drain the node. This code path in the state store can't correctly handle signed Workload Identity tokens or bearer tokens that may have expired (for example, while restarting a server and applying uncompacted Raft logs).Rather than re-authenticating the request at the time of FSM apply, record the string derived from the authenticated identity as part of the Raft log entry.
Fixes: #17471