Repository navigation
Conversation
…d to certifiable FBs; FB_51 needs customerResourceURI
- client_credentials may yield the Third Party client access token FB=34_35 (alongside FB=36_40,
ThirdParty_Admin_Access, DataCustodian_Admin_Access, authserver.admin, client.create).
Upload_Admin_Access is dropped: it is not migrated from the original GBA Sandbox.
- authorization_code scopes may name only the customer data Function Blocks listed in the GBA CMD
Certification Application v2.14 (Energy Usage 1-13, 15-17, 26-29, 31, 35, 37, 39, 40; Retail
Customer 51, 53-62, 64, 65, 67, 69-71). This replaces the {36, 40} individual-FB reservation, which
rejected certified customer scopes that list FB 40; FB=34_35 and FB=36_40 still never pass.
- A customer token whose scope includes FB_51 is issued only when the Data Custodian returns a
customerResourceURI; otherwise the token request fails with server_error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orization API - AS: the third_party demo client may request FB=34_35 (client_credentials); ThirdParty_Admin_Access stays for the TP's own actuator. - DC: EspiScopeOpaqueTokenIntrospector maps an FB=34_35 token whose introspected sub equals its client_id (a client_credentials token) to ESPI_CLIENT_ACCESS_TOKEN and no FB_ authorities; FB=34_35 on any other token grants nothing. The ESPI Authorization API accepts the DataCustodian admin or the client access token only (ThirdParty_Admin_Access is now 403), still row-scoped by client_id. - TP local: datacustodian-admin requests FB=34_35. - Local kit: smoke scripts get the client access token with FB=34_35 and check that ThirdParty_Admin_Access is refused by the Authorization API (27 checks); runbook updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Aligns the token scopes with ESPI practice as certified in Green Button CMD testing. Follow-up to #258 (#251).
The rules
FB=34_35andFB=36_40are unique Function Block combinations. They identify the Third Party client access token and the registration access token, and onlyclient_credentialscan yield them.FB=scope is a customer access token. It may name only the customer data Function Blocks in the GBA Green Button Data Custodian Connect My Data (CMD) Certification Application v2.14:customerResourceURI.Changes
Authorization Server
EspiGrantScopePolicy:client_credentialsnow allowsFB=34_35(CLIENT_ACCESS_TOKEN_SCOPE).Upload_Admin_Accessis removed: it belonged to the original GBA Sandbox and is not being migrated.FB=34_35andFB=36_40still can never pass, because FB 34 and FB 36 are not customer data Function Blocks.GrantBackchannelTokenCustomizer: anauthorization_codetoken whose granted scope includes FB_51 is issued only if the DC back-channel returns acustomerResourceURI. Otherwise the token request fails withserver_error, so no token is issued.Upload_Admin_Access. Thethird_partydemo client may requestFB=34_35. It keepsThirdParty_Admin_Accessfor the TP's own actuator.Data Custodian
EspiScopeOpaqueTokenIntrospectormaps anFB=34_35token to the single authorityESPI_CLIENT_ACCESS_TOKEN, with noFB_authorities, when the introspectedsubequals itsclient_id. Spring Authorization Server sets that only forclient_credentialstokens; a customer token's subject is the customer.FB=34_35on any other token grants nothing.GET /espi/1_1/resource/Authorization[/{id}]now acceptsDataCustodian_Admin_Accessor the client access token, still row-scoped to the token'sclient_id(fix(#247): export DC collection endpoints as Atom feeds instead of a bare List #250).ThirdParty_Admin_Accessnow gets 403 there.Local kit: the TP
datacustodian-adminregistration requestsFB=34_35. The smoke scripts get the client access token withFB=34_35and check thatThirdParty_Admin_Accessis refused by the Authorization API, for 27 checks in total.docs/LOCAL_TESTING.mdis updated.Tests
EspiGrantScopePolicyTestcovers:FB=34_35andFB=36_40in any spelling;Upload_Admin_Access.GrantBackchannelTokenCustomizerTest:customerResourceURIgivesserver_errorand writes no claims;EspiScopeOpaqueTokenIntrospectorTest:FB=34_35on a customer token;AdminRowScopeTestandAuthorizationControllerTest: the client access token passes and is row-scoped;ThirdParty_Admin_Accessgets 403.smoke.shandsmoke.ps1pass 27/27 against the running AS, DC and TP stack.🤖 Generated with Claude Code