Repository navigation
Description
Purpose
Prioritise every open issue towards one objective: operational Authorization Server, Data Custodian and Third Party applications that can be tested by hand, quickly.
- Phases run in order. Within a phase, the order is the critical path.
- Size: S ≈ a day, M ≈ a few days, L ≈ a week or more.
Principles:
- Unblock the end-to-end flow before adding breadth.
- Make local setup reproducible before debugging it.
- Fix wrong data exposure before anything is shared.
- Keep one source of truth for each concern: schema = Flyway, access rules = one policy, registration = RFC 7591.
Completed issues are struck through.
Progress (updated 2026-11-24)
Done in Phase 1:
Local manual-test kit: aligned AS/DC/TP local profiles, start/stop/smoke scripts, and docs/LOCAL_TESTING.md #254(PR feat(local): one-command local manual-test kit for AS, DC and TP (#254) #259),DC local profile: seed a deterministic ESPI sample dataset (customer, usage, PII, ApplicationInformation) for manual testing #253(PR feat(datacustodian): seed a deterministic ESPI sample dataset on the local profile (#253) #261),AS: unauthenticated /oauth2/authorize redirects to /authorize/delegate without parameters (400); outbound delegation to DC is broken #232(PR fix(authserver): carry the authorization request to /authorize/delegate (#232) #262),AS/DC: customer scope narrowing yields invalid_scope on authorize replay #211(PR fix(authserver,datacustodian): allow ESPI scope narrowing by the Third Party and the customer (#211) #265)Third Party: add a username/password login page matching the Data Custodian login design #249(PR feat(thirdparty): username/password login matching the Data Custodian design (#249) #268, review follow-up PR fix(thirdparty): address the #268 review of Third Party form login (#249) #270),Third Party: make Flyway own the schema in every profile using the openespi-common scripts (split from #241) #267(PR feat(thirdparty): Flyway owns the Third Party schema in every profile (#267) #272)TP bring-up: missing JAXB Atom marshaller, narrow component scan, and broader OAuth2-client wiring gaps #146(PR feat(thirdparty): Spring Security oauth2Client for the Data Custodian authorization (#146) #275),Third Party cannot unmarshal any ESPI Atom feed (AtomFeedDto date adapters + abstract entry type) #197(PR feat(common): ESPI resources inside atom:content, and XSD validation of ESPI XML (#197) #280),DC: serve Batch/Subscription/{id} (the customer token's resourceURI) as one subscription-scoped Atom feed #279(PR feat(datacustodian): Batch/Subscription feed of a subscription's usage data (#279) #282),Security: per-resource GETs ignore subscriptionId/usagePointId and return other customers' data #286(PR fix(datacustodian): usage GETs limited to the token's subscription, ROOT-form hrefs and the GBA model's Atom links (#286) #290),HistoryLength is seconds: fix the Authorization Server defaults and the REQ.21.6.3 example #284(PR fix: HistoryLength is in seconds in every default, seed and sample scope (#284) #295)AS: remembered consent skips the Data Custodian delegation, so the token has no ESPI provisioning or URIs #276andAS: a second authorization in the same browser with a different scope returns Spring's consent state to the TP, so no token is stored #299(PR fix(authserver): every customer authorization is delegated to the DC with the Third Party's own state and redirect_uri (#299, #276) #304): every customer authorization is delegated to the DC with the TP's ownstateandredirect_uriAS: unauthenticated POST to /oauth2/token, /introspect, /revoke gets 302 to /authorize/delegate instead of 401 #225(PR fix(authserver): token, introspect and revoke answer an unauthenticated client with 401 invalid_client, not a redirect (#225) #319): token, introspect and revoke answer an unauthenticated client with 401invalid_clientand a Basic challenge, not a redirectAS: H2 migrations lack oauth2_client_metrics / oauth2_consent_details / oauth2_token_usage (scheduled metrics job fails on local profile) #234(PR fix(authserver): remove the dead consent page and client metrics code that needed tables H2 lacks (#234) #321): the AS's dead consent page and client metrics code, which needed tables H2 lacks, are removed (follow-ups AS: drop the unused metrics and consent-detail tables (and MySQL's metrics procedure and event) left by #234 #320, AS and DC: operational metrics with Micrometer, and Third Party reporting from the audit log (replaces the table-based metrics removed in #234) #322)Authorization Server and Data Custodian: H2 console settings (web-allow-others: true on the AS; no console module; DC permitAll) #271(PR fix(authserver,datacustodian): no H2 console on the AS or DC; session cookies SameSite=Lax; AS profiles load again (#271) #326): no H2 console on the AS or DC; AS and DC session cookies SameSite=Lax (Strict looped the customer flow across sites); the ASprod/espi40/dockerand the DC/TPprod/docker/aws-sandboxprofiles start again (duplicate YAML keys,spring.profiles.*in profile files, actuatorenabled+access), guarded byProfileConfigLoadsTestin all three (follow-ups Authorization Server Docker images cannot be built (no Maven wrapper, module-only build context, two Dockerfiles) #328, openespi-common: its jar's application.properties overrides each application's application.yml #273 comment)AS: carry the PKCE code_challenge through the Data Custodian delegation #274(PR fix(authserver,thirdparty): carry a Third Party's PKCE challenge through the DC consent; the TP sends PKCE again (#274) #330): PKCE accepted, not required (REQ.21 never mentions it; RFC 9700 2.1.1 via REQ.21.6.1.2's "applicable IETF RFC updates"). The AS carries a TP'scode_challengethrough the DC delegation and enforces the verifier; the TP sends S256 PKCE again; client management defaultsrequireProofKeyto false except for public clients; the DC, TP and AS READMEs say so (follow-ups fix(authserver): delegation state is keyed by the TP's state in a global map, so a second /authorize/delegate can overwrite a pending entry #331, fix(authserver): client management accepts any authentication method, gives a public client a secret, and its openapi.yaml and PUT don't match what it applies #332)AS: concurrent customer authorizations in one browser mix up their grant contexts and consents #305andfix(authserver): delegation state is keyed by the TP's state in a global map, so a second /authorize/delegate can overwrite a pending entry #331(PR fix(authserver): each delegation has its own AS-generated id and grant context; no customer sign-in or consent outlives its replay (#305, #331) #333): each delegation has a random AS-generated correlation id (never the TP'sstate) and its own grant context in the session, with a 5-minute expiry; the customer is signed in and consented only on the replayed/oauth2/authorizewhose parameters match the delegation, which takes the context once. No AS sign-in or consent is saved, so two authorizations in one browser cannot mix and every authorization goes through the DC (follow-upfix(authserver): a Third Party that leaves redirect_uri out of /oauth2/authorize gets invalid_grant at /oauth2/token #335, done in PR fix(authserver): a Third Party that leaves redirect_uri out of /oauth2/authorize gets a token without it (#335) #341)- Minimal Implement comprehensive JAXB unmarshalling support for XML import #89 (PR feat(thirdparty): minimal Subscription view — fetch, validate, save and show the Batch/Subscription feed (#89) #300): the TP fetches the customer's
Batch/Subscriptionfeed, validates it, saves every fetch and shows it on/subscription/{authorizationId}. Implement comprehensive JAXB unmarshalling support for XML import #89 stays open for the import into the usage tables (Phase 3)
Done ahead of Phase 2:
AS PostgreSQL migration V2 attaches chk_risk_score_range to wrong table #152(PR fix(authserver): PostgreSQL migrations apply on a fresh database; re-enable the PostgreSQL integration test (#152) #296): the AS PostgreSQL migrations apply on a fresh database (part of item 14)DC: ESPI resource responses must be application/atom+xml; Swagger UI hides internal and Actuator endpoints #312(PR fix(datacustodian): ESPI resources are served as application/atom+xml only; Swagger UI authorizes and hides internal endpoints (#312) #315): ESPI resources are served asapplication/atom+xmlonly; Swagger UI hides the internal endpoints (item 10d)DC: every rejected ESPI request (401/403) carries WWW-Authenticate with the reason (RFC 6750, REQ.21.6.1.2), including the DC's own 403s #316(PR fix(datacustodian): every 401/403 carries a minimal RFC 6750 Bearer challenge; reasons are logged, not sent (#316) #318): every 401/403 carries aWWW-Authenticate: Bearerchallenge with the RFC 6750 error code only; the reason is logged on the DC, not sent (item 9d)
Found and fixed along the way:
DC feed (collection) endpoints return 500: a bare List is passed to JAXB instead of an Atom feed #247: the DC feed endpoints returned 500 (PR fix(#247): export DC collection endpoints as Atom feeds instead of a bare List #250).DC: Authorization Screen consent submit is rejected as a handoff replay, and login does not return to the screen #263: Authorization Screen consent was rejected as a handoff replay, and login did not return to the screen (PR fix(datacustodian): complete the Authorization Screen consent and return to it after login (#263) #264).
Filed since this roadmap:
| Issue | Topic | Source | Placed in |
|---|---|---|---|
| TP Flyway | split from #241 | Phase 1, item 4a; done | |
| #256 | DC Batch/Bulk API | Phase 2 | |
| #266 | NAESB errata for REQ.21 v4.1 OAuth 2.0 Scope | submitted 2026-11-15; accepted by NAESB as MC26006 | tracking only, no code change; open until NAESB announces adoption |
| AS and DC H2 console settings (done, PR #326) | #270 review | Phase 2, item 9a | |
| #273 | openespi-common's jar application.properties and application-<profile>.yml override each application's own config |
#272 review | Phase 2, item 14 |
The AS drops the PKCE code_challenge in the DC delegation, so PKCE is off in the TP for now |
#146 | Phase 2, item 9b; done, PR #330 | |
AS client-management API accepts any authentication method and gives a public (none) client a secret; its openapi.yaml field names and PUT don't match what the server applies |
#330 review | Continuous; done, PR #342 | |
| #343 | AS openapi.yaml and API docs describe client-management list/detail responses, a DELETE /{clientId}, an error format and certificate-client registration the server does not have (docs only) |
#332 (PR #342) | Continuous; with #344 (keep and trim) |
| #344 | AS client management API (/api/v1/oauth2/clients, unused): list always 500, status without reason 500s after applying, bulk logs raw ids, a null scope is saved; owner decided to keep and trim it (fix, drop bulk, merge with OAuthAdminController, share validation with /oauth2/register) |
#332 (PR #342) review | Continuous; decided: keep and trim |
| #348 | AS client management: PUT /{clientId} racing a delete re-inserts the deleted client (save inserts when the row is gone) and answers 200 |
#344 PR 1 (#346) review | Continuous; with #344 PR 3 |
| #349 | AS admin: DELETE /admin/oauth2/clients/{clientId}/tokens is a placeholder that answers 200 "revoked" but revokes nothing, so the client's tokens stay valid |
#344 PR 1 (#346) review | Before deployment; with #344 PR 3 |
| #345 | AS: suspending or revoking a client has no effect: client_status is never checked at /oauth2/token, /oauth2/authorize or introspection, so a suspended client still gets tokens and its tokens still release data |
#344 | Continuous; after #344 PR 1 |
| #351 | AS client management on PostgreSQL: create, update with security_level, and the list's status/securityLevel filters bind text to enum columns and fail; on H2 the create writes columns H2 lacks |
#345 (PR #350) review | Continuous; with #344 PR 3 |
| #352 | AS prod (target: 2.0.0) and dev-mysql (7.0.0) Flyway caps skip MySQL V7 handoff nonces, V9 admin users and V11 cascading client deletes |
#345 (PR #350) | Before deployment; Phase 2, item 14 |
| #353 | AS client management: max-failures-before-lock and default-lock-duration-minutes are documented but read nowhere (no failure lockout; a suspension without lock_duration_minutes never ends on its own) |
#345 (PR #350) review | Continuous; with #344 PR 3 |
| #354 | AS on PostgreSQL/H2: TIMESTAMP columns without time zone are written and read in the JVM's zone, so times can be an hour off around DST or after a zone change |
#345 (PR #350) review | Before deployment; Phase 2, item 14 |
| #355 | AS on PostgreSQL: the reporting views and check_security_violations() filter on the stored client_status only, so a client on a timed suspension or lock counts as active (no Java code reads them) |
#345 (PR #350) review | Continuous; with #344 PR 3 |
| Spring Boot 4.2.x | owner | Phase 2, item 13; done, PR #337 (main on 4.2.0; the next Spring Boot release, scheduled for 2026-12-17, comes through Dependabot) |
|
| OWASP dependency-check silently analysed nothing since plugin 13.0.0 (NVD key required) | Dependabot #215 | Phase 2, item 13; done, PR #308 (verified on the 2026-11-30 scheduled run) | |
| #309 | Release policy and minimum release-note content (semver meaning, Java/Spring Boot versions, human-written highlights) | CMDCertification release review | Continuous; before the first module release, with #311 |
| #311 | Release automation: release-please in manifest mode, one package per module, the same Conventional Commits semver mapping as CMDCertification | owner decision, 2026-11-21 | Continuous; before the first module release, with #309 |
| #356 | AS: open Dynamic Client Registration as an opt-in mode (registration.mode: token | open, default token), clients pending_review until the DC approves them, with rate and size limits and a purge |
#252 decision, 2026-11-30 | Phase 2, item 12, after #251 and #252 |
A TP that leaves redirect_uri out of /oauth2/authorize (RFC 6749 3.1.2.3, one registered URI) gets invalid_grant at /oauth2/token: the replay always adds it |
#333 review | Continuous; done, PR #341 | |
Spring Boot 4.2.0 (Dependabot #323) drops the AS scope policy: narrowed scopes get invalid_scope (#211), administrative scopes are delegated (#251) |
#323 CI | Phase 2, item 13; done, PR #337 (replaces #323) | |
AS test delegatedCustomerFlowStillWorks does not prove the replay signs the customer in (FB_1 is refused either way) |
#337 review | Continuous; done, PR #339 | |
AS delegation state is keyed by the TP's state in a global map, so a second /authorize/delegate can overwrite a pending entry (client, redirect URI, PKCE challenge) |
#330 review | Phase 2, item 9c, with #305; done, PR #333 | |
| AS remembered consent skips the DC delegation, so a repeat authorization gets no Subscription and no token-response URIs | #146 | Phase 1, item 5a; done, PR #304 | |
| #299 | A second authorization in the same browser with a different scope takes the AS consent-page path: Spring's consent state (and no redirect_uri) reaches /authorize/delegate and is replayed to the TP, so no token is stored |
#89 manual testing | Phase 1, item 5a, with #276; done, PR #304 |
AboutControllerTest fails on a JDK whose java.version is exactly 25 |
Continuous; done, PR #340 | ||
| #278 | Enumeration XML values: REQ.21 needs numeric codes for ServiceKind and PhaseCodeKind, and exact literals for the other kinds, never Java constant names | #197 | Phase 3, schema compliance |
DC Batch/Subscription |
#197 | Phase 1, item 6; done | |
| #281 | Every ESPI atom:id a permanent, repeatable UUID v5 from business keys: no random v4, no URL or token names |
#280 | Phase 2, item 10a |
| #283 | FB_29 Temperature Interval Metering query requirements | #282 review | Phase 3 |
HistoryLength is seconds: the AS defaults and docs use HistoryLength=13 (13 seconds), plus the REQ.21.6.3 example |
#282 review | Phase 1, item 6a; done | |
| #285 | Select time-bounded data in the database, not in memory (Batch/Subscription and, since #290, the root and XPath usage feeds) |
#282 review | Phase 3, with #187 and #293 |
Security: per-resource GETs ignore subscriptionId/usagePointId and return other customers' data |
#282 review | Phase 1, item 6b; done | |
| #287 | Entries link to endpoints the DC does not serve: LocalTimeParameters (and Subscription/{id} is not served). The Subscription-scoped MeterReading item is obsolete since #290 |
#282 review | Phase 2, item 10b |
| #288 | Customer DTOs map customer.xsd TimeType (epoch seconds) as OffsetDateTime |
#282 review | Phase 3, schema compliance |
| #289 | Entity created/updated use the JVM time zone but are exported as UTC (Z) |
#282 review | Phase 3, schema compliance |
| #291 | Customer resources' Atom related links per the GBA UML model (<<link>> associations) |
#290 review | Phase 3, with #169 |
| #292 | RetailCustomer identifiers in URIs are sequential database ids, not obfuscated (REQ.21.6.1.1.6-7) | #290 review | Phase 2, item 10c |
| #293 | Large usage feeds: REQ.21.6.2.7 time-window chunking, time parameters on every usage feed, bounded child links | #290 review | Phase 3, with #285 |
| #294 | NAESB errata request for the REQ.21 v4.1 scope examples (HistoryLength=13 and two others; CMDTest#1088–#1090) |
#284 | tracking only, no code change; drafted, not sent; on hold until the GBA Technical Manager releases it to NAESB |
| #297 | SummaryMeasurement and BillingChargeSource children are written without the ESPI namespace, so every UsageSummary fails the XSD. Reading must accept both GBA namespace forms (root espi: prefix and inline default namespace) |
#89 (Task 5 feed reader) | Phase 3, schema compliance, with #278 |
| #298 | HTTPS with TLS 1.3 only on every AS, DC and TP interface, inbound and outbound; plain http only on local/dev* |
owner requirement, 2026-11-20 | Phase 2, item 15, with #188 |
| #301 | The TP Subscription reader places children only by reverse espi-entry/<Parent> related links; a DC that links by the self/up href hierarchy alone shows UsagePoints with no readings |
PR #300 review | Phase 3, with the full #89 import |
| #302 | The TP Subscription page re-validates and re-reads a saved fetch's whole body on every view; the saved validation outcome is unused | PR #300 review | Phase 3, with the full #89 import |
| #305 | Concurrent customer authorizations in one browser (two tabs) mix up their grant contexts and consents, so a token can get another authorization's Subscription; a /continue redirect the browser never follows leaves the consent, sign-in and grant context behind |
PR #304 reviews | Phase 2, item 9c; done, PR #333 |
| Purge abandoned authorization-request rows (state only, no token) after a set age | PR #304 review | closed as a duplicate of #199 (details copied there); Phase 2, item 14 | |
ESPI resource responses must be application/atom+xml (they declared XML and JSON and returned application/xml); Swagger UI must not list the internal back-channel or Actuator endpoints |
PR #310 Swagger UI check | Phase 2, item 10d; done, PR #315 | |
| #313 | Serve every customer.xsd resource (CustomerAgreement, ServiceLocation, ServiceSupplier, Meter, EndDevice, Statement, ProgramDateIdMappings, the RetailCustomer XPath forms and Batch/RetailCustomer) with customer-token access; only Customer and CustomerAccount exist, admin only |
Swagger UI review | Phase 2, item 10 (on #187), with #169 and #291 |
| #314 | API docs show the bare resource DTO, not the Atom feed or entry a Third Party receives: add validated application/atom+xml examples to every ESPI operation and Atom wrapper response schemas |
Swagger UI review | Phase 2, item 10e, after #312; needs #278 / #297 for fully valid examples |
Every rejected ESPI request (401/403) must carry WWW-Authenticate: Bearer with error and the reason (RFC 6750 §3, REQ.21.6.1.2; required by OpenESPI-GreenButtonCMDTest). Spring Security's rejections do; the DC's own 403s (SubscriptionAccess, BatchSubscriptionController) send no header and no body |
PR #315 review | Phase 2, item 9d; done, PR #318 (error code only, no error_description: owner ruling) |
TP now:
- Form login:
admin/adminis the TP administrator;customer/customeronlocal. - The H2 console is limited to the TP administrator.
localis the default profile and listens on127.0.0.1only.- Flyway owns the schema on H2, MySQL and PostgreSQL (
ddl-auto: validate, with schema tests on all three).
TP OAuth client (#146):
- Uses Spring Security
oauth2Client. The TP customer stays signed in while authorizing at the DC. - Tokens and the token-response URIs are stored in the TP's ESPI
authorizationstable (Flyway V6). - The TP administrator obtains the
FB=34_35client access token on the admin page. - Verified end to end on
local.
ESPI XML (#197):
- Each resource is now inside
<atom:content>, in both the DC export and the TP reader. EspiXmlSchemaValidatorchecks ESPI XML against atom.xsd, espi.xsd and customer.xsd.- The feed
publishedand the empty feed's link type were fixed. docs/ESPI_ATOM_PROFILE.mdrecords where ESPI deliberately differs from RFC 4287.- Decision 3 below is resolved.
#202 split:
- The TP side is done in
TP bring-up: missing JAXB Atom marshaller, narrow component scan, and broader OAuth2-client wiring gaps #146. - The AS side remains, now Phase 2, item 11a, ahead of DC: implement ESPI Batch/Bulk API — Third Party client access token only, scoped to its own Authorizations #256:
customerResourceURIgated on FB_51;- refresh must not re-provision;
- the
FB=34_35client access token must carryauthorizationURI, the energy usage BulkresourceURIand the Customer PII BulkcustomerResourceURI.
DC Batch/Subscription (#279, PR #282):
GET /espi/1_1/resource/Batch/Subscription/{subscriptionId}returns one Atom feed of the subscription's UsagePoints, MeterReadings, ReadingTypes, IntervalBlocks, summaries and LocalTimeParameters.- Access: the DC admin, or a customer token for that subscription with FB_4 plus an electricity, gas or water FB (FB_5 to FB_11); UsagePoints are included by commodity FB.
- With no query parameters it returns the last 24 hours, plus the latest UsageSummary and ElectricPowerQualitySummary per UsagePoint.
published-min/maxandupdated-min/maxselect the data; they must be UTC timestamps ending inZ. HistoryLength(seconds, per REQ.21.6.1.2.1) is a ceiling on how far back data is returned.- Non-epoch timestamps in all ESPI XML are now written in UTC, ending in
Z.
- No resource is addressed through
/Subscription/{id}/...: a Subscription is per grant, so such an href would not be repeatable (REQ.21.6.1.1.6; owner ruling, CMDTest#1036). Usage resources are served and linked in ROOT form (UsagePoint/{id}, ...) and as RetailCustomer XPath collections (RetailCustomer/{id}/UsagePoint/{id}/MeterReading, ...).Batch/Subscriptionentries use the same hrefs. - Row-level access (
SubscriptionAccess.reader): the admin reads every row; a customer token its own subscription's rows (commodity FBs, summary FBs,HistoryLength); anything else 403. A root entry the token may not read is 404./Customerand/CustomerAccountare admin only until Customer resources: Atom related links per the GBA CMD UML model (<<link>> associations) #291. - Every entry (in
Batch/Subscription, the root and XPath feeds, and read on its own) has the GBA model's links, both ends, per DataSDKREQ21_atom-link-matrix.md. Customer resources usecust-entry/.../cust-feed/...link types. - ESPI defines no pagination:
limit/offsetapply to the DC admin only.
HistoryLength in seconds (#284, PR #295):
- Every AS default, seed, contract, smoke script, test and doc uses
HistoryLength=34128000(395 days, about 13 months) or604800(7 days), per REQ.21.6.1.2.1. - PostgreSQL
V10_0_0__historylength_in_seconds.sqlrewrites the seeded scopes already stored; MySQL and file-based databases keep stored client scopes (re-register or edit those clients). EspiScope.parserejects a zero or negative HistoryLength.- The DC Authorization Screen and the AS consent page show the period in calendar units (
HistoryPeriod), e.g. "up to the last 13 months (395 days)".
AS PostgreSQL (#152, PR #296):
- V2 had the
risk_scorecheck on the wrong table and re-created a V1 trigger; both fixed, so V1 to V10 apply on a fresh PostgreSQL. PostgreSqlTestcontainersIntegrationTestis re-enabled and runs in CI; the purge portability test runs the full PostgreSQL migration set.
TP Subscription view (minimal #89, PR #300):
SubscriptionClientsends the token only to aBatch/Subscription/{id}URI on the configured DC. It uses TLS 1.3 only, and https outsidelocal/dev*(HTTPS with TLS 1.3 only on every AS, DC and TP interface (inbound and outbound) before deployment #298). Responses are bounded: 16 MiB, a 10 s connect timeout and a 60 s read timeout.espi.thirdparty.xml-validationisoff,report(the default) orenforce. Every fetch is saved in the TP-onlysubscription_feed_fetchestable (Flyway V7; DATETIME(6) on MySQL).- The page shows the whole feed: UsagePoints, MeterReadings with their ReadingType, IntervalBlocks, both summaries and LocalTimeParameters. It also shows the validation issues and the saved fetches.
- Follow-ups: SummaryMeasurement and BillingChargeSource children are written without the ESPI namespace; accept both GBA namespace forms when reading #297, TP Subscription reader: place children by the self/up href hierarchy when no reverse related link resolves #301, TP Subscription page: do not re-validate and re-read a saved fetch's whole body on every view #302 (Phase 3);
AS: a second authorization in the same browser with a different scope returns Spring's consent state to the TP, so no token is stored #299(done, PR fix(authserver): every customer authorization is delegated to the DC with the Third Party's own state and redirect_uri (#299, #276) #304); the rest of HTTPS with TLS 1.3 only on every AS, DC and TP interface (inbound and outbound) before deployment #298 (Phase 2, item 15).
AS customer authorization single use (#299, #276, PR #304):
SingleUseCustomerAuthorizationResponseHandler(the authorization endpoint's response and error handler): after each code or error it removes a customer's consent and clears the customer's AS sign-in and grant context, so every authorization goes through the DC Authorization Screen with the TP's ownstateandredirect_uri. An AS administrator's are kept./authorize/delegatefrom Spring's consent page takes the TP'sstate,redirect_uriand scope from the signed-in customer's pending authorization, kept for a reload and removed at/continue; a signed-in request without one is 400. A missingredirect_uriis accepted only when the client registered exactly one; no guessing./continuesigns the customer in only after the handoff passes its checks; deny and a rejected handoff clear any customer sign-in.- Verified on
local: Monthly, Daily, a denied Daily and Monthly again in one browser, each with its own Subscription. - Follow-ups: AS: concurrent customer authorizations in one browser mix up their grant contexts and consents #305 (Phase 2, item 9c); AS: abandoned authorization requests (no token, no expiry) accumulate in oauth2_authorization #199, abandoned consent-page rows (Phase 2, item 14).
Next:
- Phase 1 is complete (
AS: H2 migrations lack oauth2_client_metrics / oauth2_consent_details / oauth2_token_usage (scheduled metrics job fails on local profile) #234, PR fix(authserver): remove the dead consent page and client metrics code that needed tables H2 lacks (#234) #321, was the last item). Phase 2: the security items 9a (Authorization Server and Data Custodian: H2 console settings (web-allow-others: true on the AS; no console module; DC permitAll) #271, PR fix(authserver,datacustodian): no H2 console on the AS or DC; session cookies SameSite=Lax; AS profiles load again (#271) #326), 9b (AS: carry the PKCE code_challenge through the Data Custodian delegation #274, PR fix(authserver,thirdparty): carry a Third Party's PKCE challenge through the DC consent; the TP sends PKCE again (#274) #330) and 9c (AS: concurrent customer authorizations in one browser mix up their grant contexts and consents #305withfix(authserver): delegation state is keyed by the TP's state in a global map, so a second /authorize/delegate can overwrite a pending entry #331, PR fix(authserver): each delegation has its own AS-generated id and grant context; no customer sign-in or consent outlives its replay (#305, #331) #333) are done; next is item 10, the E1: DC resource engine + Atom entry-assembly (GET-first) — UsagePoint & Customer verticals, scope-enforced #187 E1 resource engine. - In Phase 2, item 13: finish Security: high-severity CVEs in transitive dependencies #131 (DOMPurify inside the swagger-ui webjar) after the dependency-check settings in PR ci: dependency-check reads the NVD key from the environment and reports CVSS 8+ findings as a warning (#131) #308.
Phase 1: Manually testable locally (critical path)
Exit criteria:
scripts/local/start-all→smokepasses.- A TP user logs in to the TP and authorizes access, then logs in and consents at the DC.
- The TP receives a token and displays that customer's usage data.
- Admin and token checks run from
docs/LOCAL_TESTING.md.
| # | Item | Size | Why now |
|---|---|---|---|
| 1 | ✅ |
S | Removes the hidden-secret and mismatch friction; everything after builds on it |
| 2 | ✅ |
S–M | Without data, consent and feeds can't be exercised |
| 3 | ✅ |
S | Blocks the customer flow |
| 4 | ✅ |
M | A TP user must exist to start the flow; before this, the login button gave a 500 |
| 4a | ✅ |
M | Not needed for the local H2 exit criteria; needed to run the TP on MySQL/PostgreSQL. Can run in parallel with #249 |
| 5 | ✅ |
M | TP must obtain and store the token and know where the customer's resources are |
| 5a | ✅ state is replayed to the TP |
S–M + S–M | Every repeat authorization during manual testing hit one of them |
| 6 | ✅ <atom:content>, getResource(), empty feed, XSD validationBatch/SubscriptionEspiXmlSchemaValidator in off/report/enforce mode, captures it on local/dev only, and displays a UsagePoint and its readings) |
M + M | TP must show data to prove the flow end to end |
| 6a | ✅ HistoryLength in seconds, not months or days |
S | With HistoryLength=13 the DC returns 13 seconds of history, so #89 would have no readings to show |
| 6b | ✅ |
M | Batch/Subscription linked to these URLs, which returned any customer's data. An interim fix ahead of #187 (Phase 2, item 10) |
| 7 | ✅ invalid_scope |
S–M | Consent with fewer function blocks must work |
| 8 | ✅ |
S + S | Makes curl testing and the logs trustworthy |
Phase 2: Safe to share (sandbox / demo deployment)
| # | Item | Size | Notes |
|---|---|---|---|
| 9 | Fixes for privately reported security advisories (tracked in GitHub Security Advisories) | M | Before anything is exposed beyond localhost |
| 9a | web-allow-others: true, no console module; DC permitAll), aligned with the TP's (#270) |
S | Before anything is exposed beyond localhost |
| 9b | code_challenge through the DC delegation; then restore PKCE in the TP (TpCustomerAuthorizationRequestResolver) |
S–M | PKCE accepted, not required: REQ.21 does not require it |
| 9c | state) and refuse overwriting a pending entry |
M | A token could get another authorization's Subscription |
| 9d | WWW-Authenticate with the RFC 6750 error code on every 401/403, including the DC's own row-level 403s |
S–M | Done, PR #318. No error_description: a reason would let a client probe which subscriptions and customers exist (as certified DCs answer) |
| 10 | #187 E1 resource engine: replaces the per-resource controllers, keeping #290's row-level access (SubscriptionAccess) and entry links (UsageEntries); then #313, every customer.xsd resource on it |
L + L | One generic engine instead of ten controllers; the data exposure itself was fixed in |
| 10a | #281 permanent, repeatable UUID v5 atom:ids: remove the random v4 default from IdentifiedObject; use a per-DC namespace and names from business keys; Authorization from correlationId; IntervalBlock from the interval start; single-resource endpoints return <entry> |
M–L | Third Parties rely on stable ids to recognise repeated data; ids must not change once data is shared. Single-resource <entry> fits with #187 |
| 10b | #287 LocalTimeParameters endpoint, which every UsagePoint entry links to (required link), and the root Subscription/{id} |
M | On the #187 engine |
| 10c | #292 obfuscated, repeatable RetailCustomer identifier in URIs (UUID v5), instead of the sequential database id now in every usage feed's XPath links | M | REQ.21.6.1.1.6-7; before anything is shared |
| 10d | application/atom+xml only (406 for JSON or plain XML); Swagger UI without the internal back-channel and Actuator endpoints |
S | Done, PR #315 |
| 10e | #314 API docs show each ESPI response as the Atom feed or entry it is: validated application/atom+xml examples (checked against the XSDs by a test) and Atom wrapper schemas |
M | After #312; examples for the customer resources come with #313 |
| 11 | #138 consent withdrawal → token revocation + subscription cleanup | M | |
| 11a | #202 (AS side) token-response URIs: FB_51 gating, no re-provisioning on refresh, the FB=34_35 client access token's authorizationURI + Bulk resourceURI / customerResourceURI → #256 DC Batch/Bulk API (Third Party client access token only, scoped to its own Authorizations) |
S–M + M–L | #256 after #202 and #251; uses the #187 scoping. The TP already stores and shows the client token's URIs |
| 12 | #251 registration access token (returned at RFC 7591 registration or withheld by DC setting; FB=36_40 obtains one when withheld or expired; DC accepts it for ApplicationInformation) → #252 TP self-registration with the DC operator's single-use initial access token → #356 open registration as an opt-in mode |
M + L + M | Replaces the seeded TP client; spike done. Onboarding decided 2026-11-30: token-protected by default |
| 13 | #131 dependency CVEs; #237 CodeQL triage; |
M | PR #308: the dependency-check reads the NVD key from the environment, warns on CVSS 8+, one suppression file (the devtools false positive). What remains of #131 is DOMPurify 3.4.16 in the swagger-ui webjar (critical/high); then the check can become a gate |
| 14 | #241 (DC, including local Flyway on H2, and AS; the TP part moved to docker/prod/aws-sandbox profile files, whose spring.profiles.active PR #326 removes); #328 the AS Docker images cannot be built; #200 audit-log writers (the shared AuditLogDao comes with #344 PR 1; ConsentService and ClientCertificateService remain); #199 abandoned-authorization cleanup; #352 the prod/dev-mysql Flyway caps that skip MySQL V7, V9 and V11; #354 timestamps without time zone stored in the JVM's zone; #320 drop the AS metrics and consent-detail tables (and MySQL's metrics procedure and event) left by #234 (their foreign keys cascade on client delete since V11, #344 PR 1) |
M–L | Needed for the MySQL/PostgreSQL deployment profiles |
| 15 | #233 metadata advertises unsupported JWT/JWKS features; #188 TLS certificates; #298 HTTPS with TLS 1.3 only on every interface; #322 operational metrics with Micrometer (AS and DC), Third Party reporting from the audit log | S + M + M + M | #298 is required before any deployment; #322's basic Actuator metrics too, its per-Third-Party reporting can wait for Phase 3 |
Phase 3: ESPI completeness and certification readiness
- Remediation: ESPI REST controller modernization (post-#116) #119 epic.
- E1: DC resource engine + Atom entry-assembly (GET-first) — UsagePoint & Customer verticals, scope-enforced #187 E1 engine: all resources.
- Full Implement comprehensive JAXB unmarshalling support for XML import #89 import, with TP Subscription reader: place children by the self/up href hierarchy when no reverse related link resolves #301 (link children by the
self/uphref hierarchy when no reverse related link resolves, so feeds from other DCs are placed too) and TP Subscription page: do not re-validate and re-read a saved fetch's whole body on every view #302 (show a saved fetch without re-validating and re-reading its whole body on every view). - Add ProgramIdMappings entity + UsagePoint↔ProgramIdMappings relationship (energy) #168 / Map existing PII-tree FKs into JPA entity relationships (CustomerAgreement/ServiceLocation tree) #169 / Verify Entity Field Types and Lengths Match ESPI 4.0 XSD Schemas #101 / ESPI DTO enums are written as Java constant names, not the XSD values (e.g. ServiceCategory) #278 / SummaryMeasurement and BillingChargeSource children are written without the ESPI namespace; accept both GBA namespace forms when reading #297 / Customer DTOs map customer.xsd TimeType (epoch seconds) elements as OffsetDateTime #288 / Entity created/updated timestamps use the JVM time zone but are exported as UTC (Z) #289 schema compliance. ESPI DTO enums are written as Java constant names, not the XSD values (e.g. ServiceCategory) #278 is the enumeration XML values and SummaryMeasurement and BillingChargeSource children are written without the ESPI namespace; accept both GBA namespace forms when reading #297 the unqualified SummaryMeasurement and BillingChargeSource children; with
EspiXmlSchemaValidator, both show up as XSD errors. Customer DTOs map customer.xsd TimeType (epoch seconds) elements as OffsetDateTime #288 and Entity created/updated timestamps use the JVM time zone but are exported as UTC (Z) #289 are timestamp types and time zones. - Batch/Subscription: select time-bounded data in the database, not in memory #285 time-bounded queries in the database (with E1: DC resource engine + Atom entry-assembly (GET-first) — UsagePoint & Customer verticals, scope-enforced #187), and Large usage feeds: time-window chunking per REQ.21.6.2.7, time parameters on every feed, and bounded child links #293 REQ.21.6.2.7 chunking: time parameters on every usage feed, child links bounded to the request's window, 202 + BatchList chunks for large
Batch/...requests. - Customer resources: Atom related links per the GBA CMD UML model (<<link>> associations) #291 customer resources'
relatedlinks (needs Map existing PII-tree FKs into JPA entity relationships (CustomerAgreement/ServiceLocation tree) #169 and the customer-scoped paths), with DC: serve every customer.xsd resource (CustomerAgreement, ServiceLocation, ServiceSupplier, Meter, EndDevice, Statement, ProgramDateIdMappings) and customer-token access #313 (the customer endpoints themselves). - Define FB_29 (Temperature Interval Metering) query requirements #283 FB_29 temperature query requirements.
- DC customer portal: implement usage points, Download My Data and the legacy customer home (or retire them) #245 DC customer portal (usage, Download My Data).
- Authorization Server: add a home/landing page (no AS home screen exists today) #186 AS home page.
Continuous: quality and hygiene (pick up alongside)
- Rebuild AS OAuth2 flow integration suite on AbstractAuthserverIntegrationTest #151 rebuild the AS OAuth flow integration suite. It would have caught
AS: unauthenticated /oauth2/authorize redirects to /authorize/delegate without parameters (400); outbound delegation to DC is broken #232; prioritise it early in Phase 2. - Remove or fix skipped / @Disabled / CI-excluded tests across modules #194 skipped and disabled tests (the AS PostgreSQL integration test was re-enabled in PR fix(authserver): PostgreSQL migrations apply on a fresh database; re-enable the PostgreSQL integration test (#152) #296).
- fix: Cross-platform timestamp test failures due to OS timestamp resolution differences #78 timestamp-resolution flake (seen again:
CustomerAccountRepositoryTest.shouldUpdateTimestampsOnModification). AboutControllerTest fails on a JDK whose java.version is exactly "25" (matches Bootstrap w-25) #277AboutControllerTestand ajava.versionof exactly25— done, PR test(datacustodian,thirdparty): About page version check matches only a standalone version in the visible text (#277) #340 (the version check now covers the whole page, markup included, and the page must not name Spring Boot).AS test: delegatedCustomerFlowStillWorks does not prove the replay signs the customer in #338ASdelegatedCustomerFlowStillWorksproves the replay signs the customer in — done, PR test(authserver): delegatedCustomerFlowStillWorks proves the replay signs the customer in (#338) #339.fix(authserver): client management accepts any authentication method, gives a public client a secret, and its openapi.yaml and PUT don't match what it applies #332AS client-management API: validateauthentication_methods; no secret for a public client; align openapi.yaml with the DTO and make PUT apply (or drop) settings and methods (admin-only API) — done, PR fix(authserver): client management accepts only usable authentication methods, gives a public client no secret, and refuses fields it does not apply (#332) #342 (PUT refuses settings and methods rather than applying them; follow-ups docs(authserver): openapi.yaml and the AS API docs describe client-management responses, a DELETE and certificate clients the server does not have #343, fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344).- docs(authserver): openapi.yaml and the AS API docs describe client-management responses, a DELETE and certificate clients the server does not have #343 AS API docs: align the remaining client-management schemas (list, detail, errors,
/status,/bulk; noDELETE /{clientId}) and the stale examples and certificate-client pages with the server; extendClientManagementOpenApiTestto the responses (docs only). Do it with fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344: merging the two admin controllers and dropping/bulkrewrite most of these schemas. - fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 AS client management API (no caller in the repository): owner decided to keep and trim it (decision). Fix the list count query, the status audit NPE, null scopes and the remaining 400-before-404; remove
POST /bulkunless an operator needs it; merge withOAuthAdminControllerunder/admin/oauth2/clients; share one validator with/oauth2/register(HTTPS with TLS 1.3 only on every AS, DC and TP interface (inbound and outbound) before deployment #298); add a create → suspend → reactivate → delete integration test; set a review date to retire it if still unused. Three PRs: (1) defects,/bulkremoved, tests; (2) AS: suspending or revoking a client has no effect: client_status is never checked at the token, authorization or introspection endpoints #345; (3) one/admin/oauth2/clientsAPI, shared validation, integration test, docs(authserver): openapi.yaml and the AS API docs describe client-management responses, a DELETE and certificate clients the server does not have #343 docs, Client management: an update racing a delete brings the deleted client back #348, Admin: DELETE /admin/oauth2/clients/{clientId}/tokens reports success but revokes nothing #349. - Client management: an update racing a delete brings the deleted client back #348 AS client management: an update that races a delete must answer 404 instead of re-inserting the client (lock the row in one transaction, or write only through UPDATEs whose 0-row result is 404). With fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 PR 3, which rebuilds the update path.
- Admin: DELETE /admin/oauth2/clients/{clientId}/tokens reports success but revokes nothing #349 AS admin: revoking all of a client's tokens must actually delete its authorizations (lock the client row, the same authorization DELETE as the client delete, audit the count, 404 for an unknown client) and be tested against a real database, or the endpoint is removed. With fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 PR 3, which merges the admin APIs; must be fixed before deployment.
- AS: suspending or revoking a client has no effect: client_status is never checked at the token, authorization or introspection endpoints #345 AS client suspension is not enforced: check
client_status/locked_untilat client authentication,/oauth2/authorizeand introspection; H2 columns (Complete #123 schema-repair sync: align AS V1 schema with application code column names #145); tests per endpoint (security-sensitive,highreview). - fix(authserver): client management create, update and list filters fail on PostgreSQL's enum columns; H2 create writes missing columns #351 AS client management on PostgreSQL: cast the enum parameters (
client_status,security_level) in create, update and the list filters, as PR fix(authserver): a suspended, revoked or locked client gets no token, authorization or active introspection (#345) #350 does for the status update; give H2 the columns the create writes; run those tests on PostgreSQL too. With fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 PR 3. - fix(authserver): prod and dev-mysql Flyway targets skip MySQL V7, V9 and V11 #352 AS Flyway: remove the
prodanddev-mysqltargetcaps so MySQL V7, V9 and V11 run; start the AS on a fresh MySQL under both profiles. Before deployment, with item 14. - fix(authserver): max-failures-before-lock and default-lock-duration-minutes are documented but never applied #353 AS client management: remove
max-failures-before-lock/default-lock-duration-minutesand their docs, or implement a failure lockout. With fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 PR 3. - fix(authserver): PostgreSQL and H2 timestamps without time zone are stored in the JVM's zone #354 AS time zones: run the JVM and PostgreSQL sessions in UTC on every deployment profile, or move the PostgreSQL time columns to
timestamptz; test with a DST zone. Before deployment, with item 14. - AS PostgreSQL reporting views count a client on a timed suspension or lock as active #355 AS PostgreSQL reporting views: filter by the status in force (
locked_untiltoo), or drop the views nothing uses. With fix(authserver): client management API: list always 500, status without reason 500s after applying, bulk logs raw ids, null scope saved; fix or retire the controller #344 PR 3. fix(authserver): a Third Party that leaves redirect_uri out of /oauth2/authorize gets invalid_grant at /oauth2/token #335AS replay addsredirect_uriwhen the TP left it out, so its token request without it getsinvalid_grant— done, PR fix(authserver): a Third Party that leaves redirect_uri out of /oauth2/authorize gets a token without it (#335) #341 (the replay sendsredirect_urionly when the TP did).- Release notes: release policy, minimum note content, and grouped generated notes #309 release policy and minimum note content, and Release automation: adopt release-please (manifest mode, per-module) with shared Conventional Commits semver mapping #311 release-please (manifest mode, per module), the mechanism shared with CMDCertification. Settle both before the first
<module>-v*tag: no module has been released yet. - Comprehensive DTO Test Coverage and Standardization #88, Enhance XML Debug Tests for Additional ESPI Entities #103, Cleanup: controll-update-status.md filename typo + unimplemented @accountSecurityService bean #133.
Closed after review (confirmed 2026-11-16)
All six were closed with a comment giving the reason: #141, #204, #205 and #98 as completed; #203 and #117 as not planned.
| # | Reason |
|---|---|
Done in #250: DC Authorization endpoints implemented with per-TP filtering (AdminCaller, AdminRowScopeTest) |
|
Done: admin API bearer tokens are on main (merged with the GHSA-mh65 fix, 40812eb) |
|
Done: admin user store + passkey MFA + bootstrap are on main (same merge) |
|
| Superseded by #251: the certification question is answered, since REQ.21 requires the registration access token | |
| Delivered by #116; no description of its own; remaining work is in #187 / #119 | |
Obsolete: pr-checks.yml no longer exists, and no workflow runs Spotless |
Decisions needed
- ✅
Third Party: register itself via RFC 7591 dynamic client registration and manage its registration #252: how a Third Party receives its RFC 7591 initial access token during onboarding.Decided 2026-11-30 (decision): the DC operator vets the Third Party and sends it a single-useclient.createtoken out of band (tokenmode, the default). Open registration with clients pending review is an opt-in mode, AS: open Dynamic Client Registration as an opt-in mode, with clients pending review until the Data Custodian approves them #356. GBA certification applies to DCs only, not to Third Parties. - ✅
Registration access token: issue it on RFC 7591 registration, renew via FB=36_40, and require it for ApplicationInformation #251: RFC 7592 says a registration access token should not expire; ESPI renews an expired one throughReframed 2026-11-30:FB=36_40.FB=36_40is how a Third Party obtains a registration access token the DC withheld at registration (by its security policy), as well as replacing an expired one. Whether the token is returned at registration is a DC setting. - ✅
Third Party cannot unmarshal any ESPI Atom feed (AtomFeedDto date adapters + abstract entry type) #197: adopting theResolved: done as one change in PR feat(common): ESPI resources inside atom:content, and XSD validation of ESPI XML (#197) #280, following the certified ScriptLogs and the DMD validator's atom.xsd.<atom:content>wrapper changes the wire format for both DC export and TP import. Confirm it should be done as one change. - ESPI atom:id: every resource id a permanent, repeatable UUID v5 from business keys (no random v4, no URL or token names) #281: see that issue's "Points to settle":
- the client_credentials Authorization's name input (proposal: the AS's own grant record id);
- whether the DC namespace is non-public configuration, since account and serial numbers are guessable names.
References
RFC 7591 (Dynamic Client Registration), RFC 7592 (Registration Management, Experimental), NAESB REQ.21 v4.1, GBA Generating Persistent UUIDs, docs/ESPI_ATOM_PROFILE.md, CLAUDE.md "Known Issues"
🤖 Generated with Claude Code
Activity
dfcoffin commentedon Nov 14, 2026
Roadmap update:
Batch/BulkAPI, Third Party client access token only) next to ESPI token-response URIs: FB_51 gating, re-provisioning on refresh, missing URIs for client_credentials tokens #202. Registration access token: issue it on RFC 7591 registration, renew via FB=36_40, and require it for ApplicationInformation #251 now also covers grantingclient_credentialsto registered Third Parties, limited by the server toThirdParty_Admin_AccessandFB=36_40, so customer FB scopes can only come fromauthorization_code.🤖 Generated with Claude Code
docs: code-review procedure for src/ changes; #255 is the roadmap (#317)