Skip to content

Fix Azure join method throttling#50251

Merged
bernardjkim merged 2 commits intomasterfrom
bernard/fix-azure-join-throttling
Jan 9, 2025
Merged

Fix Azure join method throttling#50251
bernardjkim merged 2 commits intomasterfrom
bernard/fix-azure-join-throttling

Conversation

@bernardjkim
Copy link
Copy Markdown
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.

@aws-amplify-us-west-2
Copy link
Copy Markdown

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
Comment thread lib/auth/join_azure.go Outdated
@bernardjkim bernardjkim force-pushed the bernard/fix-azure-join-throttling branch from 1ba9824 to d5c1064 Compare January 9, 2025 18:04
@bernardjkim bernardjkim marked this pull request as ready for review January 9, 2025 18:34
@github-actions github-actions Bot requested review from creack and zmb3 January 9, 2025 18:34
Comment thread lib/auth/join_azure.go
@hugoShaka
Copy link
Copy Markdown
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
Copy Markdown
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
@bernardjkim bernardjkim deleted the bernard/fix-azure-join-throttling branch January 9, 2025 20:35
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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
carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 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