Skip to content

Commit

Permalink
Merge pull request #1412 from lindseysimple/issue-1410-2
Browse files Browse the repository at this point in the history
fix: Add the client_token instruction
  • Loading branch information
cloudxxx8 authored Jan 21, 2025
2 parents 76338f4 + f569136 commit 179a60d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs_src/security/Ch-Secure-Postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ To retrieve the PostgreSQL superuser password, you can use the following methods

### Obtaining superuser password using the OpenBao CLI

1. Follow the instructions from [Obtaining the OpenBao Root Token](Ch-SecretStore.md#obtaining-the-openbao-root-token) to get the OpenBao root token.
2. Follow the instructions from [Using the OpenBao CLI](Ch-SecretStore.md#using-the-openbao-cli) to launch the OpenBao CLI.
1. Follow the instructions from [Obtaining the OpenBao Root Token](Ch-SecretStore.md#obtaining-the-openbao-root-token) to get the OpenBao root token or use the `client_token` stored in `/tmp/edgex/secrets/security-bootstrapper-postgres/secrets-token.json`.
2. Follow the instructions from [Using the OpenBao CLI](Ch-SecretStore.md#using-the-openbao-cli) to launch the OpenBao CLI and login in with the OpenBao root token or the `security-bootstrapper-postgres`'s `client-token`.
3. Retrieve the superuser password by executing the following command in the OpenBao CLI:
```
edgex-secret-store:/# bao read secret/edgex/security-bootstrapper-postgres/postgres
Expand All @@ -20,10 +20,10 @@ To retrieve the PostgreSQL superuser password, you can use the following methods
### Obtaining superuser password using the OpenBao REST API
1. Follow the instructions from [Obtaining the OpenBao Root Token](Ch-SecretStore.md#obtaining-the-openbao-root-token) to get the OpenBao root token.
1. Follow the instructions from [Obtaining the OpenBao Root Token](Ch-SecretStore.md#obtaining-the-openbao-root-token) to get the OpenBao root token or use the `client_token` stored in `/tmp/edgex/secrets/security-bootstrapper-postgres/secrets-token.json`.
2. Display (GET) the postgres credentials from the `security-bootstrapper-postgres` secret store by using the OpenBao API:
```
curl -s -H 'X-Vault-Token: <OpenBao-Root-Token>' http://localhost:8200/v1/secret/edgex/security-bootstrapper-postgres/postgres | python -m json.tool
curl -s -H 'X-Vault-Token: <OpenBao-Token>' http://localhost:8200/v1/secret/edgex/security-bootstrapper-postgres/postgres | python -m json.tool
{
"request_id": "e4e8f2e2-3185-6955-92ed-be725c3387fc",
"lease_id": "",
Expand Down

0 comments on commit 179a60d

Please sign in to comment.