Authenticate /api/feeders/status with Bearer alv1 token#80
Merged
Conversation
claim_registration_status_line and status_probe_version now send the claim secret in an Authorization: Bearer alv1.<uuid>.<secret> header instead of a body current_secret field. claim.sh's /api/feeders/secret POSTs are unchanged (the secret rotation flow needs a body-shaped current_secret for the first-claim and replay paths). claim_rotate's lost-response recovery and --abort both ride through the new Bearer path via status_probe_version. post_json_bearer also now rm's its curl-config tempfile before return; TMP_FILES registration stays as a safety-net for direct callers (bash resets EXIT traps inside command-substitution subshells, so callers that capture via $() couldn't rely on it). Refs DEV-427.
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.
claim_registration_status_lineandstatus_probe_versionnow send the claim secret in anAuthorization: Bearer alv1.<uuid>.<secret>header instead of a bodycurrent_secretfield. The body shrinks to just{"uuid":"..."}for both endpoints.claim_rotate's lost-response recovery andclaim rotate --abortreach the server through the same new Bearer path.claim.sh's/api/feeders/secretPOSTs are unchanged — first-claim has no current secret to put in a header, and the rotation replay path needs the secret in the body to satisfy the server's NOOP_REPLAY check.post_json_bearernow rm's its curl-config tempfile before return. The previousTMP_FILESregistration stays as a safety-net for direct callers, but bash resets EXIT traps inside command-substitution subshells, so callers that capture via$()couldn't have relied on it alone.Refs DEV-427.