Skip to content

Indefinite hang when getting token #55

@hmillerbakewell

Description

@hmillerbakewell

Generating credentials hangs indefinitely / crashes on the standard python:3.13 docker image.

Minimal Setup

The following code causes the problem:

from redis_entraid.cred_provider import create_from_managed_identity, ManagedIdentityType, ManagedIdentityIdType

provider = create_from_managed_identity(
    identity_type=ManagedIdentityType.USER_ASSIGNED,
    resource="https://redis.azure.com",
    id_type=ManagedIdentityIdType.CLIENT_ID,
    id_value="<My Azure Service ID>"
)

return provider.get_credentials()

System details:

  • The above code works correctly when run on Ubuntu 24.04.2 LTS (full specs below)
  • Running that code within a docker image (FROM python:3.13) on that Ubuntu machine causes an indefinite hang
  • Running that code within a docker image (FROM python:3.13) running as an Azure Container App forces the container app to crash and restart

Here are the further system details of the host machine (where things are working):

Icon name: computer-vm
Chassis: vm 🖴
Virtualization: microsoft
Operating System: Ubuntu 24.04.2 LTS              
Kernel: Linux 6.14.0-1013-azure
Architecture: x86-64
Hardware Vendor: Microsoft Corporation
Hardware Model: Virtual Machine
Firmware Version: Hyper-V UEFI Release v4.1
Firmware Date: Mon 2024-05-13
Firmware Age: 1y 5month 4d

The Azure Container App is running on 1 CPU core with 2 Gi memory.

EDIT: Relevant parts of pip freeze:

redis-entraid==1.0.0
azure-common==1.1.28
redis==6.4.0
azure-identity==1.20.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions