Skip to content

feat: sync OpenBao secrets to GitHub Actions via ESO#9

Merged
nbrieussel merged 1 commit into
mainfrom
feat/eso-github-secrets-sync
Jul 20, 2026
Merged

feat: sync OpenBao secrets to GitHub Actions via ESO#9
nbrieussel merged 1 commit into
mainfrom
feat/eso-github-secrets-sync

Conversation

@nbrieussel

Copy link
Copy Markdown
Contributor

Résumé

  • Câble ESO à OpenBao (ClusterSecretStore openbao, provider vault, auth kubernetes via le rôle external-secrets créé côté OpenBao).
  • Ajoute apps/secrets-sync/ : synchronise des secrets stockés dans OpenBao vers les Actions secrets GitHub (organisation / repo / environnement), via ESO PushSecret.
  • Une cible = un secret OpenBao dédié (kv/apps/secrets-sync/github/<name>), pas un blob partagé — évite de coupler la rotation de secrets sans rapport et permet une policy d'accès par cible.
  • Déploie clusters/{local,scaleway}/templates/secrets-sync.yaml. Le cluster scaleway est volontairement désactivé (targets: []) : GitHub est une ressource globale, un seul cluster doit faire autorité pour éviter deux sources d'écriture concurrentes.

Contexte / prérequis

  • Nécessite une GitHub App avec les permissions Secrets (repo), Environments (repo) et Organization secrets, installée sur l'org avec accès aux repos concernés. Chaque permission ajoutée après coup doit être explicitement acceptée sur la page d'installation de l'org, sinon l'API continue de refuser en 403 malgré la permission déclarée côté App.
  • La configuration interne d'OpenBao (auth kubernetes, policy eso-read, rôle external-secrets, moteur KV v2) est appliquée manuellement, hors git — documentée avec toutes les commandes dans openbao-claude.md à la racine du repo IntegratedDynamic.

Validation

Testé de bout en bout sur minikube : trois secrets de test (TEST_ORGA en secret d'organisation, TEST_REPO en secret du repo infrastructure, TEST_SCALEWAY en secret de l'environnement scaleway du même repo) écrits dans OpenBao et confirmés visibles côté GitHub via l'API (gh api .../actions/secrets).

helm lint apps/secrets-sync/ -f apps/secrets-sync/values-local.yaml
helm lint apps/openbao-init/ -f apps/openbao-init/values-local.yaml
helm template loc clusters/local/ --set revision=main

Plan de test

  • Après merge, vérifier que secrets-sync Application ArgoCD passe Synced/Healthy sur le cluster local
  • Vérifier que les ExternalSecret/PushSecret/SecretStore restent Ready=True après un sync ArgoCD complet (pas seulement un kubectl apply manuel)
  • Confirmer côté GitHub que les secrets de test sont toujours présents après reconciliation

🤖 Generated with Claude Code

https://claude.ai/code/session_01CCgyeSfKWH6m5mmJEg6t43

Cables ESO to OpenBao (ClusterSecretStore openbao, provider vault, auth
kubernetes via the external-secrets role created manually on OpenBao)
and adds apps/secrets-sync/, which pushes secrets stored in OpenBao to
GitHub Actions secrets (organization / repo / environment) via ESO
PushSecret.

Each target gets its own dedicated OpenBao secret
(kv/apps/secrets-sync/github/<name>) rather than one shared blob, so
unrelated destinations don't share a Vault version history or an
access policy. Deploys clusters/{local,scaleway}/templates/secrets-sync.yaml;
scaleway ships with targets: [] since GitHub is a global resource and
only one cluster should push to it.

Requires a GitHub App with Secrets (repo), Environments (repo), and
Organization secrets permissions, installed on the org with access to
the target repos — each permission added after the fact needs explicit
acceptance on the org's installation page. The manual OpenBao-side
config (kubernetes auth, eso-read policy, external-secrets role, KV v2
engine) lives outside git; fully documented with replayable commands
in openbao-claude.md at the IntegratedDynamic repo root.

Validated end-to-end on minikube: org, repo, and environment-scoped
secrets confirmed live on GitHub via the API after each iteration of
this design (including the per-target and github/ prefix refactors
folded into this squashed commit), and the real Scaleway credentials
now flowing to the infrastructure repo's scaleway environment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CCgyeSfKWH6m5mmJEg6t43
@nbrieussel
nbrieussel force-pushed the feat/eso-github-secrets-sync branch from 0b7e770 to 0c617f4 Compare July 20, 2026 15:08
@nbrieussel
nbrieussel merged commit 04ceb32 into main Jul 20, 2026
2 checks passed
@nbrieussel
nbrieussel deleted the feat/eso-github-secrets-sync branch July 20, 2026 15:10
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.

1 participant