nuts-foundation / nuts-foundation/nuts-node

Consider circuit breaker for AuthZen PDP client

Open
#4,175 0 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

Context

Issue #4144 introduces an AuthZen-compatible PDP integration for evaluating scopes when scope_policy: "dynamic" is configured. If the PDP endpoint becomes unavailable, every token request will wait for the full timeout before returning 503.

Problem

Without a circuit breaker, a down PDP causes all dynamic-policy token requests to hang for the timeout duration. This degrades the node's responsiveness even though the outcome (503) is already known after the first few failures.

Proposal

Add a circuit breaker to the AuthZen HTTP client so that after N consecutive failures, subsequent requests fail immediately until a probe request succeeds. This gives bounded, fast failure instead of repeated timeout waits.

Considerations

  • Configuration surface: failure threshold, recovery probe interval
  • State management: tracking consecutive failures per endpoint
  • Whether this should be a generic HTTP client feature or specific to the AuthZen client
  • May not be needed if operators ensure PDP reliability through monitoring — assess based on real-world usage after #4144 ships

Related

  • #4144 (parent: mixed OAuth2 scopes with configurable scope policy)

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 issue #4144 and the AuthZen HTTP client it introduces. Assess the failure behavior and resolve the open questions around threshold, probe interval, per-endpoint state, and whether the breaker belongs in the generic client or AuthZen client; done means fast failure after repeated PDP failures and recovery after a successful probe.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.