docs(open-api): address review feedback on auth endpoint specs - #180
Draft
augmentcode[bot] wants to merge 2 commits into
Draft
docs(open-api): address review feedback on auth endpoint specs#180augmentcode[bot] wants to merge 2 commits into
augmentcode[bot] wants to merge 2 commits into
Conversation
- /authorize: redirect_uri, response_type, scope and code_challenge are only required inline, not in the PAR flow; prompt is a space-delimited list - client_secret_post is no longer modelled as a cookie apiKey scheme, which made tooling send the secret where the endpoints never read it - /token success response does not set Cache-Control - /introspect notes the inactive response emitted without cache headers - /logout returns the signed-out page, never a 303 redirect
- /authorize, /par, /token: add the authorization_details parameter/field,
matching AuthorizationDetail.parse and AuthorizationDetailResolver.resolve
(RFC 9396); add invalid_authorization_details to the error code lists
- /token success response and /introspect response: document the
authorization_details member echoed back per RFC 9396 §7/§9
- /authorize, /par, /token: document the public vs. internal resource split
(ResourceUri.internalResourceId, ResourceResolver) - internal resources
(resource://{resourceId}) are only reachable through the edge indicator
(resource://edge), never contacted by the client directly
- metadata: add authorization_details_types_supported, published by
ServerMetadataService.updateAuthorizationDetailType
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.
Follow-up to #175, which was already merged, so the review feedback is addressed here.
Review comments
/authorize— required parameters vs. the PAR flow (authorize.yaml:97)AuthorizeRequestParser.resolvePushedRequestrequires only the outerclient_idand then replaces the whole payload, so a valid/authorize?client_id=…&request_uri=…carries noredirect_uri.redirect_uri,response_type,scopeandcode_challengeare nowrequired: falsewith the conditional requirement described, andAuthorizeRequest.requiredis reduced to[client_id]./authorize—prompt(authorize.yaml:180)The parser splits
prompton spaces and rejects only combinations containingnone, sologin consentis valid. The scalarenumis dropped in favour of a plain string plus a description of the accepted values.client_secret_postmodelled as a cookie (introspect.yaml:56,par.yaml:72,revoke.yaml:55,token.yaml:85)extractCredentialsreadsclient_secret_postonly from the parsed form and never from a cookie, so theapiKey/cookiescheme made tooling send the secret to a location the endpoints ignore. The scheme is removed; the alternative is now an empty security requirement, with the form-field mechanism documented on the operation./tokensuccess response cache header (token.yaml:228)TokenEndpointControllerbuilds the success response withResponse.json(response.toJson)and addsCache-Control: no-storeonly on the error path, so theCache-Controlheader is removed from theTokensresponse./introspectinactive response (introspect.yaml:140)When JWT deserialization fails the controller returns the inactive
200without either cache header. TheCache-ControlandPragmaheaders are now documented as absent in that case./logout303 (logout.yaml:49,logout.yaml:77)performLogoutdelegates torenderLogout, which always returns a200HTML signed-out page and embeds the post-logout URI for client-side navigation; it never setsLocation. The303responses and thePostLogoutRedirectcomponent are removed, the client-side navigation is described, and theCache-Control/Referrer-Policyheaders the page actually sets are documented.Additional gaps
authorization_details(RFC 9396) was entirely undocumented. Added to/authorize(query parameter + schema),/par(form field),/token(per-grant-type field, plus theauthorization_detailsmember of the success response),/introspect(response member) andmetadata(authorization_details_types_supported), matchingAuthorizationDetail.parse,AuthorizationDetailResolver.resolveandOAuthTokenService.resolveTokenAuthorizationDetails. Addedinvalid_authorization_detailsto the error code enums/lists on/authorize,/parand/token.Internal vs. public resource organisation was undocumented.
ResourceUri.internalResourceId/ResourceResolverdistinguish public resources (requestable directly by URI) from internal ones (resource://{resourceId}, only reachable through the edge service and requestable only alongside theresource://edgeindicator). This is now explained on theresourceparameter/field of/authorize,/parand/token, and onauthorization_details.locations, which follows the same rule.Validated with
redocly/cli lint— no errors, and the same warning set as before the change (no-server-example.com, plusoperation-2xx/4xx-responseon the HTML/redirect endpoints).