diff --git a/docs/whynot-design-npm-publish-handoff.md b/docs/whynot-design-npm-publish-handoff.md index 6cfaaf1..a27a753 100644 --- a/docs/whynot-design-npm-publish-handoff.md +++ b/docs/whynot-design-npm-publish-handoff.md @@ -126,8 +126,17 @@ JSON bao write auth/netkingdom/role/whynot-design-workload-kv-read @"$role_payload_file" ``` -The OpenBao Web UI console may treat `bound_claims={...}` as a string. Use a -raw JSON/API role editor when staying in the UI, or use the shell form above. +The OpenBao Browser CLI cannot run this shell block and may treat +`bound_claims={...}` as a string. When staying in the Web UI, open the API +Explorer and submit the role payload JSON above with: + +```text +method: PUT +path: /v1/auth/netkingdom/role/whynot-design-workload-kv-read +``` + +If the API Explorer asks for a path without the API prefix, use +`auth/netkingdom/role/whynot-design-workload-kv-read`. ## Non-Secret Reads diff --git a/scripts/credential-change.py b/scripts/credential-change.py index 5e4a231..6142a95 100755 --- a/scripts/credential-change.py +++ b/scripts/credential-change.py @@ -388,6 +388,8 @@ def render_operator_commands(ccr: dict[str, Any]) -> str: lines = [ f"# Operator handoff for {ccr['id']}: {ccr['title']}", "# Run from the railiance-platform repo with an approved OpenBao operator token.", + "# Do not paste this shell block into the OpenBao Browser CLI.", + f"# Web UI API Explorer path for the role JSON body: /v1/{auth_path}", "set -euo pipefail", f"bao policy write {shlex.quote(openbao['policy_name'])} {shlex.quote(openbao['policy_file'])}", 'role_payload_file="$(mktemp)"', diff --git a/tests/test_credential_change.py b/tests/test_credential_change.py index 3120203..c7e099c 100644 --- a/tests/test_credential_change.py +++ b/tests/test_credential_change.py @@ -144,6 +144,11 @@ class CredentialChangeTests(unittest.TestCase): "bao write auth/netkingdom/role/whynot-design-workload-kv-read", rendered, ) + self.assertIn("# Do not paste this shell block into the OpenBao Browser CLI.", rendered) + self.assertIn( + "# Web UI API Explorer path for the role JSON body: /v1/auth/netkingdom/role/whynot-design-workload-kv-read", + rendered, + ) self.assertIn('role_payload_file="$(mktemp)"', rendered) self.assertIn('"bound_claims": {', rendered) self.assertIn(