all: add support for tracking last-accessed timestamps#163
Open
creachadair wants to merge 9 commits intomainfrom
Open
all: add support for tracking last-accessed timestamps#163creachadair wants to merge 9 commits intomainfrom
creachadair wants to merge 9 commits intomainfrom
Conversation
This is preparation for adding a Reader type in the next commit. Update usage throughout.
This allows a caller to read back through the contents of an audit log. The Reader exposes a basic iterator interface.
This field can be used to report the last time the server recorded a use of each secret, where "use" is defined as any authorized query that is not the "info" operation.
This is in preparation for adding a new option for the access index.
Wire in an initial access index, and ensure it gets updated whenever we successfully authorize an operation besides "info". Note that we will update the index even if the operation reports an error, because we are using the audit log as the source of truth, and we did in fact allow the operation even if it did not wind up doing anything.
Surface the last accessed information in list and info responses.
bb30dd7 to
7da3ff3
Compare
creachadair
commented
Apr 17, 2026
Member
Author
There was a problem hiding this comment.
Best reviewed with whitespace off.
7da3ff3 to
0cdea43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The commits in this branch are independent, and can be reviewed separately.
Add a new field to the SecretInfo type, recording a last-accessed timestamp.
This reflects the last time at which the server authorized any access to a
secret other than "info" (acl.ActionInfo).
Rather than adding new data to the encrypted payload, we use the audit log to
initialize an index at startup, then maintain it in memory while the server
runs. We use the audit log timestamps as the source-of-truth, so the results
will be consistent even if the server stops/crashes and restarts.
Updates tailscale/corp#40218