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
dfaccebe
Commit
dfaccebe
authored
6 years ago
by
Vincent Mazenod
Browse files
Options
Downloads
Patches
Plain Diff
vault
parent
0ffe17c7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3531
passed
6 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/slides/cri/md/vault.md
+58
-3
58 additions, 3 deletions
content/slides/cri/md/vault.md
with
58 additions
and
3 deletions
content/slides/cri/md/vault.md
+
58
−
3
View file @
dfaccebe
...
...
@@ -15,7 +15,32 @@
*
serveur
*
créer un service systemd
*
cli
*
`vault`
*
`/usr/local/bin/vault `
## Systemd
```
shell
setcap
CAP_IPC_LOCK
=
+ep /usr/local/bin/vault
setcap
CAP_NET_BIND_SERVICE
=
+eip /usr/local/bin/vault
```
```
ini
[Unit]
Description
=
a tool for managing secrets
Documentation
=
https://vaultproject.io/docs/
After
=
network.target
ConditionFileNotEmpty
=
/etc/vault/vault.hcl
[Service]
User
=
vault
Group
=
vault
ExecStart
=
/usr/local/bin/vault server -config=/etc/vault/vault.hcl
ExecReload
=
/usr/local/bin/kill --signal HUP $MAINPID
[Install]
WantedBy
=
multi-user.target
```
## Configuration
...
...
@@ -29,12 +54,42 @@ backend "file" {
ui = true
disable_mlock = true
listener "tcp" {
address = "10.0.0.1:8200"
tls_disable = 1
address = "10.0.0.1:443"
tls_cert_file = "/etc/certs/vault.crt"
tls_key_file = "/etc/certs/vault.key"
tls_disable = 0
}
```
## Initialisation
```
shell
export
VAULT_ADDR
=
https://10.0.0.1
export
VAULT_SKIP_VERIFY
=
True
vault operator init
-key-shares
=
3
-key-threshold
=
2
```
```
shell
Unseal Key 1: 6gAO3lmAhIaHzDAdkK256g2B2Dpeqy+z4jqQCJBID3d8
Unseal Key 2: TO7DDRQXSPC3IQylPEBPjPGAGAGMzjEkjT/FL62m7UUd
Unseal Key 3: CYfEbt83jYsQFcSErHT4Y5NCsrEtfFUE6tjQZKfP632K
Initial Root Token: s.78MykQO2b5qcy03rtoNwmhr1
Vault initialized with 3 key shares and a key threshold of 2. Please securely
distribute the key shares printed above. When the Vault is re-sealed,
restarted, or stopped, you must supply at least 2 of these keys to unseal it
before it can start servicing requests.
Vault does not store the generated master key. Without at least 2 key to
reconstruct the master key, Vault will remain permanently sealed!
It is possible to generate new unseal keys, provided you have a quorum of
existing unseal keys shares. See
"vault operator rekey"
for
more information.
```
## [<i class="fa fa-book" aria-hidden="true"></i> Secrets engines](https://www.vaultproject.io/docs/secrets/)

...
...
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