Skip to content

Commit

Permalink
kubectl get secret fix for zsh issue (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
andytael authored Apr 2, 2024
1 parent 70bb4a3 commit bdf4bcc
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ You have to enter a password for the Wallet.
1. Get the ADMIN user password from k8s secret. in the exa,ple below `calfdb` needs to be replaced with the name of database in the installation.

```shell
kubectl -n application get secret calfdb-db-secrets -o jsonpath='{.data.db\.password}' | base64 -d
kubectl -n application get secret calfdb-db-secrets -o jsonpath='{.data.db\.password}' | base64 -d; echo
```

1. Open a terminal Window and start SQLcl with the `/nolog` option.
Expand Down Expand Up @@ -207,7 +207,7 @@ If you chose the **PRIVATE_ENDPOINT_ACCESS** option for database access during i
1. Get the ADMIN user password from k8s secret. in the exa,ple below `bluegilldb` needs to be replaced with the name of database in the installation.

```shell
kubectl -n application get secret bluegilldb-db-secrets -o jsonpath='{.data.db\.password}' | base64 -d
kubectl -n application get secret bluegilldb-db-secrets -o jsonpath='{.data.db\.password}' | base64 -d; echo
```

1. Open a terminal Window and start SQLcl with the `/nolog` option.
Expand Down
2 changes: 1 addition & 1 deletion docs-source/spring/content/observability/metrics/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Prometheus is an open source monitoring and alerting system. Prometheus collects
- To get the password, run this command:

```shell
kubectl -n grafana get secret grafana-dashboard-authn -o jsonpath='{.data.password}' | base64 -d
kubectl -n grafana get secret grafana-dashboard-authn -o jsonpath='{.data.password}' | base64 -d; echo
```

> **NOTE:** If you do not have `base64`, leave off the last part (`| base64 -d`) in the command, then copy the output, and use this website to decode it: <https://www.base64decode.org/>.
Expand Down
2 changes: 1 addition & 1 deletion docs-source/spring/content/platform/apigw/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Oracle Backend for Spring Boot and Microservices deploys Apache APISIX Gateway a
* Password is retrieved using the following command:

```shell
kubectl get secret -n apisix apisix-dashboard -o jsonpath='{.data.conf\.yaml}' | base64 -d | grep 'password:`
kubectl get secret -n apisix apisix-dashboard -o jsonpath='{.data.conf\.yaml}' | base64 -d | grep 'password:'; echo
```

**NOTE:** Oracle recommends that you change the default password when you log in the first time. Even though the dashboard is not accessible externally, Oracle still recommends using strong passwords to maximize security.
Expand Down
2 changes: 1 addition & 1 deletion docs-source/spring/content/platform/soc/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ production certificate, refer to [Transport Layer Security](../../security#trans
Login using the `obaas-admin` user (or another user if you have created one) and the password that you set during installation. If you did not set a password, one was auto-generated for you and can be obtained with this command:

```bash
$ kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d
$ kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d; echo
```

After logging in, you will see the SOC Dashboard.
Expand Down
16 changes: 8 additions & 8 deletions docs-source/spring/content/platform/vault/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The following Vault services are enabled during deployment. Other services can b
`root` tokens have the `root` policy attached to them. `root` tokens can do anything in Vault and are useful in **Development** mode but should be restricted in **Production** mode. In fact, the Vault team recommends that `root` tokens only be used for the initial setup. Be sure to save the initial `root` token in a secure way. For example:

```shell
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"; echo
```

{{< hint type=[warning] icon=gdoc_check title=Warning >}}
Expand All @@ -103,23 +103,23 @@ It is **very important** that recovery keys are saved in multiple places. Losing
To extract the five recovery keys, use the following commands:

``` shell
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.1\" }}"
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.1\" }}"; echo
```

```shell
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.2\" }}"
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.2\" }}"; echo
```

```shell
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.3\" }}"
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.3\" }}"; echo
```

```shell
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.4\" }}"
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.4\" }}"; echo
```

```shell
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.5\" }}"
% kubectl get secret vault-recovery-keys -n vault --template="{{index .data \"recovery.key.5\" }}"; echo
```

## Accessing Vault Using kubectl
Expand Down Expand Up @@ -162,7 +162,7 @@ To extract the five recovery keys, use the following commands:
Get the token with this command:

```shell
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"; echo
```

Log in to the Vault and provide the token with this command:
Expand Down Expand Up @@ -288,7 +288,7 @@ To access the Vault, process these steps:
To interact with the Vault in **Production** mode, you need to log in using a token that is stored in a K8s Secret. Get the token by running the following command. The output is the `root` token. It is **very important** that the token is saved in multiple places. Losing the token can result in loss of access to the Vault. In **Development** mode, the `root` token is `root`. For example:

```shell
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"
kubectl get secret vault-root-token -n vault --template="{{index .data \"root.token\" | base64decode}}"; echo
```

1. Open the Vault web user interface URL: <https://localhost:8200>
Expand Down
5 changes: 3 additions & 2 deletions docs-source/spring/content/security/azn-server/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ The passwords can also be obtained from k8s secrets using the `kubectl` command.
For `obaas-admin`:

```shell
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.admin}' | base64 -d; echo
```

For `obaas-user`:

```shell
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.user}' | base64 -d
kubectl get secret -n azn-server oractl-passwords -o jsonpath='{.data.user}' | base64 -d; echo
```

## User Management REST endpoints overview
Expand All @@ -68,6 +68,7 @@ The following REST Endpoints are available to manage users. The table lists whic

| End point | Method | Description | Minimum required Role |
|---------------------------------------------------|--------|-------------------------------------------------|-----------------------|
| /user/api/v1/connect | GET | Authorize | All Roles |
| /user/api/v1/findUser | GET | Find all users | ROLE_ADMIN |
| /user/api/v1/findUser?username=\<username\> | GET | Find a user with the username \<username\> | ROLE_ADMIN |
| /user/api/v1/createUser | POST | Create a user | ROLE_ADMIN |
Expand Down

0 comments on commit bdf4bcc

Please sign in to comment.