個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Add secutiry to Ansible with agents
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Système permettant d'exécuter des playbooks Ansible sur des hôtes distants sans connexion SSH entrante. Les agents clients initient eux-mêmes la connexion vers un serveur central (modèle Salt Minion, connexions inversées).檢視完整 README ↗
Système permettant d'exécuter des playbooks Ansible sur des hôtes distants sans connexion SSH entrante. Les agents clients initient eux-mêmes la connexion vers un serveur central (modèle Salt Minion, connexions inversées).
enrollment / plugin / relay-parent, API d'administration protégée par ADMIN_TOKEN?relay=<id> pour le scopingansible_* et secagent_*, marqueurs Jinja interditsPrérequis : Docker, Docker Compose, openssl, binaire secagent-minion.
Le parcours complet et commenté (certificat auto-signé avec SAN, state init, jetons, agent,
inventaire, exécution) est dans DOC/project/QUICKSTART.md. En résumé :
cd DEPLOYMENT/qualif # Compose réel : docker-compose.server.yml (SECAGENT_IMAGE et QUALIF_TLS_DIR requis)
# 1. État initial (RSA_MASTER_KEY requis dans qualif.env ; le serveur refuse de démarrer sans relay.state)
docker compose -p secagent-qualif -f docker-compose.server.yml run --rm secagent-server-a state init
# 2. Démarrer (deux instances actif/passif sur un volume partagé ; le secondaire n'ouvre aucun port)
docker compose -p secagent-qualif -f docker-compose.server.yml up -d
curl -s --cacert tls/tls.crt https://localhost:7770/health
# 3. Jetons (CLI du serveur ; rôles : enrollment | plugin | relay-child | relay-parent)
docker compose -p secagent-qualif -f docker-compose.server.yml exec \
-e RELAY_API_URL=https://localhost:7771 -e REPEATER_CA_FILE=/certs/tls.crt \
secagent-server-a secagent-server tokens create --role enrollment --expires 1h
L'agent (secagent-minion) se configure par variables d'environnement
(RELAY_ENROLLMENT_TOKEN, RELAY_SERVER_URL, RELAY_WS_URL avec le chemin /ws/agent…) ;
GET /api/inventory exige un jeton plugin. Voir DEPLOYMENT/README.md
pour un guide complet.
ansible-secagent/
├── GO/ # Code source GO (compilé)
│ ├── cmd/secagent-server/ # Serveur relay (TLS natif, état fichier, actif/passif)
│ ├── cmd/secagent-minion/ # Agent client (WebSocket persistante, subprocess)
│ └── cmd/secagent-inventory/ # Inventaire statique/dynamique (binaire GO)
│
├── SECAGENT-PYTHON/ # Plugin Ansible (Python — contrainte Ansible)
│ ├── ansible_plugins/
│ │ ├── connection_plugins/relay.py - ConnectionBase (dispatch vers relay)
│ │ └── inventory_plugins/relay.py - Inventaire dynamique
│ └── README.md
│
├── DEPLOYMENT/ # Configs Docker Compose
│ ├── qualif/docker-compose.server.yml - Qualif : 2 instances actif/passif, certificat self-signed
│ │ (les autres Compose de qualif/ sont OBSOLETES en v3.0.3)
│ ├── prod/docker-compose.server.yml - Prod : relay racine, identique sur N hôtes (actif/passif)
│ ├── prod/docker-compose.child.yml - Surcharge pour un relay enfant
│ ├── prod/.env.example - Variables non-secrets
│ ├── prod/prod.env.example - Secrets (TLS_*, RSA_MASTER_KEY, JWT_*)
│ └── README.md - Guide déploiement complet
│
├── DOC/ # Documentation vivante
│ ├── common/ARCHITECTURE.md - Spécifications techniques v3.0.3
│ ├── common/HLD.md - Architecture haut niveau
│ ├── security/SECURITY.md - Modèle sécurité (enrollment, tokens, avis)
│ ├── security/PORTS_SECURITY.md - Architecture ports (7770/7771/7772)
│ ├── server/SERVER_SPEC.md - Specs secagent-server
│ ├── agent/AGENT_SPEC.md - Specs secagent-minion
│ ├── plugins/PLUGINS_SPEC.md - Specs plugins Ansible
│ ├── inventory/INVENTORY_SPEC.md - Specs secagent-inventory
│ └── project/ - Guides opérationnels
│ ├── DEPLOYMENT.md
│ ├── INSTALL_AGENT.md / INSTALL_SERVER.md / INSTALL_RELAY.md
│ └── QUICKSTART.md
│
├── README.md # Ce fichier
└── CLAUDE.md # Instructions Claude Code
| Document | Contenu |
|---|---|
| ARCHITECTURE.md | Spécifications techniques détaillées (protocoles, formats, sécurité) |
INSTALL_AGENT.md, INSTALL_SERVER.md, INSTALL_RELAY.md (DOC/project/) | Guides d'installation et de configuration : agent, serveur racine, relays enfants |
| DEPLOYMENT.md | Guide complet de déploiement (server + minions), montées de version, rotations |
| HLD.md | Architecture haut niveau et flux de messages |
| CLAUDE.md | Instructions projet pour Claude Code |
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Ansible │ │ Relay v3.0.4│ │ Relay Agent │
│ Control │───────▶│ Server │◀──────▶│ (Minion) │
│ Machine │ │ (GO, TLS) │ │ (GO) │
└─────────────┘ └──────────────┘ └──────────────┘
│ │ │
└── HTTPS REST ─────────┘ │
│ ▲ │
│ │ │
└─ WSS (7772) ─ WebSocket Direct ──────────────┘
(Connexion persistante, multiplexée par task_id)
| Aspect | SSH | Ansible-SecAgent |
|---|---|---|
| Connexion | Entrante (serveur initie) | Sortante (agent initie) |
| Firewall | SSH port ouvert | Sortante HTTPS uniquement |
| Credentials | SSH keys distribuées | JWT + RSA-4096 |
| Scaling | N connexions SSH | 1 WebSocket par agent |
| NAT Friendly | Difficile | Natif (agents derrière NAT) |
RSA_MASTER_KEY), verrou fichier (relay.lock, battement) sur stockage partagé (NFS)Voir DOC/security/SECURITY.md pour le modèle complet et ses limites connues.
secagent_enr_…, secagent_plg_…), jeton relay-parent signéTLS_DISABLE : tests uniquement)ADMIN_TOKEN toujours exigéstate rekey (fusionnée, tag non posé)Dernière version publiée : v3.0.3 — GO rewrite 100%, state file HA. v3.0.4 (jetons de lien EdDSA signés par la racine, state rekey, limites de concurrence) est fusionnée dans main mais pas encore publiée : voir docs/releases/v3.0.4.md.
ARCHITECTURE.md et HLD.mdDEPLOYMENT.mdCLAUDE.md pour les conventionscd GO && JWT_SECRET_KEY=test ADMIN_TOKEN=test go test ./... -v (Go) ; pytest dans SECAGENT-PYTHON/ (plugins)MVP Status : ✅ COMPLETE — Prêt pour qualification