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

IdTokenCredentials fails to fetch license id claim when requested #1449

Open
sjvanrossum opened this issue Jul 29, 2024 · 0 comments · May be fixed by #1450
Open

IdTokenCredentials fails to fetch license id claim when requested #1449

sjvanrossum opened this issue Jul 29, 2024 · 0 comments · May be fixed by #1450
Labels
priority: p3 Desirable enhancement or 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

@sjvanrossum
Copy link

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)
@sjvanrossum sjvanrossum changed the title IdTokenCredentials fails to IdTokenCredentials fails to fetch license id claim when requested Jul 29, 2024
@lqiu96 lqiu96 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or 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
2 participants