openid / openid/sharedsignals

Adding/removing subjects with the "aliases" format

Open
#288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

If a subject with the "aliases" format (RFC 9493 Subject Identifiers for Security Event Tokens, Section 3.2.8. Aliases Identifier Format) is added to a stream using the Add Subject Endpoint (OpenID Shared Signals Framework Specification 1.0, Section 8.1.3.2. Adding a Subject to a Stream) like below,

POST /ssf/subjects:add HTTP/1.1
Host: transmitter.example.com
Authorization: Bearer eyJ0b2tlbiI6ImV4YW1wbGUifQo=

{
  "stream_id": "f67e39a0a4d34d56b3aa1bc4cff0069f",
  "subject": {
    "format": "aliases",
    "identifiers": [
      {
        "format": "email",
        "email": "user@example.com"
      },
      {
        "format": "phone_number",
        "phone_number": "+12065550100"
      },
      {
        "format": "email",
        "email": "user+qualifier@example.com"
      }
    ]
  }
}

and then a subject with one of the aliases is removed from the stream using the Remove Subject Endpoint like below,

POST /ssf/subjects:remove HTTP/1.1
Host: transmitter.example.com
Authorization: Bearer eyJ0b2tlbiI6ImV4YW1wbGUifQo=

{
  "stream_id": "f67e39a0a4d34d56b3aa1bc4cff0069f",
  "subject": {
    "format": "email",
    "email": "user@example.com"
  }
}

how should the transmitter behave? Should events related to {"format":"email", "email":"user@example.com"} be still delivered via the stream or not?

Likewise, if two Add Subject calls with a simple subject are performed like below,

POST /ssf/subjects:add HTTP/1.1
Host: transmitter.example.com
Authorization: Bearer eyJ0b2tlbiI6ImV4YW1wbGUifQo=

{
  "stream_id": "f67e39a0a4d34d56b3aa1bc4cff0069f",
  "subject": {
    "format": "email",
    "email": "user@example.com"
  }
}
POST /ssf/subjects:add HTTP/1.1
Host: transmitter.example.com
Authorization: Bearer eyJ0b2tlbiI6ImV4YW1wbGUifQo=

{
  "stream_id": "f67e39a0a4d34d56b3aa1bc4cff0069f",
  "subject": {
    "format": "phone_number",
    "phone_number": "+12065550100"
  }
}

and then a Remove Subject request including the added subjects as aliases is made like below,

POST /ssf/subjects:remove HTTP/1.1
Host: transmitter.example.com
Authorization: Bearer eyJ0b2tlbiI6ImV4YW1wbGUifQo=

{
  "stream_id": "f67e39a0a4d34d56b3aa1bc4cff0069f",
  "subject": {
    "format": "aliases",
    "identifiers": [
      {
        "format": "email",
        "email": "user@example.com"
      },
      {
        "format": "phone_number",
        "phone_number": "+12065550100"
      }
    ]
  }
}

how should the transmitter behave? Should events related to the subjects be still delivered via the stream or not?

In other words, the question is whether an Add Subject / Remove Subject request with "format":"aliases" should be treated as a bulk operation on the subject identifiers listed in the "identifiers" array.

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.

Research direction

Read RFC 9493 Section 3.2.8 and the OpenID Shared Signals Framework Sections 8.1.3.2 and the Remove Subject Endpoint. Determine the intended behavior for adding and removing aliases, including whether aliases represent a bulk operation. Done means the specification clearly answers both examples.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.