Add the setting that requires a server credential, switched off

Abierto
#4,240 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Python
Estrellas
18
Forks
33
Merge medio
2 d 14 h
PR fusionados (30 d)
116

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PolicyEngine/policyengine-api

Todos los issues de PolicyEngine/policyengine-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.