-
Notifications
You must be signed in to change notification settings - Fork 275
IdTokenCredentials fails to fetch license id claim when requested #1449
Copy link
Copy link
Closed
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Steps to reproduce
- Create
ComputeEngineCredentialson a GCE VM. - Derive
IdTokenCredentialsfrom the above with#setOptions()containingIdTokenProvider.Option.LICENSES_TRUEand optionally the impliedIdTokenProvider.Option.FORMAT_FULL. - Observe lack of license id claims in payload.
Code example
new String(Base64.getUrlDecoder()
.decode(IdTokenCredentials.newBuilder()
.setIdTokenProvider(ComputeEngineCredentials.create())
.setTargetAudience("https://foo.bar")
.setOptions(Arrays.asList(
IdTokenProvider.Option.FORMAT_FULL,
IdTokenProvider.Option.LICENSES_TRUE))
.build()
.refreshAccessToken()
.getTokenValue()
.split("\\.")[1]),
StandardCharsets.UTF_8)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.