Skip to content

chore(flags): Phase 2 — accept PSAK on the Django flag surfaces #66176

Closed

Description

@haacked

Phase 2 of #63111.

Accept PSAK on the Django surfaces that authenticate with the legacy team secret token today. Keep TeamSecretTokenAuthentication in place for back-compat throughout.

Tasks

  • remote_config: add ProjectSecretAPIKeyAuthentication and psak_allowed_actions = ["remote_config"], keep TeamSecretTokenAuthentication, and confirm scope enforcement and team binding.
  • Conversations external API: add PSAK support alongside (or replacing) the direct Q(secret_api_token=…) lookup. This product chose the team secret token deliberately because api_token is public, so loop in its owners and confirm PSAK semantics fit.
  • Resolve the header-only vs body-token difference. Legacy auth accepts the token in the request body; PSAK is header-only. Audit whether anything sends the secret token in the body for these endpoints; if so it stays on the legacy path until it moves to the header.

Acceptance

  • A feature_flag:read PSAK authenticates remote_config (and any other migrated surface) with correct scope and team enforcement.
  • Existing team secret tokens keep working unchanged.

Activity

  1. moved this to In Review in Feature Flagson Jun 30, 2026
  2. patricio-posthog commented on Jul 6, 2026

    @patricio-posthog
    Contributor

    Body token audit is done. I checked all our server SDKs (python, node, php, go, ruby, rust, dotnet and java) and every single one sends the key as an Authorization header, none of them ever puts it in the request body. On top of that, the counter we've had in production since March (api_auth_secret_api_key_body) has never fired once, in US or EU. Also all the endpoints that accept this token are GET or read the header only, so there is nowhere a body token could even arrive.

  3. moved this from In Review to In Progress in Feature Flagson Jul 31, 2026
  4. moved this from In Progress to Todo in Feature Flagson Aug 10, 2026
  5. moved this from Todo to No status in Feature Flagson Aug 10, 2026
  6. moved this from Todo to In Progress in Feature Flagson Sep 8, 2026
  7. patricio-posthog commented on Sep 30, 2026

    @patricio-posthog
    Contributor

    Conversations external API: resolved. Instead of adding PSAK support "alongside or replacing" the token lookup, the route now dual-accepts: GET takes a project secret API key with the new support_ticket:read scope (#107942, merged with the Conversations team's OK), and the legacy token keeps working until the column drop. Same pattern customer analytics used in #97599. With this, every surface in this phase accepts PSAKs.

  8. patricio-posthog commented on Sep 30, 2026

    @patricio-posthog
    Contributor

    All three items done — closing Phase 2. Remaining phases tracked in #66178 (customer migration via the hashed-token backfill) and #66179 (deprecate and drop).

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

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions