nuts-foundation / nuts-foundation/nuts-node

Support Microsoft Entra ID authentication for Redis session storage

Open
#4,539 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
28
Forks
23
Avg merge
1d 10h
Merged PRs (30d)
76

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading storage/rds_iam.go and the Redis session-storage configuration, then inspect the go-redis/v9 Options usage. Check how the entraid settings should select the credentials provider instead of static credentials. Done means Azure Managed Redis can authenticate with Entra ID, including token refresh and the optional user-assigned managed identity client ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, redis
Domain
authentication, backend, cloud, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.