Repository navigation
docs: update oidc configuration docs - #89
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideDocumentationDocument the multi-provider OIDC configuration, callback behavior, access-group authorization, and optional compute-access request setting for operators.
Update the project and user-guide descriptions to explain that deployments may use configurable login providers, with LS Login used by ELIXIR On-Cloud.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #89 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 19 19
Lines 545 545
Branches 157 157
=========================================
Hits 545 545 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 6 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/operator-guide/configuration.md" line_range="73" />
<code_context>
+ tokens), `groupsClaim`, `groupsFromUserinfo` (default `true`),
+ `computeGroups`, `adminGroups`, `groupSubgroupSeparator`. Group membership
+ derives the access tier: `adminGroups` → admin, `computeGroups` → compute,
+ otherwise user; compute actions are limited to compute and admin tiers.
+- `OIDC_REDIRECT_URI`: Callback URL registered with the identity provider.
+ Must match a redirect URI configured there. Defaults to
</code_context>
<issue_to_address>
**Users bypass compute-group restrictions**
When an authenticated user is not in a configured compute or admin group but can reach a TES or WES service that accepts Krini's client ID, `ComputeGate` enforces the tier only in the browser, while `/auth/api/token` returns an access token to any authenticated user; a user outside `computeGroups` can bypass the UI and submit directly to a TES or WES service, despite the documented restriction.
Enforce the tier restriction server-side before issuing tokens or proxying compute actions, or clarify that this configuration gates only the UI and does not enforce authorization at TES/WES services.
</issue_to_address>
### Comment 2
<location path="docs/operator-guide/configuration.md" line_range="20" />
<code_context>
-OIDC_CLIENT_SECRET=your-client-secret
+# Login providers: a JSON array; each entry configures one OIDC provider
+# (endpoints are discovered via <issuer>/.well-known/openid-configuration)
+LOGIN_PROVIDERS=[
+ {
+ "id": "ls-login",
</code_context>
<issue_to_address>
**Multiline configuration prevents login**
When an operator copies the example into either documented environment-file format, the env-file parser truncates the unquoted multiline value, while Docker rejects its continuation lines; `getLoginProviders` then receives invalid JSON and returns no providers, leaving users unable to log in.
Represent the JSON as a single-line value valid in both documented environment-file formats.
</issue_to_address>
### Comment 3
<location path="docs/operator-guide/configuration.md" line_range="74-76" />
<code_context>
+ `computeGroups`, `adminGroups`, `groupSubgroupSeparator`. Group membership
+ derives the access tier: `adminGroups` → admin, `computeGroups` → compute,
+ otherwise user; compute actions are limited to compute and admin tiers.
+- `OIDC_REDIRECT_URI`: Callback URL registered with the identity provider.
+ Must match a redirect URI configured there. Defaults to
+ `<APP_ORIGIN>/auth/api/callback`.
+- `COMPUTE_ACCESS_REQUEST_URL`: Optional URL shown to logged-in users
+ without compute access ("Request compute access").
</code_context>
<issue_to_address>
**Cross-origin callback is rejected**
When an operator configures `OIDC_REDIRECT_URI` on an origin different from `APP_ORIGIN`, the callback handler compares the configured callback origin with `APP_ORIGIN` and redirects to an internal error before exchanging the code when they differ, so the documented override cannot complete login.
Document that the override must use the same origin as `APP_ORIGIN`, or change the callback handler if cross-origin callbacks are intended.
</issue_to_address>
### Comment 4
<location path="docs/operator-guide/configuration.md" line_range="28-32" />
<code_context>
+ "issuer": "issuer-url",
+ "clientId": "your-client-id",
+ "clientSecret": "your-client-secret",
+ "scopes": [
+ "openid",
+ "profile",
+ "email",
+ "eduperson_entitlement"
+ ],
+ "groupsClaim": "eduperson_entitlement",
</code_context>
<issue_to_address>
**Sessions expire without refresh**
When an operator uses the sample scopes with a provider that requires `offline_access` to issue refresh tokens, the nonempty `scopes` list replaces the defaults and omits `offline_access`, so the provider issues no refresh token; when the access token expires, users are sent back to login.
Include `offline_access` in the example scope list.
</issue_to_address>
### Comment 5
<location path="docs/operator-guide/configuration.md" line_range="24" />
<code_context>
+ {
+ "id": "ls-login",
+ "name": "LS Login",
+ "logo": "/icon.jpg",
+ "issuer": "issuer-url",
+ "clientId": "your-client-id",
</code_context>
<issue_to_address>
**Login button logo is missing**
When an operator copies the example logo path without adding an `icon.jpg` asset, the login page uses the configured logo instead of the provider name, so this path leaves the button without its intended logo when the example is copied unchanged.
Use the repository’s existing `/ls-login-grey-wide.jpg` asset in the example, or omit the optional `logo` field.
</issue_to_address>
### Comment 6
<location path="docs/operator-guide/configuration.md" line_range="64" />
<code_context>
- include `offline_access` for refresh token support. Default:
- `openid profile email offline_access`.
+- `LOGIN_PROVIDERS`: JSON array of login provider configurations; Krini
+ offers one login button per entry on `/auth/login`. Required fields per
+ entry: `id` (unique), `issuer` (the provider's issuer URL; endpoints are
+ discovered from its `/.well-known/openid-configuration`), `clientId` and
</code_context>
<issue_to_address>
**Provider support docs contradict**
The new configuration guide says operators can configure multiple OIDC providers, while the overview says providers other than LS Login are still planned and the user guide says users log in with LS Login. Readers get conflicting guidance about whether alternate providers are supported.
Update the overview and user guide to reflect configurable OIDC providers, or clarify the scope of the new configuration guidance.
</issue_to_address>Sourcery assessment
Approval pending. 4 findings to address first.
Blocking findings: docs/operator-guide/configuration.md:73, docs/operator-guide/configuration.md:20, docs/operator-guide/configuration.md:76, docs/operator-guide/configuration.md:32
Summary by Sourcery
Document configurable OpenID Connect authentication and the associated deployment settings.
Enhancements:
Documentation: