diff --git a/atelier_secu.md b/atelier_secu.md index 56036c774561d99a3aac791dc9fb7f39c70bef69..b509f0d8a8db39b263fcb7b3311ed6773c362ef1 100644 --- a/atelier_secu.md +++ b/atelier_secu.md @@ -28,7 +28,7 @@ Nous avons choisi de concevoir une entreprise fournissant une version simplifié - problème wildcards - vérifier l'identité du possesseur du mail → via a challenge-and-response email exchange with the address in the WHOIS entry, for example -- expiration des certificats racines et intermédiaires +- expiration des certificats racines et intermédiaires → bridge CA - service de support - gestion des clefs privées - changement de protocoles sécurisés @@ -37,11 +37,66 @@ Nous avons choisi de concevoir une entreprise fournissant une version simplifié - Trust sign ? -## Outils à explorer (choisir un): +## Outils : +- MicroK8s (infra) - https://www.vaultproject.io/ -- https://docs.cosmian.com/ -- https://openxpki.readthedocs.io/en/stable/quickstart.html +## Schéma de l'infrastructure à clef publique -## Schéma de l'infrastructure à clef publique \ No newline at end of file +## Nom de l'entreprise : + +- ChepiA + +## Commandes : + +### Set up k8s cluster + install Vault + +``` +sudo snap install microk8s --classic --channel=1.29 +microk8s enable dns hostpath-storage dashboard +microk8s helm repo add hashicorp https://helm.releases.hashicorp.com +microk8s helm install vault hashicorp/vault +microk8s kubectl exec -ti vault-0 -- vault operator init +microk8s kubectl port-forward vault-0 8200:8200 +``` + +tokens : +Unseal Key 1: 80pqLahtRotMHBFUVDlw4Ax3MU3aPfZAvFhRe7SFoWOl +Unseal Key 2: dBShI3QRLLoEmu9bT5BV/mqOyxPC8HqmiETwxpeuD7qc +Unseal Key 3: q+uRd7IB1GuejUz+RWoc+iuUuWxC3t2S53vDO3pqlFEa +Unseal Key 4: 5/G/CndGOYuDR6X+/zMeMyK8BbswRuWpPexf0zswaNwt +Unseal Key 5: Oesp4xJ3xTElpgJm+bRfQ9Ia0cYdxiQZa3h9o3hQxK3c + +Initial Root Token: hvs.zWAYhaUkch0hfgfi18fduTvl + +--> Pour déverrouiller Vault, il faut que 3 des 5 tokens créés soit renseignés. On doit ensuite se logger avec le token root + +### Configurer le PKI : + +#### Root CA : + +Commandes : + +``` +microk8s kubectl exec -ti vault-0 -- sh +export VAULT_TOKEN=hvs.zWAYhaUkch0hfgfi18fduTvl +vault secrets enable pki +vault secrets tune -max-lease-ttl=336h pki +vault write pki/roles/chepia-servers allow_any_name=true +vault write pki/config/urls issuing_certificates="$VAULT_ADDR/v1/pki/ca" \ crl_distribution_points="$VAULT_ADDR/v1/pki/crl" +``` + +→ TTL de 2 semaine ( pour tester le bridge CA ) +→ Rôle permissif au niveau des noms (a changer ?) + +#### Intermediate CA : + +Commandes : + +``` +vault secrets enable -path=pki_int pki +vault secrets tune -max-lease-ttl=240h pki_int +``` + +→ TTL 10 jours \ No newline at end of file diff --git a/images/vault-seal.md b/images/vault-seal.md new file mode 100644 index 0000000000000000000000000000000000000000..a4235bfe70be2b93d54d4c015557c63b09d4e2f0 Binary files /dev/null and b/images/vault-seal.md differ