From bdf4bcc9aebf7ee55c49fc0637dc4fff1ac54c0a Mon Sep 17 00:00:00 2001 From: Andy Tael Date: Tue, 2 Apr 2024 10:01:41 -0500 Subject: [PATCH] kubectl get secret fix for zsh issue (#868) --- .../infrastructure/databaseaccess/_index.md | 4 ++-- .../content/observability/metrics/_index.md | 2 +- .../spring/content/platform/apigw/_index.md | 2 +- .../spring/content/platform/soc/_index.md | 2 +- .../spring/content/platform/vault/_index.md | 16 ++++++++-------- .../spring/content/security/azn-server/_index.md | 5 +++-- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs-source/spring/content/infrastructure/databaseaccess/_index.md b/docs-source/spring/content/infrastructure/databaseaccess/_index.md index ad6d88164..8bd5b798e 100644 --- a/docs-source/spring/content/infrastructure/databaseaccess/_index.md +++ b/docs-source/spring/content/infrastructure/databaseaccess/_index.md @@ -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. @@ -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. diff --git a/docs-source/spring/content/observability/metrics/_index.md b/docs-source/spring/content/observability/metrics/_index.md index 633ef7400..55d7c2038 100644 --- a/docs-source/spring/content/observability/metrics/_index.md +++ b/docs-source/spring/content/observability/metrics/_index.md @@ -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: . diff --git a/docs-source/spring/content/platform/apigw/_index.md b/docs-source/spring/content/platform/apigw/_index.md index 752e31012..89764b288 100644 --- a/docs-source/spring/content/platform/apigw/_index.md +++ b/docs-source/spring/content/platform/apigw/_index.md @@ -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. diff --git a/docs-source/spring/content/platform/soc/_index.md b/docs-source/spring/content/platform/soc/_index.md index d996cb37f..57f7dbc61 100644 --- a/docs-source/spring/content/platform/soc/_index.md +++ b/docs-source/spring/content/platform/soc/_index.md @@ -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. diff --git a/docs-source/spring/content/platform/vault/_index.md b/docs-source/spring/content/platform/vault/_index.md index 3e86e5c1f..afefe70f0 100644 --- a/docs-source/spring/content/platform/vault/_index.md +++ b/docs-source/spring/content/platform/vault/_index.md @@ -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 >}} @@ -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 @@ -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: @@ -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: diff --git a/docs-source/spring/content/security/azn-server/_index.md b/docs-source/spring/content/security/azn-server/_index.md index ad0ed23c1..5e3077445 100644 --- a/docs-source/spring/content/security/azn-server/_index.md +++ b/docs-source/spring/content/security/azn-server/_index.md @@ -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 @@ -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=\ | GET | Find a user with the username \ | ROLE_ADMIN | | /user/api/v1/createUser | POST | Create a user | ROLE_ADMIN |