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

Remove x5t Header Check #452

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Remove x5t Header Check #452

merged 2 commits into from
Nov 5, 2024

Conversation

JenGoldstrich
Copy link
Contributor

@JenGoldstrich JenGoldstrich commented Nov 4, 2024

This check exists from the days of old, and does not seem relevant anymore. When I search the Terraform AzureRM Provider for usages of the x5t header, the only references I see to it are in the now deprecated autorest library. in the go-azure-sdk it is only referenced by the Microsoft Graph package, which this plugin does not use, so this should be safe to remove.

Closes #451

This check doesn't exist on the Terraform provider, and was added in the initial commit of this builder.  It's a very old change that I do not think is required anymore

An Azure employee reported that with entra minted tokens, this validation causes failures: #451
@JenGoldstrich JenGoldstrich requested a review from a team as a code owner November 4, 2024 23:37
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the JWT spec quickly, it seems that you need to have a x5t or a kid for the JWT to be valid.
That said, the validation can be left as a responsibility to the Azure APIs, since they'll have to make sure the JWT is valid before accepting it, so I trust they do a better job at sticking to the specification than us.

In the end, LGTM over here, this'll likely accept more tokens, I'm not knowledgeable enough about JWTs to ensure that we don't too broadly accept those tokens, but I trust Azure will be the ones doing the validation on the token upstream so we should be safe.

@JenGoldstrich JenGoldstrich merged commit 52c9d7b into main Nov 5, 2024
12 checks passed
@JenGoldstrich JenGoldstrich deleted the remove_x5t_validation branch November 5, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packer rejects valid OIDC token: client_jwt is missing the x5t header value
2 participants