Add the setting that requires a server credential, switched off

Aperta
#4,240 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Once every PolicyEngine caller sends a server credential (#4236), the Public API needs a setting that refuses everyone else. This issue adds it, switched off; turning it on is a later, separate step.

Done when the Public API has a setting that, when on:

  • refuses every request without a valid server credential with 401, WWW-Authenticate: Bearer, Content-Type: application/json and {"status":"error","message":"Authentication is required"}, with no other guidance;
  • does so before route matching, so / and unknown paths are refused too;
  • exempts only GET and HEAD /health, GET /v2/openapi.json and CORS preflight OPTIONS requests, in the Public API's own code, because Cloud Run's startup probe calls /health on the container directly;

and the setting is wired through the deploy scripts and workflows, merged switched off and deployed switched off in staging and production.

Lingua principale
Python
Stelle
18
Fork
33
Merge medio
2g 14h
PR unite (30g)
116

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-api

Tutte le issue di PolicyEngine/policyengine-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.