Skip to content

docs: record LS Login's delegation answers - #43

Merged
uniqueg merged 2 commits into
devfrom
docs/36-delegation-answers
Nov 21, 2026
Merged

uniqueg merged 2 commits into
devfrom
docs/36-delegation-answers

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Records the LS Login team's answers of 2026-11-19 on delegated access (the three comments on #36):

  • docs/testbed/delegated-access.md: warning box, summary rows (Bounded grant, Least privilege downstream, User control), Lifetime and Rotation bullets, the Bounded grant "Open." paragraph, the Least privilege and User control LS Login paragraphs, a new User control "Open." paragraph, and the questions table (second column now "Answer", one row added for logout). Testbed bullets unchanged.
  • docs/tests/index.md, docs/tests/t1-call-chain.md, docs/tests/t4-lifetime.md (from Sourcery's review): the user-control questions, T1's aud expectation and T4's reuse outcome now match the answers.
  • docs/testbed/assumptions.md: intro sentence (answers not yet checked against LS Login); A6 gets a pointer to A17 (2026-11-03 statement kept); new table A14 to A21 (the 2026-11-19 answers); C3 and C12 updated; a pointer in "What public documents say".

Where the answers and a public document differ (consent revocation: through a support request, according to the LS Login team, vs. a "Revoke consent" button described on the operator's privacy page), both are stated and the point stays open. Points not asked or not answered stay open with the reason (binding and refresh tokens from an exchange: T4; consent page: T1). T1 and T4 live observations go into #13's and #15's PRs; if they disagree, both statements are kept.

No account data, no client IDs, no tokens.

Closes #36

Light lane

Docs only: two Markdown pages, no code, configuration or CI changes. Both reviewer subagents skipped; diff reviewed by hand.

Verification

  • mkdocs build --strict: built without warnings (anchor validation on)
  • pytest: 263 passed, coverage 100% (includes tests/test_docs.py, 21 passed; no tb> lines changed)
  • pre-commit run --all-files: all hooks passed
  • CI: all checks passed on f63d6ce (CI passed, run 44919485182); all checks passed again on de47620 after the review fixes (run 44920405300), Sourcery passed

🤖 Generated with Claude Code

Apply the LS Login team's answers of 2026-11-19 to the delegated
access page and the assumptions: refresh tokens live 31 days idle,
rotate with reuse detection, and survive logout; exchanged tokens'
aud holds the requested targets and the exchanging client; users
can't review grants, and consent is revoked through support, which
differs from the operator's privacy page (both kept, still open).

New assumptions A14 to A21; C3 and C12 updated. T1 and T4 confirm
the answers live in their own PRs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Documentation

Read the dated LS Login answers and their recorded assumptions first, including the unresolved discrepancy with the public consent documentation.

  • docs/testbed/assumptions.md L30-42 (+5 small edits)

Review how the recorded answers change the delegated-access summary, implications, open questions, and guidance for the testbed.

  • docs/testbed/delegated-access.md L94-104 (+7 small edits)

Check that the related test documentation reflects the updated answers while leaving live confirmation and unresolved behavior explicit.

  • docs/tests/index.md L129-133
  • docs/tests/t1-call-chain.md L12-13
  • docs/tests/t4-lifetime.md L136

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

@uniqueg
uniqueg marked this pull request as ready for review November 21, 2026 15:31
@sourcery-ai

sourcery-ai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit de47620

#36 docs: record LS Login's answers on delegation · 2 of 3 met

# Requirement Status Notes
1 Record the delegated-access answers in delegated-access.md and assumptions.md, keeping unanswered points open with their sources. ✅ Met A17–A21 record the answers and their uncertainty; the delegated-access page updates its guidance and question table, while C11 remains sourced and open and C12 is updated.
2 Give every open LS Login question on the delegated-access page an answer and source, or mark it open with a reason. ✅ Met The table gives sourced answers or states why points remain open, including the unanswered exchange-refresh-token and consent questions.
3 Record the same answers in the M4.4 auth flow document. ❌ Not addressed The diff updates testbed documentation but does not include or update the M4.4 auth flow document.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 7 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/testbed/delegated-access.md" line_range="55" />
<code_context>
+**LS Login.** Exchanged tokens live "currently 1 hour" ([A7](assumptions.md#assumptions)), and their targets are checked against those registered for the exchanging client ([A2](assumptions.md#assumptions)). `aud` then holds the targets requested with `resource` or `audience`, **and** the client ID of the client that asked for the exchange (the LS Login team, 2026-11-19; [A19](assumptions.md#assumptions)). So an exchanged token isn't limited to the next hop: the service that obtained it would accept it as well, and so would any service that accepts tokens with its own ID among several audiences. [T1](../tests/t1-call-chain.md#what-to-record) shows it live.
</code_context>
<issue_to_address>
**T1 expects the wrong audience**

When someone follows T1 against LS Login using the team’s reported audience behavior, t1 still lists `aud` containing only the next hop as an expected result, although this page records that LS Login includes both the requested targets and the exchanging client. Live testers therefore see the team’s stated behavior as a failed expectation rather than the current answer to compare against.

Update T1’s expected `aud` result to reflect the team’s answer while recording any difference observed live.
</issue_to_address>

### Comment 2
<location path="docs/testbed/delegated-access.md" line_range="66" />
<code_context>
+**LS Login.** Its discovery document lists `https://login.aai.lifescience-ri.eu/oidc/revoke` ([What we've seen](assumptions.md#what-weve-seen)). Users probably can't review the grants they gave a service, but they can revoke their tokens themselves; where, and whether that reaches a service's refresh tokens, wasn't said. Consent can only be revoked through a support request (the LS Login team, 2026-11-19). The operator's privacy page, on the other hand, describes a "Revoke consent" button in the profile ([C12](assumptions.md#constraints)), so that's still to be cleared up. Refresh tokens probably stay valid when the user logs out: users can have several sessions, and single logout across services isn't implemented (the LS Login team, 2026-11-19). A run therefore doesn't end when the user logs out elsewhere; it ends at expiry, 31 days after the last refresh, or when it's revoked.
</code_context>
<issue_to_address>
**User revocation may leave runs active**

When a user revokes their tokens but LS Login does not revoke the service's refresh token, the paragraph says a run ends when its grant is revoked, even though it also says it is unknown whether a user's revocation reaches the service's refresh token. Users can therefore be told a run has stopped while its refresh token remains usable.

Clarify that the run ends when the workflow system successfully revokes its refresh token, and leave the effect of user-initiated revocation open.
</issue_to_address>

### Comment 3
<location path="docs/testbed/delegated-access.md" line_range="39" />
<code_context>
+- **Rotation and reuse detection:** both. Each refresh returns a new refresh token, and the one used is revoked; reuse detection is enabled (the LS Login team, 2026-11-19; [A18](assumptions.md#assumptions)). What reuse ends, the old token only or the whole grant, wasn't said: [T4](../tests/t4-lifetime.md#binding-and-reuse) shows it.
</code_context>
<issue_to_address>
**Reuse detection scope misrepresented**

When readers interpret T4's result guidance in light of the newly recorded answer, `docs/tests/t4-lifetime.md` says reuse detection ends the run and tells FOCA to report that the grant ended. That conflicts with this page, which says the LS Login team did not specify what reuse ends, and directs readers to T4 to find out; T4 therefore presents an unknown result as fact.

Revise T4's reuse-detection outcome to distinguish rejecting the reused token from revoking the remaining refresh-token grant, and leave the latter conditional on the test result.
</issue_to_address>

### Comment 4
<location path="docs/testbed/delegated-access.md" line_range="15" />
<code_context>
+| [User control](#user-control) | A list of grants to revoke; a revocation endpoint | Revocation endpoint listed; grants not listed for users; consent revoked through support, or with a profile button (sources differ); refresh tokens survive logout | Revokes, then checks that the refresh fails |
</code_context>
<issue_to_address>
**Logout behavior looks guaranteed**

When readers rely on the summary or User control section when planning run termination, the summary row and User control section state that refresh tokens survive logout and runs continue, while A20 and A21 describe these answers as probable. Readers treat uncertain termination behavior as confirmed.

Mark the logout behavior as probable in the summary and User control section, and keep the uncertainty about when runs end.

Also at `docs/testbed/delegated-access.md:66`.
</issue_to_address>

### Comment 5
<location path="docs/testbed/assumptions.md" line_range="3" />
<code_context>
 # Assumptions and constraints

-All LS Login specifics are on this page. Other pages refer to its numbers. None of this has been tested with exchanges yet, which is what the [tests](../tests/index.md) are for.
+All LS Login specifics are on this page. Other pages refer to its numbers. Most of it comes from the LS Login team's answers, and the [tests](../tests/index.md) check it with exchanges.

 ## Assumptions
</code_context>
<issue_to_address>
**Unrun checks appear verified**

When readers use the pages before live T1/T4 observations are recorded, readers can take “tests check it” and “T4 checks most of it” as confirmation that LS Login behavior has been checked live, and rely on the answers as verified; the testbed limits page says no test has ever run against LS Login.

Retain an explicit statement that the answers have not yet been verified against LS Login and distinguish planned test procedures from completed runs.

Also at `docs/testbed/delegated-access.md:6`.
</issue_to_address>

### Comment 6
<location path="docs/testbed/delegated-access.md" line_range="103" />
<code_context>
+| Can an exchange return a refresh token, limited to the next hop? | Still open: not asked, as [T4](../tests/t4-lifetime.md#can-an-exchange-return-a-refresh-token-limited-to-the-next-hop) answers it |
+| Can exchanged tokens be limited to one audience? | No: `aud` holds the requested targets and the exchanging client (the LS Login team, 2026-11-19). [T1](../tests/t1-call-chain.md#what-to-record) to confirm |
+| Does the consent page mention offline access, and for how long? | Still open: [T1](../tests/t1-call-chain.md#login-user-to-client), by looking |
+| Can users see and revoke a service's refresh tokens? | Probably not see; users can revoke their tokens themselves, consent only through a support request (the LS Login team, 2026-11-19). Still open: where users revoke tokens, and whether that or revoking consent ends a service's refresh tokens |
+| Does logging out end refresh tokens? | Probably not; single logout across services isn't implemented (the LS Login team, 2026-11-19) |
</code_context>
<issue_to_address>
**User revocation guidance stays outdated**

When readers use the test index's user-control guidance after this answer is recorded, `docs/tests/index.md` still says a user should see and withdraw the grant at LS Login, and says only the service can stop further refreshes if neither profile revocation nor logout works. That conflicts with the new answer that users can revoke their tokens themselves, leaving readers with an inaccurate account of user control.

Update the test index to record the team's answer and distinguish revoking a user's tokens from revoking consent or a service's refresh tokens.
</issue_to_address>

### Comment 7
<location path="docs/testbed/delegated-access.md" line_range="104" />
<code_context>
+| Can exchanged tokens be limited to one audience? | No: `aud` holds the requested targets and the exchanging client (the LS Login team, 2026-11-19). [T1](../tests/t1-call-chain.md#what-to-record) to confirm |
+| Does the consent page mention offline access, and for how long? | Still open: [T1](../tests/t1-call-chain.md#login-user-to-client), by looking |
+| Can users see and revoke a service's refresh tokens? | Probably not see; users can revoke their tokens themselves, consent only through a support request (the LS Login team, 2026-11-19). Still open: where users revoke tokens, and whether that or revoking consent ends a service's refresh tokens |
+| Does logging out end refresh tokens? | Probably not; single logout across services isn't implemented (the LS Login team, 2026-11-19) |
</code_context>
<issue_to_address>
**Logout answer stays missing from index**

When readers use the tests index to find the current status of logout behavior, the tests index still presents whether logout ends refresh tokens as an unanswered question for LS Login, so readers using that index don't see the team's 2026-11-19 answer and treat the behavior as wholly unknown.

Update the tests index with the team's probable answer and note that it remains unconfirmed.
</issue_to_address>

Sourcery assessment

Approval pending. 6 findings to address first.

Blocking findings: docs/testbed/delegated-access.md:55, docs/testbed/delegated-access.md:66, docs/testbed/delegated-access.md:39, docs/testbed/delegated-access.md:15, docs/testbed/assumptions.md:3, and 1 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/testbed/delegated-access.md Resolved
Comment thread docs/testbed/delegated-access.md Resolved
Comment thread docs/testbed/delegated-access.md Resolved
Comment thread docs/testbed/delegated-access.md Resolved
Comment thread docs/testbed/assumptions.md Resolved
Comment thread docs/testbed/delegated-access.md Resolved
Comment thread docs/testbed/delegated-access.md Resolved
Mark the answers as unverified against LS Login, logout behaviour
as probable, and leave open whether a user's own revocation ends a
run. Align T1's aud expectation, T4's reuse outcome and the tests
index with the 2026-11-19 answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New gaps against the linked issues

Comment thread docs/testbed/assumptions.md Resolved
@uniqueg
uniqueg merged commit df1f023 into dev Nov 21, 2026
7 checks passed
@uniqueg
uniqueg deleted the docs/36-delegation-answers branch November 21, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: record LS Login's answers on delegation

1 participant