Skip to content

ADR 0015: Registration of hosted clients

Status: accepted on 2026-11-13 by the owner. Product authority: consumer product requirements 3.1 (markdown/argus-consumer-product-requirements-3.1.md). Decision item 1 is completed with the result of the technical check before any implementation starts.

Context

Casdoor is the authorization server. This repository is only the resource server: it validates tokens and publishes protected-resource metadata.

Today the operator registers one Casdoor application for each AI host by hand. A host that is not registered cannot connect, and the Connect page tells the user to write an email. Dynamic client registration is switched off on purpose, because an application that Casdoor registers dynamically defaults to seven-day tokens.

Requirements 3.0 section 4 already allow a Client ID Metadata Document as the preferred way and controlled dynamic client registration as the fallback, following the MCP authorization specification of 2026-07-28. Neither is implemented. Whether the production Casdoor version accepts a URL as a client id is not known.

Decision

  1. Check first. Find out whether the production Casdoor version supports a Client ID Metadata Document. Record the result in this ADR.
  2. Preferred: metadata document. If it is supported, turn it on and limit it to a reviewed list of host domains.
  3. Fallback: a registration proxy in this repository. If it is not supported, add a thin endpoint that:
  4. accepts a standard registration request;
  5. checks every redirect address against an allowlist of known hosts;
  6. creates the Casdoor application through the admin interface with the same settings as the pre-registered template: authorization code, PKCE and one-hour tokens;
  7. is rate limited and audited;
  8. removes applications that have not been used for 30 days.
  9. Pre-registered applications stay. Hosts registered by hand keep working and keep their client ids.
  10. Consent is unchanged. Scopes alone are not the owner's consent (requirements 2.1 lines 138 and 139). Each application still needs the owner's consent for memory and for holdings before a private tool works.

Consequences

  • A host that was never registered can connect without the operator.
  • Registration becomes a public surface. The allowlist, the rate limit, the audit record and the clean-up of unused applications are its controls.
  • How the registration endpoint is advertised depends on Casdoor, which generates the authorization-server metadata. The technical check covers it.
  • The operations guide, MCP and client support are updated, and so is the Connect page text about unregistered apps.
  • If the terms of service still say dynamic registration is unsupported, they are revised first, as a new legal revision that every owner accepts.

Result of the technical check (2026-11-13)

Decision item 1 asks for this record. The check read Casdoor's documentation and source. It called no Casdoor instance.

Verified from documentation and source:

  • Casdoor accepts a Client ID Metadata Document from release 4.22.0 (2026-10-19). The newest release read is 4.27.1.
  • This repository tests against Casdoor 2.65.0. That version has neither metadata documents nor dynamic registration.
  • Metadata documents are turned on by the organization's switch for dynamic registration. The same switch opens anonymous registration.
  • Casdoor has no list of accepted hosts and keeps no scope list for such a client. It takes the client's token lifetime, token format and signing key from the built-in organization, not from argus.
  • From 4.14.0 dynamic registration no longer forces seven-day tokens. It still has no host list, scope list, rate limit or clean-up.

What follows for the decisions:

  • Decision 2 applies. The proxy of decision 3 is not built.
  • Casdoor cannot "limit it to a reviewed list of host domains". Argus does it as the resource server: oauth.client_metadata_hosts, which is empty by default, accepts a URL client id only from a listed host and gives it at most the scopes of a pre-registered hosted app.
  • One-hour tokens are a setting the owner makes in Casdoor. Argus already refuses a token that lives longer.

The production instance is checked before anything is switched on. If it cannot accept metadata documents, decision 3 applies and the proxy has to be built. Nothing is switched on: only pre-registered hosts can connect.