Skip to content

feat(endpoint-exposer): OPA authorization, JWT, tests y pre-commit hook#17

Open
sebastiancorrea81 wants to merge 42 commits into
mainfrom
feature/endpoint-exposer
Open

feat(endpoint-exposer): OPA authorization, JWT, tests y pre-commit hook#17
sebastiancorrea81 wants to merge 42 commits into
mainfrom
feature/endpoint-exposer

Conversation

@sebastiancorrea81

Copy link
Copy Markdown
Contributor

Resumen

Branch más completo para endpoint-exposer. Incluye todo lo de feat/endpoint-exposer más:

Autorización con OPA (implementa lo que authorization.enabled prometía pero no hacía)

  • templates/istio/opa-authz.yaml — deploy completo de OPA en istio-system: ConfigMap con política Rego, Deployment (x2 réplicas), Service. La política valida JWT: issuer, expiración, claims requeridos, método HTTP. Inyecta x-user-id y x-validated-by en requests válidos.
  • templates/istio/policies.yaml — ejemplos de AuthorizationPolicy (Istio) usando OPA como proveedor CUSTOM.
  • examples/jwt-working-solution.yamlRequestAuthentication + AuthorizationPolicy con JWT de nullplatform para referencia.

Testing

  • Suite completa de tests BATS: test_build_context.bats, test_build_httproute.bats, test_apply_cleanup.bats, test_integration.bats.
  • .githooks/pre-commit — hook que corre los tests automáticamente cuando se modifican archivos de endpoint-exposer.
  • scripts/setup-hooks.sh — configura el path de git hooks.

Otros

  • specs/notification-channel.json.tpl — nuevo.
  • scripts/istio/config — actualizado con OPA_PROVIDER_NAME.
  • templates/istio/httproute.yaml.tpl — template actualizado.

Test plan

  • Ejecutar ./test/run-tests.sh y verificar que todos los tests BATS pasan
  • Desplegar opa-authz.yaml en un cluster de prueba y verificar que OPA levanta
  • Probar un request con JWT válido e inválido contra una ruta protegida
  • Verificar que el pre-commit hook bloquea commits cuando los tests fallan

feat: implement external dns and httproute

feat: change logic to get specification id

feat: add switch for different dns types

feat: add switch for different dns types

feat: add endpoint exposer service specs

feat: add domain editable

feat: add domain editable

feat: implement new route schema

feat: implement new route schema

feat: implement new route schema

feat: implement new route schema

feat: implement new route schema

feat: implement new route schema

fix: get scope

fix: get scope

fix: path

fix: get httproute if exists

fix: get httproute if exists

fix: get httproute rules

feat: implement echo for link and unlink

feat: implement echo for link and unlink

feat: implement echo for link and unlink

feat: implement echo for link and unlink

feat: implement echo for link and unlink

chore: change service slug

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: update flow

feat: accept prefix and reg ex
javi-null and others added 12 commits January 12, 2026 16:35
Add git pre-commit hook that automatically runs BATS tests before each commit
when endpoint-exposer files are modified. This ensures code quality and prevents
breaking changes from being committed.

- Create .githooks/pre-commit hook at repo root to run tests
- Add scripts/setup-hooks.sh to configure git hooks path
- Update test/README.md with hook setup instructions
- Hook only runs tests when endpoint-exposer files are changed

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants