Skip to content

Commit 4e379d0

Browse files
authored
Vault doc update (#599)
* Adding +x to script, typos and remove verrazzano file * Repo updates for OL Changed repo for Oracle Linux to Oracle hosted repo * Typo in Dockerfile * Upgrading OKE and nodepool version to latest Current version 1.21.5 doesn't deploy properly. Upgrading to latest version * Updated README.md Changed the bit.ly URL * Initial check-in of sec workshop (#456) Initial check-in of sec workshop (#456) * Initial check in of Security Workshop (WMS8461) Initial check in of Security Workshop (WMS8461) * Initial check in of Security Workshop (WMS8461) * CLI Setup changes * Sample app Doc Update * Doc and SQL script updates * Created separate doc for the CLI stuff * cli doc changes * Removing CLI stuff * Doc updates * Doc bugs and Vault Documentation * Doc bugs and Vault docs * Vault Doc Updates * Setup doc fixes * Spell checking * Vault doc updates * Doc updates per Mark findings * Fix for k8s version and TF deprecated attr * Removed ssl_server_cert_dn from DBLINK * Remove _SSL_SERVER_CERT_DN vars * Adding back DB1_SSL_SERVER_CERT_DN * Vault doc updates * Vault doc updates * Setup and Vault changes * Typos * Added HashiCorp * Setup doc updates * Adding .gitignore for Hugo files * Rollback SSL_SERVER_CERT changes * Vault doc updates * PR fixes * Bugfixes * Vault doc update
1 parent afa622b commit 4e379d0

File tree

1 file changed

+32
-10
lines changed
  • docs-source/spring/content/platform/vault

1 file changed

+32
-10
lines changed

docs-source/spring/content/platform/vault/_index.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ The Vault is [unsealed](https://developer.hashicorp.com/vault/docs/configuration
3939

4040
The following Vault services are enabled during deployment. Other services can be enabled using the `vault` command and the Web User Interface.
4141

42-
- [Token Auth Method](https://developer.hashicorp.com/vault/docs/auth/token). The token auth method is built-in and automatically available. It allows users to authenticate using a token, as well to create new tokens, revoke secrets by token, and more.
42+
- [Token Auth Method](https://developer.hashicorp.com/vault/docs/auth/token). The `token` auth method is built-in and automatically available. It allows users to authenticate using a token, as well to create new tokens, revoke secrets by token, and more.
43+
- [AppRole Auth Method](https://developer.hashicorp.com/vault/docs/auth/approle). The `approle` auth method allows machines or apps to authenticate with Vault-defined roles.
44+
- [Kubernetes Auth Method](https://developer.hashicorp.com/vault/docs/auth/kubernetes). The `kubernetes` auth method can be used to authenticate with Vault using a Kubernetes Service Account Token. This method of authentication makes it easy to introduce a Vault token into a Kubernetes Pod.
45+
- [Userpass Auth Method](https://developer.hashicorp.com/vault/docs/auth/userpass)The `userpass` auth method allows users to authenticate with Vault using a username and password combination.
4346
- [KV Secrets Engine Version 2](https://developer.hashicorp.com/vault/docs/secrets/kv). The kv secrets engine is a generic Key-Value store used to store arbitrary secrets.
44-
- [AppRole Auth Method](https://developer.hashicorp.com/vault/docs/auth/approle). The approle auth method allows machines or apps to authenticate with Vault-defined roles.
47+
4548

4649
## Accessing Vault using using kubectl
4750

@@ -81,7 +84,7 @@ The following Vault services are enabled during deployment. Other services can b
8184
To interact with vault you need to login using a token. The root token is stored in a k8s secret. Get the token by running this command, the output is the root token. It is **VERY IMPORTANT** that the token is saved in multiple places, loosing the token can result in loss of access to the Vault.
8285

8386
```shell
84-
kubectl get secret root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"
87+
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"
8588
```
8689

8790
Login to the vault:
@@ -124,7 +127,26 @@ The following Vault services are enabled during deployment. Other services can b
124127
sys/ system system_df5c39a8 system endpoints used for control, policy and debugging
125128
```
126129

127-
5. Create a secret
130+
5. Display the authentication methods enabled:
131+
132+
To display the enabled authentication methods execute the following command:
133+
134+
```shell
135+
kubectl exec pod/vault-0 -n vault -it -- vault auth list
136+
```
137+
138+
The output will look similar to this:
139+
140+
```text
141+
Path Type Accessor Description
142+
---- ---- -------- -----------
143+
approle/ approle auth_approle_00ffb93b n/a
144+
kubernetes/ kubernetes auth_kubernetes_c9bb0698 n/a
145+
token/ token auth_token_68b0beb2 token based credentials
146+
userpass/ userpass auth_userpass_afb2fb02 n/a
147+
```
148+
149+
6. Create a secret
128150

129151
Create a secret at path `kv-v2/customer/acme` with a `nme` and an `email`
130152

@@ -148,7 +170,7 @@ The following Vault services are enabled during deployment. Other services can b
148170
version 1
149171
```
150172

151-
6. Get a secret
173+
7. Get a secret
152174

153175
Get the created secret:
154176

@@ -243,13 +265,13 @@ Vault is configured to Auto Unseal using OCI Vault. Initializing with Auto Unsea
243265
To extract the five recovery keys use the following commands:
244266

245267
``` shell
246-
% kubectl get secret recovery-keys -n vault --template="{{index .data \"recovery.key.1\" }}"
268+
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.1\" }}"
247269
248-
% kubectl get secret recovery-keys -n vault --template="{{index .data \"recovery.key.2\" }}"
270+
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.2\" }}"
249271
250-
% kubectl get secret recovery-keys -n vault --template="{{index .data \"recovery.key.3\" }}"
272+
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.3\" }}"
251273
252-
% kubectl get secret recovery-keys -n vault --template="{{index .data \"recovery.key.4\" }}"
274+
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.4\" }}"
253275
254-
% kubectl get secret recovery-keys -n vault --template="{{index .data \"recovery.key.5\" }}"
276+
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.5\" }}"
255277
```

0 commit comments

Comments
 (0)