openid / openid/sharedsignals

Provide Guidance and Examples for Edge Cases in Complex Subject Matching

Open
#282 2 comments 0 reactions 1 assignee View on GitHub

@FragLegs is already working on this.

Since Jul 17, 2025.

vFuture
Dominant language
Makefile
Stars
78
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Section 8.1.3.1 (Subject Matching) defines rules for matching Complex Subjects, stating that two subjects match if all fields are undefined or identical. However, it lacks guidance on edge cases, such as nested Complex Subjects or fields with multiple values (e.g., ip-addresses).
This could lead to inconsistent matching logic.

Nested Complex Subjects

Subject 1:
{
"format": "complex",
"tenant": {
"format": "opaque",
"id": "example-a38h4792-uw2"
},
"user": {
"format": "complex",
"email": {
"format": "email",
"email": "jdoe@example.com"
}
}
}

Subject 2:
{
"format": "complex",
"tenant": {
"format": "opaque",
"id": "example-a38h4792-uw2"
},
"user": {
"format": "complex",
"email": {
"format": "email",
"email": "jdoe@example.com"
},
"role": {
"format": "opaque",
"id": "admin"
}
}
}

IP Address:

Subject 1:
{
"format": "complex",
"device": {
"format": "ip-addresses",
"ip-addresses": ["10.29.37.75", "10.29.37.76"]
}
}

Subject 2:
{
"format": "complex",
"device": {
"format": "ip-addresses",
"ip-addresses": ["10.29.37.75"]
}
}

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.