Skip to content

ImpersonatedCredentials can request 0s lifetime #526

@chingor13

Description

@chingor13

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).

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions