docs: document that auth is out of scope and /reauth renews the OSC token - #284
Merged
Conversation
…oken intercom-manager intentionally ships no authentication layer of its own. Access control is deployment specific, and on Eyevinn Open Source Cloud it is handled by the OSC provided auth wall in front of the instance. The /reauth endpoint exists only to renew the token that wall issued so API calls keep working. Adding an in-process auth layer conflicts with the auth wall and breaks current deploys and installations. Records the design intent in a block comment on the /reauth handler, at its registration site in api.ts, and in a new Authentication section in the readme, so the next contributor does not repeat the attempt. Co-Authored-By: Claude <noreply@anthropic.com>
Merged
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.
Documents, in code and in the readme, that intercom-manager deliberately ships no authentication layer of its own, and that
GET /api/v1/reauthexists to renew the OSC issued token when the service runs behind the OSC auth wall.Contributors keep reaching for an app level bearer auth on this endpoint, so the design intent is now recorded where it will be read. Authoritative statement from birme: #283 (comment)
Documentation only. No behaviour change, no route, schema, or dependency touched.
Changes
src/api_re_auth.ts: block comment on the/reauthplugin explaining that auth is out of scope, that the OSC auth wall fronts the API in an OSC deployment, that this route only renews the externally issued token into theeyevinn-intercom-manager.satcookie, and that adding an in-process auth layer conflicts with the auth wall and breaks current deploys and installations.src/api.ts: short comment at the registration site stating the missing auth hook is deliberate, pointing at the block comment.readme.md: new## Authenticationsection between the environment variable table and Installation / Usage, saying the same for users and contributors, and noting that the existingWHIP_AUTH_KEYcovers only the WHIP and WHEP ingest endpoints and is not a general API auth mechanism.Every claim in the new text was read out of the code first: the
api/v1prefix, theeyevinn-intercom-manager.satcookie name and its two hourmaxAge, thePOST /servicetokencall to the OSC token service withx-pat-jwt, and the405returned whenOSC_ACCESS_TOKENis unset.Verification
npx tsc --noEmit -p tsconfig.jsoncleannpx prettier --checkclean on the three changed filesnpx eslint src/api.ts src/api_re_auth.ts0 errors (one pre-existinglastErrorunused warning, untouched)Lessons
@fastify/helmetis declared inpackage.jsonbut was missing from a stale localnode_modules, sotsc --noEmitfailed with a misleading TS2307 on an unrelated file; runnpm cibefore trusting a local typecheck in this repo. Also worth knowing for future work here:WHIP_AUTH_KEYis the only bearer key the backend checks, and it is scoped to WHIP and WHEP ingest only, so it is not precedent for adding bearer auth to other routes.🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com