Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault is primarily used in production environments to manage secrets. Vault is a complex system that has many different pieces. There is a clear separation of components that are inside or outside of the security barrier. Only the storage backend and the HTTP API are outside, all other components are inside the barrier.
Figure 1: Architecture of Vault and Spring App (Click to enlarge)
The storage backend is untrusted and is used to durably store encrypted data. When the Vault server is started, it must be provided with a storage backend so that data is available across restarts. The HTTP API similarly must be started by the Vault server on start so that clients can interact with it.
version: '3.6' | |
services: | |
vault: | |
image: vault:latest | |
container_name: vault | |
restart: on-failure:10 | |
ports: | |
- "8201:8201" | |
environment: | |
VAULT_ADDR: 'https://0.0.0.0:8201' |
version: '3.6' | |
services: | |
vault: | |
image: vault:latest | |
container_name: vault | |
restart: on-failure:10 | |
ports: | |
- "8201:8201" | |
environment: | |
VAULT_ADDR: 'https://0.0.0.0:8201' |
path "kv/*" { | |
capabilities = ["create", "read", "update", "delete", "list"] | |
} | |
path "kv/my-secret" { | |
capabilities = ["read"] | |
} |
#!/usr/bin/env bash | |
# Start vault | |
vault server -config vault-test.hcl | |
# Export values | |
export VAULT_ADDR='https://0.0.0.0:8201' | |
export VAULT_SKIP_VERIFY='true' | |
# Parse unsealed keys |
@Configuration | |
public class VaultConfig extends AbstractVaultConfiguration { | |
@Override | |
public ClientAuthentication clientAuthentication() { | |
return new TokenAuthentication("00000000-0000-0000-0000-000000000000"); | |
} | |
@Override | |
public VaultEndpoint vaultEndpoint() { |
@Service | |
public class CredentialsService { | |
private VaultTemplate vaultTemplate; | |
public void secureCredentials(String storagePlace, Credentials credentials) { | |
initVaultTemplate(); | |
vaultTemplate.write("kv/" + storagePlace, credentials); | |
} |
... | |
vault-java-demo: | |
image: registry.exxeta.com/exxetask/vault-java-demo:develop | |
container_name: vault-java-demo | |
restart: on-failure:10 | |
ports: | |
- "8444:8444" | |
volumes: | |
- vault-volume:/data | |
healthcheck: |
- powershell: | | |
$params = "$env:SONARQUBE_SCANNER_PARAMS" -replace '"sonar.branch.name":"[\w,/,-]*"\,?' | |
Write-Host "##vso[task.setvariable variable=SONARQUBE_SCANNER_PARAMS]$params" | |
displayName: "Remove branches info" |