Skip to content

Consider circuit breaker for AuthZen PDP client #4175

@stevenvegt

Description

@stevenvegt

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 Support mixed OAuth2 scopes with configurable scope policy #4144 ships

Related

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