Skip to content

IdTokenCredentials fails to fetch license id claim when requested #1449

Closed
@sjvanrossum

Description

@sjvanrossum

Steps to reproduce

  1. Create ComputeEngineCredentials on a GCE VM.
  2. Derive IdTokenCredentials from the above with #setOptions() containing IdTokenProvider.Option.LICENSES_TRUE and optionally the implied IdTokenProvider.Option.FORMAT_FULL.
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions