Skip to content

[HN-045] Internal /activity token is global shared secret, not scoped per instance (related to #91) #459

Description

@Inakitajes

Problem

The PATCH handler validates Authorization: Bearer ${process.env.ARCHE_INTERNAL_TOKEN} — a single global token shared by every container. The slug is taken from the URL but the token is not bound to it. Related to issue #91 (closed, but the per-instance token design was never implemented).

Location

apps/web/src/app/api/instances/[slug]/activity/route.ts:33-49

Impact

Leakage of the one global token exposes every workspace's activity endpoint. There is no per-instance revocation.

Suggested fix

Implement issue #91: generate a per-instance token at start, store only its hash (Instance.internalTokenHash), inject the raw token into that container, and compare hashes in this route.

Source: code investigation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendÁrea: Backend/APIbugSomething isn't workingsecuritySecurity-related findingseverity:lowLow severity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions