Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog.limos.fr
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vincent MAZENOD
blog.limos.fr
Commits
1e73b750
Commit
1e73b750
authored
5 years ago
by
Vincent Mazenod
Browse files
Options
Downloads
Patches
Plain Diff
wip vault
parent
7982f9ae
No related branches found
No related tags found
No related merge requests found
Pipeline
#4269
passed
5 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content/slides/privacy/images/vault/password_management.jpg
+0
-0
0 additions, 0 deletions
content/slides/privacy/images/vault/password_management.jpg
content/slides/privacy/md/vault.md
+33
-72
33 additions, 72 deletions
content/slides/privacy/md/vault.md
with
33 additions
and
72 deletions
content/slides/privacy/images/vault/password_management.jpg
0 → 100644
+
0
−
0
View file @
1e73b750
813 KiB
This diff is collapsed.
Click to expand it.
content/slides/privacy/md/vault.md
+
33
−
72
View file @
1e73b750
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
## gestion de mot de passe
## gestion de mot de passe
[ photo ]

<!-- .element width="80%" -->
## services
s
## services
*
[
LastPass
](
https://www.lastpass.com/fr
)
*
[
LastPass
](
https://www.lastpass.com/fr
)
*
[
Dashlane
](
https://www.dashlane.com/
)
*
[
Dashlane
](
https://www.dashlane.com/
)
...
@@ -48,19 +48,35 @@
...
@@ -48,19 +48,35 @@
*
[
KeePass2Android
](
https://play.google.com/store/apps/details?id=keepass2android.keepass2android&hl=fr
)
*
[
KeePass2Android
](
https://play.google.com/store/apps/details?id=keepass2android.keepass2android&hl=fr
)
*
iKeePass?
*
iKeePass?
*
pas de gestion collaborative
<br
/>
*
pas d'ACL
### pas de gestion collaborative!
### pas d'ACL!
## Vault
## Vault
*
Un binaire:
[
https://releases.hashicorp.com/vault/
](
https://releases.hashicorp.com/vault/
)
*
Un binaire:
[
https://releases.hashicorp.com/vault/
](
https://releases.hashicorp.com/vault/
)
*
serveur
*
un serveur
*
créer un service systemd
*
une api
*
une UI
*
un cli
*
cli
*
[
écrit en go
](
https://github.com/hashicorp/hcl
)
*
`/usr/local/bin/vault `
*
[
auditable
](
https://www.vaultproject.io/docs/commands/audit/enable.html
)
*
cross plateform
## Utilisation
*
via la ligne de commande
*
[
binaire à télécharger
](
https://releases.hashicorp.com/vault/
)
*
cross plateform
*
deux variables d'environnement
*
$VAULT_ADDR=https://vault.isima.fr
*
$VAULT_TOKEN ou authentification ldap
*
via l'
[
<i class="fa fa-book" aria-hidden="true"></i> api
](
https://www.vaultproject.io/api/overview
)
## Configuration
## Configuration
...
@@ -181,68 +197,33 @@ $ vault login -method=ldap username=vimazeno
...
@@ -181,68 +197,33 @@ $ vault login -method=ldap username=vimazeno
*
stocke le token d'authentificayion dans ~/.vault-token
*
stocke le token d'authentificayion dans ~/.vault-token
## LDAP
```
shell
$
vault write auth/ldap/config
\
url
=
"ldaps://samantha.local.isima.fr"
\
userattr
=
"sAMAccountName"
\
userdn
=
"dc=local,dc=isima,dc=fr"
\
groupattr
=
"cn"
\
groupfilter
=
"(&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}}))"
\
groupdn
=
"ou=GROUPES_LOCAUX,dc=local,dc=isima,dc=fr"
\
binddn
=
"cn=vault,ou=Comptes de Services,dc=local,dc=isima,dc=fr"
\
bindpass
=
"secret"
\
insecure_tls
=
"false"
\
starttls
=
"true"
```
[
<i class="fa fa-book" aria-hidden="true"></i> LDAP Auth Method
](
https://www.vaultproject.io/docs/auth/ldap.html
)
## Policy
## Policy
/etc/vault/users/cri.
hcl
description
`/etc/vault/cri.hcl`
(
[
hcl
](
https://github.com/hashicorp/
hcl
)
)
```
```
# Write and manage secrets in key-value secret engine
# Write and manage secrets in key-value secret engine
path "cri/*" {
path "cri/*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
}
# To enable secret engines
path "sys/mounts/*" {
capabilities = [ "create", "read", "update", "delete" ]
}
path "cubbyhole/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
```
```
*
écriture
```
shell
```
shell
$
vault policy write cri /etc/vault/cri.hcl
$
vault policy write cri
`
/etc/vault/cri.hcl
`
```
```
*
application à un groupe
## appliquer une policy à un groupe ldap
```
shell
```
shell
$
vault write auth/ldap/groups/cri
policies
=
cri
$
vault write auth/ldap/groups/cri
policies
=
cri
```
```
*
création de token à aprtir de la policy
## Utilisation
```
shell
$
vault token create
-policy
=
cri
*
via la ligne de commande
```
*
[
binaire à télécharger
](
https://releases.hashicorp.com/vault/
)
*
cross plateform
*
deux variables d'environnement
*
$VAULT_ADDR=https://vault.isima.fr
*
$VAULT_TOKEN ou authentification ldap
*
via l'
[
<i class="fa fa-book" aria-hidden="true"></i> api
](
https://www.vaultproject.io/api/overview
)
## Workflow
## Workflow
...
@@ -259,26 +240,6 @@ $ vault kv patch cri/test password1=$(date | sha256sum | cut -c -50)
...
@@ -259,26 +240,6 @@ $ vault kv patch cri/test password1=$(date | sha256sum | cut -c -50)
$
vault delete cri/test
$
vault delete cri/test
```
```
## création de token
my.hcl
```
path "secret/data/cri/apps/my" {
capabilities = ["create", "read", "update", "delete", "list"]
}
```
```
shell
$
vault policy write vault/hcl/apps/my.hcl
$
vault token create
-policy
=
my
```
## Audit
## avec ansible
## avec ansible
*
lookup natif
[
hashi_vault
](
https://docs.ansible.com/ansible/latest/plugins/lookup/hashi_vault.html
)
*
lookup natif
[
hashi_vault
](
https://docs.ansible.com/ansible/latest/plugins/lookup/hashi_vault.html
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment