-
Notifications
You must be signed in to change notification settings - Fork 0
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
[get] Specify expiration of credentials #2
Conversation
@tjgq PTAL |
"type": "object" | ||
}, | ||
"expires": { | ||
"description": "The time when the credentials expire and the tool should re-validate them, formatted as ISO 8601.\n\nIf set, tools **SHOULD** not invoke the `get` command of the Credential Helper for the URI before this time has passed or before the remote service indicates the credentials are expired, revoked, or invalid for any other reason. Otherwise, tools **MAY** assume that the credentials are valid indefinitely or for a tool-specified duration before re-validating them.", |
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.
What about the corner case where the credentials (are expected to) expire in the middle of an operation?
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.
+1, recommend adding an "unless ..." clause in here.
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.
Added something to indicate that revalidating if the server returns a permission error is always ok.
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.
Also added something to allow tools to refresh early if they expect the credentials to expire mid-operation. It's up to the server to decide what to do if they do expire mid-operation
"type": "object" | ||
}, | ||
"expires": { | ||
"description": "The time when the credentials expire and the tool should re-validate them, formatted as ISO 8601.\n\nIf set, tools **SHOULD** not invoke the `get` command of the Credential Helper for the URI before this time has passed or before the remote service indicates the credentials are expired, revoked, or invalid for any other reason. Otherwise, tools **MAY** assume that the credentials are valid indefinitely or for a tool-specified duration before re-validating them.", |
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.
+1, recommend adding an "unless ..." clause in here.
"type": "object" | ||
}, | ||
"expires": { | ||
"description": "The time when the credentials expire and the tool should re-validate them, formatted as ISO 8601.\n\nIf set, tools **SHOULD** not invoke the `get` command of the Credential Helper for the URI before this time has passed or before the remote service indicates the credentials are expired, revoked, or invalid for any other reason. Otherwise, tools **MAY** assume that the credentials are valid indefinitely or for a tool-specified duration before re-validating them.", |
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.
The ISO 8601 spec allows for a (in my opinion) ridiculous number of variants, including ambiguous timestamps in the "local" timezone and esoteric formats such as week and ordinal dates. Should we require it to be in the much smaller subset defined by RFC 3339?
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.
Sounds reasonable, done
PTAL |
This was recently specified in EngFlow/credential-helper-spec#2. RELNOTES[NEW]: Bazel now repects `expires` from Credential Helpers.
This was recently specified in EngFlow/credential-helper-spec#2. RELNOTES[NEW]: Bazel now respects `expires` from Credential Helpers. Closes #21249. PiperOrigin-RevId: 608208538 Change-Id: Id168f654093c7491a40364e3988af66ad1767443
This was recently specified in EngFlow/credential-helper-spec#2. RELNOTES[NEW]: Bazel now respects `expires` from Credential Helpers. Closes bazelbuild#21249. PiperOrigin-RevId: 608208538 Change-Id: Id168f654093c7491a40364e3988af66ad1767443
This was recently specified in EngFlow/credential-helper-spec#2. RELNOTES[NEW]: Bazel now respects `expires` from Credential Helpers. Closes bazelbuild#21249. PiperOrigin-RevId: 608208538 Change-Id: Id168f654093c7491a40364e3988af66ad1767443
This was recently specified in EngFlow/credential-helper-spec#2. RELNOTES[NEW]: Bazel now respects `expires` from Credential Helpers. Closes #21249. PiperOrigin-RevId: 608208538 Change-Id: Id168f654093c7491a40364e3988af66ad1767443 Co-authored-by: Yannic Bonenberger <contact@yannic-bonenberger.com>
No description provided.