Repository navigation
feat(oauth2): Apply default lifetime to service grants - #1645
Draft
millionsouls wants to merge 1 commit into
Draft
millionsouls wants to merge 1 commit into
millionsouls wants to merge 1 commit into
Conversation
Service grants created withput expires_at on a client with no max_grant_lifetime were previously permanent. They now expire after the configured [oauth2]access_token_lifetime_minutes. Explicitly declared expiries function the same as before. Lifetime calculation moves into a shared deadline_after helper that returns a provider error instead of panicking on zero or out of range values. Docs are updated, added unit tests to cover default, configured, and zero/out of range cases. Signed-off-by: Kevin <36448536+millionsouls@users.noreply.github.com>
| /// and intersected with the grantor's live roles at every redemption. | ||
| pub role_ids: Vec<String>, | ||
| /// Expiry; `None` = until revoked. | ||
| /// Expiry. Always set for grants created with a default lifetime; |
| /// and intersected with the grantor's live roles at every redemption. | ||
| pub role_ids: Vec<String>, | ||
| /// Expiry; `None` = until revoked. | ||
| /// Expiry. Always set for grants created with a default lifetime; |
This branch has not been deployed
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.
Summary
Service grants created withput expires_at on a client with no max_grant_lifetime were previously permanent. They now expire after the configured [oauth2]access_token_lifetime_minutes. Explicitly declared expiries function the same as before. Lifetime calculation moves into a shared deadline_after helper that returns a provider error instead of panicking on zero or out of range values. Docs are updated, added unit tests to cover default, configured, and zero/out of range cases.
Test plan
cargo test -p openstack-keystone-core service_grant
cargo test -p openstack-keystone-core test_create_
cargo test -p openstack-keystone-core-types service_grant
cargo test -p openstack-keystone-api-types --all-features