SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
This document is confidential and personal to its recipients © ITQ 2022
HashiTalks: France 2023
Sécurisez la distribution
automatique de vos
certificats
This document is confidential and personal to its recipients © ITQ 2022
Stéphane Este-Gracias
@sestegra
§ Défenseur et promoteur des logiciels libres et open source
§ Catalyseur des transformations Cloud Native chez ITQ
§ Mentorat technologique
§ Développement des talents
§ Développement de la topologie des équipes
§ Organisateur des communités d’utilisateurs
HashiCorp et CNCF au Luxembourg
2
This document is confidential and personal to its recipients © ITQ 2022
Agenda
§ Pourquoi automatiser le cycle de vie de
vos certificats à l’aide de Vault ?
§ Construire une PKI interne avec Vault
§ Générer et déployer des certificats feuilles
§ Renouveler les certificats feuilles
§ Rotation des CAs en toute transparence
§ Prochaines étapes
3
This document is confidential and personal to its recipients © ITQ 2022
Attention
§ Pour simplifier la démo, le token
"root" est utilisé intentionnellement
pour se concentrer uniquement sur les
fonctionnalités du Secret Engine PKI
§ Ne pas utiliser le token "root" en
production
§ Voir ”Prochaines étapes” pour la mise
en production
4
This document is confidential and personal to its recipients © ITQ 2022
Pourquoi automatiser
le cycle de vie de vos certificats avec Vault ?
§ Facilitez la gestion de la hiérarchie de votre PKI
§ Faciliter le cycle de vie de la CA (émission, rotation)
§ Faciliter le renouvellement et le déploiement des
certificats feuilles
§ Supprimer l'utilisation des certificats Wildcard
§ Par exemple *.example.com
§ Principe de moindre privilège
§ Obtenir une source unique de confiance
§ Générer un journal d'audit
5
This document is confidential and personal to its recipients © ITQ 2022
Construire une PKI
avec Vault
6
This document is confidential and personal to its recipients © ITQ 2022
PKI avec une hiérarchie de CA à trois niveaux
Root CA
Intermediate
CA
Issuing
CA
Leaf
Cert
Issuing
CA
Issuing
CA
Leaf
Cert
Leaf
Cert
Intermedate
CA
Issuing
CA
Leaf
Cert
Issuing
CA
Issuing
CA
Leaf
Cert
Leaf
Cert
Intermediate
CA
Issuing
CA
Leaf
Cert
Issuing
CA
Issuing
CA
Leaf
Cert
Leaf
Cert
This document is confidential and personal to its recipients © ITQ 2022
Configuration de la PKI de démo
§ Root CA hors ligne
§ Intermediate CA dans Vault
§ Issuing CA dans Vault
§ Un Role pour générer les certificats
§ Elliptic Curve Digital Signature Algorithm
§ ECDSA P-256
§ Clés plus résistantes
§ Certificats plus compactes
8
Root CA (offline)
Intermediate CA
Issuing CA
Leaf Certificate
Leaf Certificate
Leaf Certificate
This document is confidential and personal to its recipients © ITQ 2022
Root CA
§ Root CA hors ligne
§ Implémentation
§ Paramétrage
§ path_len = 2
§ Terraform avec le provider hashicorp/tls
§ Configuration d’une Root CA auto-signée
9
Root CA (offline)
path_len = 2
This document is confidential and personal to its recipients © ITQ 2022
Intermediate CA
§ Intermediate CA géré par Vault
§ Implémentation
§ Paramétrage
§ mount = pki_int
§ path_len = 1
§ Activer le Secret Engine PKI
§ Générer une Private Key et un CSR
§ Signer et générer un certificat à l'aide
de la Root CA
§ Stocker le certificat Intermediate
10
Root CA (offline)
path_len = 2
Intermediate CA
mount = pki_int
path_len = 1
This document is confidential and personal to its recipients © ITQ 2022
Issuing CA
§ Issuing CA géré par Vault
§ Implémentation
§ Paramétrage
§ mount = pki_iss
§ Activer le Secret Engine PKI
§ Générer une Private Key et un CSR
§ Signer et générer un certificat à l'aide
de la Intermediate CA
§ Stocker le certificat Issuing + Intermediate
11
Root CA (offline)
path_len = 2
Intermediate CA
mount = pki_int
path_len = 1
Issuing CA
mount = pki_iss
This document is confidential and personal to its recipients © ITQ 2022
§ Role pour générer les certificats
§ Implémentation
§ Paramétrage
§ name = example
§ allowed_domains = example.com
§ allowed_subdomains = true
§ allow_wildcard_certificates = false
§ Créer le Role pour générer les certificats
Issuing CA / Role
12
Root CA (offline)
path_len = 2
Intermediate CA
mount = pki_int
path_len = 1
Issuing CA
mount = pki_iss
Role ‘example’
allowed_domains = example.com
allowed_subdomains = true
allowed_wildcard = false
This document is confidential and personal to its recipients © ITQ 2022
§ Role pour générer les certificats
§ Implémentation
§ Paramétrage
§ common_name = sample.example.com
§ Générer le certificat issue du Role example
Génération manuelle
d’un certificat
13
Root CA (offline)
path_len = 2
Intermediate CA
mount = pki_int
path_len = 1
Issuing CA
mount = pki_iss
Role ‘example’
allowed_domains = example.com
allowed_subdomains = true
allowed_wildcard = false
Certificate
cn = sample.example.com
This document is confidential and personal to its recipients © ITQ 2022
Démo
This document is confidential and personal to its recipients © ITQ 2022
Déploiement des certificats
15
This document is confidential and personal to its recipients © ITQ 2022
Solutions possibles
§ Consul Template (utilisé dans la demo)
§ Vault Agent sur un serveur
§ Vault Agent dans Kubernetes
§ Nomad
§ …
This document is confidential and personal to its recipients © ITQ 2022
Consul Template
Templating Language
§ Format et fonctions de Go Template
§ Fonctions additionelles
§ Requêtes vers Consul, Vault et Nomad
17
This document is confidential and personal to its recipients © ITQ 2022
Consul Template
Templates pour Certificats
18
CODE EDITOR
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.private_key }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.certificate }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.ca_chain }}
{{- end -}}
{{- with secret "pki_iss/cert/ca_chain" -}}
{{ .Data.ca_chain }}
{{- end -}}
This document is confidential and personal to its recipients © ITQ 2022
Consul Template
Templates pour Certificats
19
CODE EDITOR
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.private_key }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.certificate }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.ca_chain }}
{{- end -}}
{{- with secret "pki_iss/cert/ca_chain" -}}
{{ .Data.ca_chain }}
{{- end -}}
This document is confidential and personal to its recipients © ITQ 2022
Consul Template
Templates pour Certificats
20
CODE EDITOR
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.private_key }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.certificate }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.ca_chain }}
{{- end -}}
{{- with secret "pki_iss/cert/ca_chain" -}}
{{ .Data.ca_chain }}
{{- end -}}
This document is confidential and personal to its recipients © ITQ 2022
Consul Template
Templates pour Certificats
21
CODE EDITOR
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.private_key }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.certificate }}
{{- end -}}
{{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}}
{{ .Data.ca_chain }}
{{- end -}}
{{- with secret "pki_iss/cert/ca_chain" -}}
{{ .Data.ca_chain }}
{{- end -}}
This document is confidential and personal to its recipients © ITQ 2022
Démo
This document is confidential and personal to its recipients © ITQ 2022
Renouvellement des
certificats
23
This document is confidential and personal to its recipients © ITQ 2022
Renouvellement automatique
§ Les certificats sont automatiquement renouvelés
§ Utilisez le bloc exec dans la configuration pour exécuter une commande
lorsque le template est rendu et que la sortie a changé
CODE EDITOR
exec {
command = [ "systemctl", "reload”, "nginx" ]
timeout = “30s”
}
This document is confidential and personal to its recipients © ITQ 2022
Démo
This document is confidential and personal to its recipients © ITQ 2022
Rotation transparente
des CAs
26
This document is confidential and personal to its recipients © ITQ 2022
Fonctionnalité Multi-Issuer
§ Vault 1.11.0 ou supérieur
§ Prise en charge de plusieurs versions de CAs
dans le même Secret Engine PKI
§ Simplification de la rotation de la CA
§ Secret Engine définit un default_issuer
§ Le Role définit un issuer_ref issuer
CA
default issuer = v1
v1 Role A
issuer_ref = default
Leaf
Certificate
v1
This document is confidential and personal to its recipients © ITQ 2022
Transition d’une CA
§ Création d’un issuer v2
§ default issuer est entouré de vert
CA
default issuer = v1
v1 Role A
issuer_ref = default
Leaf
Certificate
v1
v2
This document is confidential and personal to its recipients © ITQ 2022
Transition d’une CA
§ Création d’un Role B utilisant l’issuer v1
CA
default issuer = v1
Role A
issuer_ref = default
Leaf
Certificate
v1
v2 Role B
issuer_ref = v1
Leaf
Certificate
v1
v1
This document is confidential and personal to its recipients © ITQ 2022
Transition d’une CA
§ Création d’un Role C utilisant l’issuer v2
CA
default issuer = v1
Role A
issuer_ref = default
Leaf
Certificate
v1
v2 Role B
issuer_ref = v1
Leaf
Certificate
Role C
issuer_ref = v2
Leaf
Certificate
v1 v2
v1
This document is confidential and personal to its recipients © ITQ 2022
Transition d’une CA
§ Passage du default issuer à v2
CA
default issuer = v2
Role A
issuer_ref = default
Leaf
Certificate
v2
v2 Role B
issuer_ref = v1
Leaf
Certificate
Role C
issuer_ref = v2
Leaf
Certificate
v1 v2
v1
This document is confidential and personal to its recipients © ITQ 2022
Rotation de l’Issuing CA
(Démo)
32
This document is confidential and personal to its recipients © ITQ 2022
Démo
This document is confidential and personal to its recipients © ITQ 2022
Prochaines étapes
45
This document is confidential and personal to its recipients © ITQ 2022
Chemin vers la production
POC -> MVP -> Production
§ Déployer Vault selon l’architecture de référence
This document is confidential and personal to its recipients © ITQ 2022
Chemin vers la production
POC -> MVP -> Production
§ Codification de la configuration Vault avec le provider Terraform hashicorp/vault
§ Création la PKI,
§ Activation des Auth Methods
§ Création des Policies
§ Principe de moindre privilège
§ Gestion de l’authentification de Vault Agent, Kubernetes, Nomad
§ Désactivaction de vos anciennes CAs
47
This document is confidential and personal to its recipients © ITQ 2022
Takeaways
48
This document is confidential and personal to its recipients © ITQ 2022
Takeaways
§ Pourquoi automatiser le cycle de vie de
vos certificats à l’aide de Vault ?
§ Construire une PKI interne avec Vault
§ Générer et déployer des certificats
§ Renouveler les certificats
§ Rotation des CAs en toute transparence
49
Merci!
Author XXXX
Version XXXX
Pour plus d’informations
N’hésitez pas à me contacter
ITQ aux Pays-Bas
Parallelweg 94
1948 NM Beverwijk
The Netherlands
T: +31 251 82 88 03
www.itq.eu
info@itq.eu
ITQ en Belgique
Interleuvenlaan 62
3001 Leuven
Belgium
T: +32 16 39 47 39
www.itq.eu
info@itq.eu
ITQ en Allemagne
Peter-Jakob-Busch-Straße
24 47906, Kempen
Germany
T: +49 215 2148 5150
www.itq.eu
info@itq.eu
ITQ au Luxembourg
West Side Village
89E Rue Pafebruch
8308 Mamer
Luxembourg
www.itq.eu
info@itq.eu
ITQ en France
10, rue Michel
Servet
59000 Lille
France
www.itq.eu
info@itq.eu
Stéphane Este-Gracias
sestegra@itq.eu
GitHub / Linkedin / Medium / Twitter
@sestegra
50

Más contenido relacionado

Similar a HashiTalks France 2023 - Sécurisez la distribution automatique de vos certificats

Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiazznate
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).DataStax Academy
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesNick Maludy
 
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptx
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptxOralce SSL walelt -TCPS_Troubleshooting_PB.pptx
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptxssuser865ecd
 
When Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and DeathWhen Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and DeathHostedbyConfluent
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiazznate
 
K8s hard-way on DigitalOcean
K8s hard-way on DigitalOceanK8s hard-way on DigitalOcean
K8s hard-way on DigitalOceanCloudYuga
 
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur....NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...NETFest
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...Nick Maludy
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 
SSL/TLS for Mortals (J-Fall)
SSL/TLS for Mortals (J-Fall)SSL/TLS for Mortals (J-Fall)
SSL/TLS for Mortals (J-Fall)Maarten Mulders
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layerBU
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Netwax Lab
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat Security Conference
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxCarlo Sacchi
 
SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)Maarten Mulders
 
SSL/TLS for Mortals (JavaZone)
SSL/TLS for Mortals (JavaZone)SSL/TLS for Mortals (JavaZone)
SSL/TLS for Mortals (JavaZone)Maarten Mulders
 

Similar a HashiTalks France 2023 - Sécurisez la distribution automatique de vos certificats (20)

Implementing cert-manager in K8s
Implementing cert-manager in K8sImplementing cert-manager in K8s
Implementing cert-manager in K8s
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
 
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptx
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptxOralce SSL walelt -TCPS_Troubleshooting_PB.pptx
Oralce SSL walelt -TCPS_Troubleshooting_PB.pptx
 
When Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and DeathWhen Securing Access to Data is About Life and Death
When Securing Access to Data is About Life and Death
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
K8s hard-way on DigitalOcean
K8s hard-way on DigitalOceanK8s hard-way on DigitalOcean
K8s hard-way on DigitalOcean
 
320.1-Cryptography
320.1-Cryptography320.1-Cryptography
320.1-Cryptography
 
Let's Encrypt!
Let's Encrypt!Let's Encrypt!
Let's Encrypt!
 
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur....NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 
SSL/TLS for Mortals (J-Fall)
SSL/TLS for Mortals (J-Fall)SSL/TLS for Mortals (J-Fall)
SSL/TLS for Mortals (J-Fall)
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layer
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)
 
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
BlueHat v17 || Where, how, and why is SSL traffic on mobile getting intercept...
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
 
SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)
 
SSL/TLS for Mortals (JavaZone)
SSL/TLS for Mortals (JavaZone)SSL/TLS for Mortals (JavaZone)
SSL/TLS for Mortals (JavaZone)
 

Más de Stéphane Este-Gracias

Más de Stéphane Este-Gracias (11)

20221130 - Luxembourg HUG Meetup
20221130 - Luxembourg HUG Meetup20221130 - Luxembourg HUG Meetup
20221130 - Luxembourg HUG Meetup
 
20220928 - Luxembourg HUG Meetup
20220928 - Luxembourg HUG Meetup20220928 - Luxembourg HUG Meetup
20220928 - Luxembourg HUG Meetup
 
20220202 - Luxembourg HUG Meetup
20220202 - Luxembourg HUG Meetup20220202 - Luxembourg HUG Meetup
20220202 - Luxembourg HUG Meetup
 
20220608 - Luxembourg HUG Meetup
20220608 - Luxembourg HUG Meetup20220608 - Luxembourg HUG Meetup
20220608 - Luxembourg HUG Meetup
 
Shift your Workspaces to the Cloud
Shift your Workspaces to the CloudShift your Workspaces to the Cloud
Shift your Workspaces to the Cloud
 
Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017
 
AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017
 
Discover Dart - Meetup 15/02/2017
Discover Dart - Meetup 15/02/2017Discover Dart - Meetup 15/02/2017
Discover Dart - Meetup 15/02/2017
 
Discover Angular - Meetup 15/02/2017
Discover Angular - Meetup 15/02/2017Discover Angular - Meetup 15/02/2017
Discover Angular - Meetup 15/02/2017
 
Discover Flutter - Meetup 07/12/2016
Discover Flutter - Meetup 07/12/2016Discover Flutter - Meetup 07/12/2016
Discover Flutter - Meetup 07/12/2016
 
Discover Dart(lang) - Meetup 07/12/2016
Discover Dart(lang) - Meetup 07/12/2016Discover Dart(lang) - Meetup 07/12/2016
Discover Dart(lang) - Meetup 07/12/2016
 

Último

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Último (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

HashiTalks France 2023 - Sécurisez la distribution automatique de vos certificats

  • 1. This document is confidential and personal to its recipients © ITQ 2022 HashiTalks: France 2023 Sécurisez la distribution automatique de vos certificats
  • 2. This document is confidential and personal to its recipients © ITQ 2022 Stéphane Este-Gracias @sestegra § Défenseur et promoteur des logiciels libres et open source § Catalyseur des transformations Cloud Native chez ITQ § Mentorat technologique § Développement des talents § Développement de la topologie des équipes § Organisateur des communités d’utilisateurs HashiCorp et CNCF au Luxembourg 2
  • 3. This document is confidential and personal to its recipients © ITQ 2022 Agenda § Pourquoi automatiser le cycle de vie de vos certificats à l’aide de Vault ? § Construire une PKI interne avec Vault § Générer et déployer des certificats feuilles § Renouveler les certificats feuilles § Rotation des CAs en toute transparence § Prochaines étapes 3
  • 4. This document is confidential and personal to its recipients © ITQ 2022 Attention § Pour simplifier la démo, le token "root" est utilisé intentionnellement pour se concentrer uniquement sur les fonctionnalités du Secret Engine PKI § Ne pas utiliser le token "root" en production § Voir ”Prochaines étapes” pour la mise en production 4
  • 5. This document is confidential and personal to its recipients © ITQ 2022 Pourquoi automatiser le cycle de vie de vos certificats avec Vault ? § Facilitez la gestion de la hiérarchie de votre PKI § Faciliter le cycle de vie de la CA (émission, rotation) § Faciliter le renouvellement et le déploiement des certificats feuilles § Supprimer l'utilisation des certificats Wildcard § Par exemple *.example.com § Principe de moindre privilège § Obtenir une source unique de confiance § Générer un journal d'audit 5
  • 6. This document is confidential and personal to its recipients © ITQ 2022 Construire une PKI avec Vault 6
  • 7. This document is confidential and personal to its recipients © ITQ 2022 PKI avec une hiérarchie de CA à trois niveaux Root CA Intermediate CA Issuing CA Leaf Cert Issuing CA Issuing CA Leaf Cert Leaf Cert Intermedate CA Issuing CA Leaf Cert Issuing CA Issuing CA Leaf Cert Leaf Cert Intermediate CA Issuing CA Leaf Cert Issuing CA Issuing CA Leaf Cert Leaf Cert
  • 8. This document is confidential and personal to its recipients © ITQ 2022 Configuration de la PKI de démo § Root CA hors ligne § Intermediate CA dans Vault § Issuing CA dans Vault § Un Role pour générer les certificats § Elliptic Curve Digital Signature Algorithm § ECDSA P-256 § Clés plus résistantes § Certificats plus compactes 8 Root CA (offline) Intermediate CA Issuing CA Leaf Certificate Leaf Certificate Leaf Certificate
  • 9. This document is confidential and personal to its recipients © ITQ 2022 Root CA § Root CA hors ligne § Implémentation § Paramétrage § path_len = 2 § Terraform avec le provider hashicorp/tls § Configuration d’une Root CA auto-signée 9 Root CA (offline) path_len = 2
  • 10. This document is confidential and personal to its recipients © ITQ 2022 Intermediate CA § Intermediate CA géré par Vault § Implémentation § Paramétrage § mount = pki_int § path_len = 1 § Activer le Secret Engine PKI § Générer une Private Key et un CSR § Signer et générer un certificat à l'aide de la Root CA § Stocker le certificat Intermediate 10 Root CA (offline) path_len = 2 Intermediate CA mount = pki_int path_len = 1
  • 11. This document is confidential and personal to its recipients © ITQ 2022 Issuing CA § Issuing CA géré par Vault § Implémentation § Paramétrage § mount = pki_iss § Activer le Secret Engine PKI § Générer une Private Key et un CSR § Signer et générer un certificat à l'aide de la Intermediate CA § Stocker le certificat Issuing + Intermediate 11 Root CA (offline) path_len = 2 Intermediate CA mount = pki_int path_len = 1 Issuing CA mount = pki_iss
  • 12. This document is confidential and personal to its recipients © ITQ 2022 § Role pour générer les certificats § Implémentation § Paramétrage § name = example § allowed_domains = example.com § allowed_subdomains = true § allow_wildcard_certificates = false § Créer le Role pour générer les certificats Issuing CA / Role 12 Root CA (offline) path_len = 2 Intermediate CA mount = pki_int path_len = 1 Issuing CA mount = pki_iss Role ‘example’ allowed_domains = example.com allowed_subdomains = true allowed_wildcard = false
  • 13. This document is confidential and personal to its recipients © ITQ 2022 § Role pour générer les certificats § Implémentation § Paramétrage § common_name = sample.example.com § Générer le certificat issue du Role example Génération manuelle d’un certificat 13 Root CA (offline) path_len = 2 Intermediate CA mount = pki_int path_len = 1 Issuing CA mount = pki_iss Role ‘example’ allowed_domains = example.com allowed_subdomains = true allowed_wildcard = false Certificate cn = sample.example.com
  • 14. This document is confidential and personal to its recipients © ITQ 2022 Démo
  • 15. This document is confidential and personal to its recipients © ITQ 2022 Déploiement des certificats 15
  • 16. This document is confidential and personal to its recipients © ITQ 2022 Solutions possibles § Consul Template (utilisé dans la demo) § Vault Agent sur un serveur § Vault Agent dans Kubernetes § Nomad § …
  • 17. This document is confidential and personal to its recipients © ITQ 2022 Consul Template Templating Language § Format et fonctions de Go Template § Fonctions additionelles § Requêtes vers Consul, Vault et Nomad 17
  • 18. This document is confidential and personal to its recipients © ITQ 2022 Consul Template Templates pour Certificats 18 CODE EDITOR {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.private_key }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.certificate }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.ca_chain }} {{- end -}} {{- with secret "pki_iss/cert/ca_chain" -}} {{ .Data.ca_chain }} {{- end -}}
  • 19. This document is confidential and personal to its recipients © ITQ 2022 Consul Template Templates pour Certificats 19 CODE EDITOR {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.private_key }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.certificate }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.ca_chain }} {{- end -}} {{- with secret "pki_iss/cert/ca_chain" -}} {{ .Data.ca_chain }} {{- end -}}
  • 20. This document is confidential and personal to its recipients © ITQ 2022 Consul Template Templates pour Certificats 20 CODE EDITOR {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.private_key }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.certificate }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.ca_chain }} {{- end -}} {{- with secret "pki_iss/cert/ca_chain" -}} {{ .Data.ca_chain }} {{- end -}}
  • 21. This document is confidential and personal to its recipients © ITQ 2022 Consul Template Templates pour Certificats 21 CODE EDITOR {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.private_key }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.certificate }} {{- end -}} {{- with secret "pki_iss/issue/example" "common_name=test.example.com" -}} {{ .Data.ca_chain }} {{- end -}} {{- with secret "pki_iss/cert/ca_chain" -}} {{ .Data.ca_chain }} {{- end -}}
  • 22. This document is confidential and personal to its recipients © ITQ 2022 Démo
  • 23. This document is confidential and personal to its recipients © ITQ 2022 Renouvellement des certificats 23
  • 24. This document is confidential and personal to its recipients © ITQ 2022 Renouvellement automatique § Les certificats sont automatiquement renouvelés § Utilisez le bloc exec dans la configuration pour exécuter une commande lorsque le template est rendu et que la sortie a changé CODE EDITOR exec { command = [ "systemctl", "reload”, "nginx" ] timeout = “30s” }
  • 25. This document is confidential and personal to its recipients © ITQ 2022 Démo
  • 26. This document is confidential and personal to its recipients © ITQ 2022 Rotation transparente des CAs 26
  • 27. This document is confidential and personal to its recipients © ITQ 2022 Fonctionnalité Multi-Issuer § Vault 1.11.0 ou supérieur § Prise en charge de plusieurs versions de CAs dans le même Secret Engine PKI § Simplification de la rotation de la CA § Secret Engine définit un default_issuer § Le Role définit un issuer_ref issuer CA default issuer = v1 v1 Role A issuer_ref = default Leaf Certificate v1
  • 28. This document is confidential and personal to its recipients © ITQ 2022 Transition d’une CA § Création d’un issuer v2 § default issuer est entouré de vert CA default issuer = v1 v1 Role A issuer_ref = default Leaf Certificate v1 v2
  • 29. This document is confidential and personal to its recipients © ITQ 2022 Transition d’une CA § Création d’un Role B utilisant l’issuer v1 CA default issuer = v1 Role A issuer_ref = default Leaf Certificate v1 v2 Role B issuer_ref = v1 Leaf Certificate v1 v1
  • 30. This document is confidential and personal to its recipients © ITQ 2022 Transition d’une CA § Création d’un Role C utilisant l’issuer v2 CA default issuer = v1 Role A issuer_ref = default Leaf Certificate v1 v2 Role B issuer_ref = v1 Leaf Certificate Role C issuer_ref = v2 Leaf Certificate v1 v2 v1
  • 31. This document is confidential and personal to its recipients © ITQ 2022 Transition d’une CA § Passage du default issuer à v2 CA default issuer = v2 Role A issuer_ref = default Leaf Certificate v2 v2 Role B issuer_ref = v1 Leaf Certificate Role C issuer_ref = v2 Leaf Certificate v1 v2 v1
  • 32. This document is confidential and personal to its recipients © ITQ 2022 Rotation de l’Issuing CA (Démo) 32
  • 33. This document is confidential and personal to its recipients © ITQ 2022 Démo
  • 34. This document is confidential and personal to its recipients © ITQ 2022 Prochaines étapes 45
  • 35. This document is confidential and personal to its recipients © ITQ 2022 Chemin vers la production POC -> MVP -> Production § Déployer Vault selon l’architecture de référence
  • 36. This document is confidential and personal to its recipients © ITQ 2022 Chemin vers la production POC -> MVP -> Production § Codification de la configuration Vault avec le provider Terraform hashicorp/vault § Création la PKI, § Activation des Auth Methods § Création des Policies § Principe de moindre privilège § Gestion de l’authentification de Vault Agent, Kubernetes, Nomad § Désactivaction de vos anciennes CAs 47
  • 37. This document is confidential and personal to its recipients © ITQ 2022 Takeaways 48
  • 38. This document is confidential and personal to its recipients © ITQ 2022 Takeaways § Pourquoi automatiser le cycle de vie de vos certificats à l’aide de Vault ? § Construire une PKI interne avec Vault § Générer et déployer des certificats § Renouveler les certificats § Rotation des CAs en toute transparence 49
  • 39. Merci! Author XXXX Version XXXX Pour plus d’informations N’hésitez pas à me contacter ITQ aux Pays-Bas Parallelweg 94 1948 NM Beverwijk The Netherlands T: +31 251 82 88 03 www.itq.eu info@itq.eu ITQ en Belgique Interleuvenlaan 62 3001 Leuven Belgium T: +32 16 39 47 39 www.itq.eu info@itq.eu ITQ en Allemagne Peter-Jakob-Busch-Straße 24 47906, Kempen Germany T: +49 215 2148 5150 www.itq.eu info@itq.eu ITQ au Luxembourg West Side Village 89E Rue Pafebruch 8308 Mamer Luxembourg www.itq.eu info@itq.eu ITQ en France 10, rue Michel Servet 59000 Lille France www.itq.eu info@itq.eu Stéphane Este-Gracias sestegra@itq.eu GitHub / Linkedin / Medium / Twitter @sestegra 50