Loading
fix(proto): mirror oauth_access_tokens in the Doorkeeper refresh token Upsert request
Why
Daniele raised two concerns on the handler MR !841 (merged):
- !841 (comment 4011891974): the proto field was named
requested_at(fosite vocabulary) when both the Rails source columnoauth_access_tokens.created_atand the IAM columndoorkeeper_refresh_tokens.created_atcall itcreated_at. - !841 (comment 4011892043): the scopes rule (100 items, 255 chars each) was not in Rails and could reject real tokens; it should be the 2048-char total that matches the check on
oauth_applications.scopesand the rule already in the client messages.
This MR fixes both. Field numbers are unchanged, so the wire format is compatible; buf breaking passes clean. Nothing serves the RPC yet; the handler MR !841 (merged) stacks on this and mirrors both changes.
What
- Rename
requested_attocreated_atin theInternalOAuthDoorkeeperRefreshTokensService.Upsertrequest message (field 6, wire-compatible). - Replace the scopes rule
max_items: 100, items max_len 255with thescopes.total_lengthCEL rulethis.join(' ').size() <= 2048, keepingmin_len: 1per item as a well-formedness check.
gitlab-org/gitlab!260239 (merged) must send created_at once the gem is regenerated.
Work item: gitlab-org/gitlab#632066 (closed)