Repository navigation
Conversation
The data_custodian_admin, third_party, third_party_admin and datacustodian clients are development fixtures. They are now seeded only when espi.authserver.seed.demo-clients=true, which the local, dev-mysql, dev-postgresql and testcontainers profiles set. Other profiles start with none of them, matching the production onboarding model: Third Parties register through RFC 7591. - datacustodian (introspection) and data_custodian_admin can instead be provisioned from ESPI_DATACUSTODIAN_CLIENT_SECRET and ESPI_DATACUSTODIAN_ADMIN_CLIENT_SECRET, stored hashed. - With demo seeding off, an existing demo row that still accepts its development secret gets a random secret at startup. - DEPLOYMENT_GUIDE lists the new settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev-mysql is the default profile in application.yml, so a deployment that does not set SPRING_PROFILES_ACTIVE would run with demo seeding on. Startup now fails when espi.authserver.seed.demo-clients=true and the issuer host is not localhost, 127.0.0.1 or ::1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Authorization Server's development OAuth clients (
data_custodian_admin,third_party,third_party_admin,datacustodian) are now seeded only whenespi.authserver.seed.demo-clients=true. Thelocal,dev-mysql,dev-postgresqlandtestcontainersprofiles set it; every other profile (prod,docker,espi40, none) starts without them. This matches the production onboarding model agreed in #251 / #252: a production AS registers no Third Parties up front, and each one onboards through RFC 7591.Changes
AuthorizationServerConfig:seedDemoClientsflag (defaultfalse) around the existing seed-and-reconcile;seedConfiguredClient: provisionsdatacustodian(DC introspection) anddata_custodian_adminfromESPI_DATACUSTODIAN_CLIENT_SECRET/ESPI_DATACUSTODIAN_ADMIN_CLIENT_SECRET, stored hashed, rotating an existing row's secret when it no longer matches (same pattern asespi_admin/espi_registrar);retireWellKnownSecrets: with seeding off, a row from an earlier release that still accepts its development secret gets a random hashed secret at startup.requireLoopbackIssuerForDemoClients:dev-mysqlis the default profile inapplication.yml, so a deployment that forgetsSPRING_PROFILES_ACTIVEwould otherwise seed the demo clients. Startup now fails when demo seeding is on and the issuer host is notlocalhost/127.0.0.1/::1.application.ymldocuments the new keys; the dev/test profile files enable demo seeding.DEPLOYMENT_GUIDE.mdlists the new secrets.DemoClientSeedingTest(embedded H2, Spring's registered-client schema): default start seeds none; flag on seeds all four; configured secrets are hashed and used; leftover demo rows are retired; demo seeding on a non-loopback issuer fails startup; a configured secret replaces a leftover one on the same row id.Deployment note
The
dockerprofile has no AS profile file, so the compose setups now start without the demo clients. A containerised DC needsESPI_DATACUSTODIAN_CLIENT_SECRETset on the AS (and the matchingespi.authorization-server.client-secreton the DC) to introspect tokens.Test plan
DemoClientSeedingTest(6) andAuthorizationServerConfigReconcileTestpass locally-DexcludedGroups=testcontainers-it)testcontainersprofile, which enables demo seeding)🤖 Generated with Claude Code