Skip to content

Support Microsoft Entra ID authentication for Redis session storage #4539

Description

@Eernie

Problem

Our Azure Managed Redis has access-key authentication disabled by (org) policy, leaving Microsoft Entra ID as the only auth method. The Redis session storage (storage.session.redis) only supports static username/password, so the Nuts node currently cannot connect to such instances at all. Entra ID auth requires acquiring a token and periodically
re-issuing AUTH before it expires, which a static password config can't do.

Suggested solution

The node already uses github.com/redis/go-redis/v9, which supports a StreamingCredentialsProvider on its Options. Redis provides an official implementation for Entra ID: go-redis-entraid (managed identity, service principal, DefaultAzureCredential), which handles
token refresh automatically.

Rough shape, analogous to the existing AWS RDS IAM support (storage/rds_iam.go):

storage:
  session:
    redis:
      address: rediss://mycache.region.redis.azure.net:10000
      entraid:
        enabled: true
        clientid: "..." # optional, for user-assigned managed identity

When enabled, set opts.StreamingCredentialsProvider instead of username/password.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions