Skip to content

Docs: OIDC resource server guide, Keycloak and Zitadel test environment (4/7) - #894

Merged
KrzysztofPajak merged 90 commits into
developfrom
feature/oidc-guides-e2e
Oct 11, 2026
Merged

KrzysztofPajak merged 90 commits into
developfrom
feature/oidc-guides-e2e

Conversation

@KrzysztofPajak

Copy link
Copy Markdown
Member

Type: feature

Issue

Shop owners need to know how to configure the resource server with a real identity provider and how to test it. Part 4 of the OIDC stack (base: PR 3).

Solution

docs/oidc-resource-server.md: configuration reference, token-to-customer rules, errors and metadata, protecting a plugin's endpoints, step-by-step setup for Keycloak 26.8 and Zitadel v4.19, the introspection evaluation and the API users deprecation. docs/oidc/docker-compose.yml (test environment only) and docs/oidc/zitadel-email-target.js (a Zitadel Actions v2 target that adds the e-mail claims to access tokens).

Verified end to end on an app copy with Keycloak 26.8.0 and Zitadel v4.19.4 (authorization code + PKCE; the right token is accepted, a wrong audience or a missing scope is refused).

Breaking changes

None (documentation and test tooling).

Testing

  1. Start the test environment as in section 10, then follow section 6 (Keycloak) or 7 (Zitadel).
  2. Call /api with the obtained token as described, and check the refusal cases in section 4.1.

… conditions, scheme always registered

The derived audience and resource_metadata URL come from the store resolved for the request, never from the Host header. Resources with account conditions are refused until those checks exist. With the resource server disabled the Oidc scheme is still registered with no issuer and no keys, so endpoints naming it answer 401. authorization_servers publishes the Authority as configured, an http Authority requires RequireHttpsMetadata=false, garbage tokens log at Information, and the startup skips an uninstalled database.
…e request through a request customer resolver
…back-office accounts; one identity per customer
…8 and Zitadel v4.19

Web API module flag, provider switch and identity links, Keycloak resource indicators accepted with the
Audience mapper, Zitadel role assertion for user_grants, client_id instead of azp, project-wide aud, and the
target reading user.human.is_email_verified.
…thorization server metadata cannot be obtained
OIDC link records get an identifier derived from the customer (first 12 bytes of
SHA-256 over the provider name and customer id), so the primary key rejects a
second OIDC link for the same customer on MongoDB and LiteDB. A request that
loses the race to another subject gets the linked-to-another-identity refusal
instead of a second link.
… OIDC identity per customer enforced by the link id
…identity per customer enforced by the link id
Base automatically changed from feature/oidc-module-api to develop October 11, 2026 14:45
…s-e2e

# Conflicts:
#	src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerAuthenticationService.cs
#	src/Business/Grand.Business.Core/Interfaces/Customers/IUserApiService.cs
#	src/Core/Grand.Domain/Customers/UserApi.cs
#	src/Web/Grand.Web/App_Data/appsettings.json
Copilot AI balanced review requested due to automatic review settings October 11, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KrzysztofPajak
KrzysztofPajak merged commit 72eb067 into develop Oct 11, 2026
5 of 6 checks passed
@KrzysztofPajak
KrzysztofPajak deleted the feature/oidc-guides-e2e branch October 11, 2026 16:10
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.

2 participants