Skip to content

Conversation

@thjaeckle
Copy link
Member

Adds a new 'prerequisite-conditions' configuration option to OpenID Connect issuer configuration that allows early rejection of JWTs that don't meet certain criteria (e.g., audience validation). This enables Ditto to quickly reject tokens with a 401 before any policy/access control checks.

Configuration example:

openid-connect-issuers = {
  myprovider = {
    issuer = "localhost:9000"
    prerequisite-conditions = [
      "{{ jwt:aud | fn:filter('eq','expected-audience') }}"
    ]
    auth-subjects = ["{{ jwt:sub }}"]
  }
}

Resolves: #2277

@thjaeckle thjaeckle added this to the 3.9.0 milestone Jan 29, 2026
@thjaeckle thjaeckle self-assigned this Jan 29, 2026
… validation

Adds a new 'prerequisite-conditions' configuration option to OpenID Connect
issuer configuration that allows early rejection of JWTs that don't meet
certain criteria (e.g., audience validation). This enables Ditto to quickly
reject tokens with a 401 before any policy/access control checks.

Configuration example:
```
openid-connect-issuers = {
  myprovider = {
    issuer = "localhost:9000"
    prerequisite-conditions = [
      "{{ jwt:aud | fn:filter('eq','expected-audience') }}"
    ]
    auth-subjects = ["{{ jwt:sub }}"]
  }
}
```

Changes:
- Add PREREQUISITE_CONDITIONS config value to SubjectIssuerConfig
- Add prerequisiteConditions field to DefaultSubjectIssuerConfig and
  JwtSubjectIssuerConfig
- Add DittoHeaders parameter to JwtAuthorizationSubjectsProvider for
  correlation ID logging
- Create GatewayJwtPrerequisiteConditionNotMetException (401 error)
- Implement condition check in DittoJwtAuthorizationSubjectsProvider
- Update Helm templates for prerequisite-conditions support
- Add unit tests for prerequisite condition validation

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
Merge pull request eclipse-ditto#20 from beyonnex-io/extend-mapper-to-include-delete-fields

add test for the includeDeletedFields option
@thjaeckle thjaeckle force-pushed the feature/openid-conditions-filter branch from f31f594 to 13bb099 Compare January 29, 2026 14:53
@thjaeckle
Copy link
Member Author

@thjaeckle
Copy link
Member Author

@alstanchev could you have a look at this one, please?
One of the enhancements for better multi tenancy support

Copy link
Contributor

@alstanchev alstanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@thjaeckle thjaeckle merged commit 437b70b into eclipse-ditto:master Feb 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enhance OpenID connect configuration to configure prerequisite conditions to apply to let a presented JWT "pass"

2 participants