Skip to content

Request to make ImdsManagedIdentityCredential timeout configurable when used in DefaultAzureCredential #1519

@NicoSaaiman

Description

@NicoSaaiman

The timeout in question is currently limited to 1 second and in addition to that, is also set to private. In my case I've had to resort to a custom handler to circumvent this limitation. (which is way too strict) The convenience of DefaultAzureCredential makes it the go-to for many and anyone hoping to make use of the Managed Identity portion of it will be hamstrung by this limitation. Please consider making this configurable.

            DefaultAzureCredentialEnum::ManagedIdentity(credential) => {
                // IMSD timeout is only limited to 1 second when used in DefaultAzureCredential
                credential
                    .get_token(resource)
                    .timeout(Duration::from_secs(1))
                    .await
                    .context(
                        ErrorKind::Credential,
                        "getting managed identity credential timed out",
                    )?
                    .context(
                        ErrorKind::Credential,
                        "error getting managed identity credential",
                    )
            }

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions