Skip to content

docs: use generic identity provider examples - #445

Merged
uniqueg merged 2 commits into
devfrom
docs/generic-idp-examples
Oct 23, 2026
Merged

uniqueg merged 2 commits into
devfrom
docs/generic-idp-examples

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

FOCA stays generic, so this removes identity-provider-specific examples from the docs:

  • LS Login issuer https://login.elixir-czech.org/oidc/ replaced by https://login.example.org/oidc/ (already used in templates/config.yaml, the petstore examples and cloud-registry) in docs/authentication.md, docs/configuration/auth.md, docs/configuration/access-control.md and docs/migration-0.14.md; the two-issuer example now uses login.example.org and login.example.com
  • ELIXIR and GEANT group URNs replaced by urn:example:group:<name>#login.example.org, as in cloud-registry (docs/configuration/access-control.md, docs/access-control.md)
  • mentions of LS Login as the example identity provider rewritten generically (docs/authentication.md, docs/access-control.md, docs/migration-0.16.md, a comment in foca/security/auth.py)

eduperson_entitlement stays: it is a standard eduPerson attribute, not specific to one provider. ELIXIR On-Cloud branding and contact details stay. Test fixtures are unchanged (they already use login.example.org).

Light lane: docs and one code comment only, so I reviewed the diff myself instead of running the reviewer subagents.

Verification

  • mkdocs build --strict: passed
  • pre-commit run --files <changed files>: passed (ruff, semgrep, ast-grep, whitespace)
  • pytest tests/security/test_auth.py tests/test_recipes.py: 164 passed
  • grep -rniE "elixir-czech|lifescience|ls login|urn:geant|elixir-europe\.org" outside tests/: no matches left except the intended contact address

Open questions

None.

Closes #444

🤖 Generated with Claude Code

Summary by Sourcery

Use generic identity-provider examples across FOCA documentation and related authentication guidance.

Enhancements:

  • Replace identity-provider-specific examples and references throughout the documentation with generic OIDC issuer, group, and token examples.
  • Clarify generic token validation and service-client guidance without changing the supported authentication behavior.

Documentation:

  • Update authentication, access-control, configuration, and migration documentation to use generic identity-provider examples.

Chores:

  • Update the authentication security comment to remove provider-specific wording.

Replace the LS Login issuer, ELIXIR and GEANT group URNs and mentions
of LS Login as the example identity provider with the neutral
placeholders used elsewhere in FOCA and in cloud-registry
(https://login.example.org/oidc/,
urn:example:group:<name>#login.example.org), and describe identity
provider behaviour generically.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR makes documentation and one authentication code comment provider-neutral by replacing LS Login, ELIXIR, GEANT, and organization-specific examples with generic issuer URLs, group URNs, and identity-provider guidance, while preserving configuration semantics and standard claim references.

File-Level Changes

Change Details Files
Replace provider-specific issuer examples with generic example domains across authentication documentation and migration guidance.
  • Update issuer URLs in configuration snippets and migration examples.
  • Use two generic issuers in the multi-issuer service-client example.
  • Generalize token-validation and service-token explanations without changing the documented behavior.
docs/authentication.md
docs/configuration/auth.md
docs/configuration/access-control.md
docs/migration-0.14.md
docs/migration-0.16.md
Replace provider-specific group identifiers and provider references with generic identity-provider examples.
  • Change group-mapping URNs to the generic example namespace and issuer.
  • Generalize access-control guidance around user-info claims and group memberships while retaining eduperson_entitlement.
  • Remove provider-specific branding and references from authentication commentary.
docs/access-control.md
docs/authentication.md
Remove the remaining provider-specific reference from authentication code documentation.
  • Make the client-claim precedence comment provider-neutral without changing code behavior.
foca/security/auth.py

Possibly linked issues


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

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9583ae8) to head (7427ffa).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #445   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         2869      2869           
=========================================
  Hits          2869      2869           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 23, 2026 18:40

@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 1 issue

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

## Individual Comments

### Comment 1
<location path="docs/authentication.md" line_range="138" />
<code_context>
-    value, list it in `token_types` instead; note that a generic type such as
-    `JWT` does not tell access tokens apart from ID tokens either, so that
-    the `audience` is then the only safeguard.
+    header, which RFC 9068 requires to be `at+jwt`. Only if your identity
+    provider does not set the `typ` header of its access tokens, set
+    `verify_token_type: false`: then any JWT issued by a trusted issuer is
</code_context>
<issue_to_address>
**Standard token type appears invalid**

When an identity provider uses `application/at+jwt` for its access tokens, the warning says RFC 9068 requires the `typ` value to be `at+jwt`, implying that `application/at+jwt` is noncompliant or needs extra configuration. The preceding validation description and `AuthConfig` documentation say FOCA accepts both by default, which can confuse operators configuring providers that use the latter.

Clarify that FOCA accepts both documented default values and avoid implying that `application/at+jwt` is invalid under RFC 9068.
</issue_to_address>

Sourcery assessment

Approved.


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

Comment thread docs/authentication.md Resolved
@uniqueg
uniqueg merged commit 7cb15ed into dev Oct 23, 2026
23 checks passed
@uniqueg
uniqueg deleted the docs/generic-idp-examples branch October 23, 2026 18:48
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: use generic identity provider examples

1 participant