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

Fix Azure join method throttling #50251

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Conversation

bernardjkim
Copy link
Contributor

@bernardjkim bernardjkim commented Dec 13, 2024

Supports https://github.com/gravitational/teleport.e/issues/2164

The current implementation of the Azure join method requires Teleport to list all VMs in an Azure subscription in order to verify the joining VM. This is problematic when there are a large number of VMs in an Azure subscription, and in some cases causes throttling due to Azure API rate limits.

This PR modifies the validation step of the Azure join method. Validation no longer requests the VM instance from the Azure API. Instead, Teleport validates the joining VM using the optional claims provided in the JWT. This removes the need to query the Azure VM API and the risk of throttling. If the validation with claims method fails, Teleport will fallback to previous validation method using the VM.

Todo: Attempt VM validation using Resource Graph API before attempting VM validation with ListAllVMs API.
Changelog: Fixes an issue causing Azure join method to fail due to throttling.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-50251.d3pp5qlev8mo18.amplifyapp.com

@bernardjkim bernardjkim force-pushed the bernard/fix-azure-join-throttling branch from 5ee9911 to 32df16f Compare December 14, 2024 01:58
lib/auth/join_azure.go Outdated Show resolved Hide resolved
@hugoShaka
Copy link
Contributor

Is the TODO from the PR description still valid?

Todo: Attempt VM validation using Resource Graph API before attempting VM validation with ListAllVMs API.

@bernardjkim
Copy link
Contributor Author

Is the TODO from the PR description still valid?

This todo is out of scope for this PR. But it is something we should consider implementing in the case that verification via claims is unavailable in some Azure environments.

@bernardjkim bernardjkim added this pull request to the merge queue Jan 9, 2025
Merged via the queue into master with commit 792eaa7 Jan 9, 2025
41 checks passed
@bernardjkim bernardjkim deleted the bernard/fix-azure-join-throttling branch January 9, 2025 20:35
@public-teleport-github-review-bot

@bernardjkim See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed

bernardjkim added a commit that referenced this pull request Jan 9, 2025
bernardjkim added a commit that referenced this pull request Jan 9, 2025
* Validate Azure join using JWT claims

* Add note about User-Agent
bernardjkim added a commit that referenced this pull request Jan 9, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2025
* Validate Azure join using JWT claims

* Add note about User-Agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants