Skip to content
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

ImpersonatedCredentials can request 0s lifetime #526

Closed
chingor13 opened this issue Dec 16, 2020 · 0 comments · Fixed by #527
Closed

ImpersonatedCredentials can request 0s lifetime #526

chingor13 opened this issue Dec 16, 2020 · 0 comments · Fixed by #527
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chingor13
Copy link
Contributor

When going through the builder, it's possible for the lifetime value to be unset (defaulting to 0 in Java).

ImpersonatedCredentials credentials = ImpersonatedCredentials.newBuilder()
    .setScopes(ImmutableList.of("some scope"))
    .build();
// This builds, but has a lifetime of `0`

When we go to refresh the token, we don't check for 0. It's unclear what sending 0s for the lifetime value will do on the backend. In the above case where you don't specify a lifetime, it seems that you would be requesting the default (whether client specified or backend specified).

@chingor13 chingor13 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants