Skip to content

WAL-1321 - #2158

Draft
waltkb wants to merge 17 commits into
mainfrom
feat/wal-1321
Draft

WAL-1321#2158
waltkb wants to merge 17 commits into
mainfrom
feat/wal-1321

Conversation

@waltkb

@waltkb waltkb commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds Issuer2RouteSurface and Verifier2RouteSurface so a deployment can register only the OpenID4VCI and OpenID4VP routes it actually exposes. The license operations server is the first consumer: it issues through the pre-authorized code flow and only receives wallet presentations for heartbeats, so it must not publish session-create, VICAL fetch, authorization-code, or external-login endpoints on an internet-facing process.

Unregistered groups stay out of the Ktor routing tree and answer 404. They are not hidden behind a guard or a gateway rule. Defaults remain the full set, so issuer-api2, verifier-api2, and their existing tests are unchanged.

Ticket: WAL-1321.

Related PRs:

What Changed

Verifier route surfaces

  • Verifier2Service.registerRoute now takes a surfaces set.
  • SESSION_MANAGEMENT is the operator surface (POST create, session info, SSE). It accepts a caller-supplied DCQL query and verification policies.
  • CLIENT is the wallet-facing request/response surface.
  • TRANSACTION_DATA_PROFILES and VICAL (POST vical/fetch pulls a caller-supplied URL) are optional independently.
  • clientOnly is the convenience set for a deployment that only needs to receive presentations.

Issuer route surfaces

  • OpenId4VciController.register now takes a surfaces set.
  • Groups are METADATA, ISSUANCE, CREDENTIAL_OFFER_BY_REFERENCE, AUTHORIZATION_CODE, and EXTERNAL_LOGIN.
  • preAuthorizedCodeOnly is metadata plus token/nonce/credential: enough to redeem a by-value pre-authorized offer.
  • Excluding EXTERNAL_LOGIN also removes the only authenticate("auth-oauth") block in the controller, so that provider does not need to be installed.

Architecture Notes

  • Surfaces are registration-time, not request-time. An unused route is absent, which is the property the license server E2E tests assert.
  • Full-service defaults keep this additive for OSS issuer and verifier deployments.
  • The license server is the deployment that must pass clientOnly / preAuthorizedCodeOnly. That wiring lives in walt-id/waltid-identity-enterprise-license#11, not in this repository.

Caveats and Follow-Ups

  • This repository does not yet have a unit test that a restricted surface answers 404. Coverage for the license deployment is in the license-server E2E tests on the counterpart PR.
  • Published issuer-api2 / verifier-api2 images keep the full surface until a deployment opts in.

Breaking

  • None. New parameters default to the previous full route set.

waltkb added 2 commits August 26, 2026 00:30
Verifier2Service.registerRoute registered the whole verifier surface, so every
deployment also exposed the management routes: POST verification-session/create
accepts a caller-supplied DCQL query and verification policy list, and
POST vical/fetch makes the server fetch a caller-supplied URL.

Add Verifier2RouteSurface so a deployment selects the groups it needs. The
routes are left out of the routing tree entirely rather than guarded, so an
unused surface answers 404 instead of depending on a check being correct.

Defaults to the full set, so verifier-api2 and its tests are unchanged.
Same problem as the verifier surface: OpenId4VciController registered everything,
so a deployment that issues only through the pre-authorized code flow still
exposed the authorization code endpoints, the external login redirect and its
OAuth callback, and offer retrieval by reference.

Add Issuer2RouteSurface with METADATA, ISSUANCE, CREDENTIAL_OFFER_BY_REFERENCE,
AUTHORIZATION_CODE and EXTERNAL_LOGIN, plus a preAuthorizedCodeOnly convenience.
Unregistered groups are absent from the routing tree and answer 404 rather than
depending on a guard or a gateway rule.

Excluding EXTERNAL_LOGIN also removes the only reason a deployment needs the
"auth-oauth" authentication provider installed, since that is the sole
authenticate() block in the controller.

Defaults to the full set, so issuer-api2 and its tests are unchanged.
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

WAL-1321

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: ac55e336-b077-48a0-8f42-d2c5ba10e9ab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

waltkb added 3 commits August 28, 2026 03:10
# Conflicts:
#	waltid-services/waltid-issuer-api2/src/main/kotlin/id/walt/issuer2/controller/OpenId4VciController.kt
Verifier2Service.registerRoute registered the whole verifier surface, so every
deployment also exposed the management routes: POST verification-session/create
accepts a caller-supplied DCQL query and verification policy list, and
POST vical/fetch makes the server fetch a caller-supplied URL.

Add Verifier2RouteSurface so a deployment selects the groups it needs. The
routes are left out of the routing tree entirely rather than guarded, so an
unused surface answers 404 instead of depending on a check being correct.

Defaults to the full set, so verifier-api2 and its tests are unchanged.
Same problem as the verifier surface: OpenId4VciController registered everything,
so a deployment that issues only through the pre-authorized code flow still
exposed the authorization code endpoints, the external login redirect and its
OAuth callback, and offer retrieval by reference.

Add Issuer2RouteSurface with METADATA, ISSUANCE, CREDENTIAL_OFFER_BY_REFERENCE,
AUTHORIZATION_CODE and EXTERNAL_LOGIN, plus a preAuthorizedCodeOnly convenience.
Unregistered groups are absent from the routing tree and answer 404 rather than
depending on a guard or a gateway rule.

Excluding EXTERNAL_LOGIN also removes the only reason a deployment needs the
"auth-oauth" authentication provider installed, since that is the sole
authenticate() block in the controller.

Defaults to the full set, so issuer-api2 and its tests are unchanged.
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

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