Skip to content

Commit 20cde8d

Browse files
authored
doc: add backend_secret config to orchestrator (#1567)
* Update app config in orchestrator example * update doc * add secret example
1 parent b97d675 commit 20cde8d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/orchestrator.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ To enable the orchestrator plugin, you should refer the dynamic plugins ConfigMa
9191
disabled: false
9292
```
9393
94-
See [example](/examples/orchestrator.yaml) for a complete configuration of the orchestrator plugin.
94+
See [example](/examples/orchestrator.yaml) for a complete configuration of the orchestrator plugin.
95+
Ensure to add a secret with the BACKEND_SECRET key/value and update
96+
the secret name in the `Backstage` CR under the `extraEnvs` field.
9597

9698
#### Plugin registry
9799

examples/orchestrator.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ data:
3333
guest:
3434
# using the guest user to query the '/api/dynamic-plugins-info/loaded-plugins' endpoint.
3535
dangerouslyAllowOutsideDevelopment: true
36+
backend:
37+
auth:
38+
externalAccess:
39+
- type: static
40+
options:
41+
token: ${BACKEND_SECRET}
42+
subject: orchestrator
43+
---
44+
apiVersion: v1
45+
kind: Secret
46+
metadata:
47+
name: backend-auth-secret
48+
stringData:
49+
# generated with the command below (from https://backstage.io/docs/auth/service-to-service-auth/#setup):
50+
# node -p 'require("crypto").randomBytes(24).toString("base64")'
51+
BACKEND_SECRET: "R2FxRVNrcmwzYzhhN3l0V1VRcnQ3L1pLT09WaVhDNUEK" # notsecret
3652
---
3753
apiVersion: rhdh.redhat.com/v1alpha4
3854
kind: Backstage
@@ -44,3 +60,6 @@ spec:
4460
configMaps:
4561
- name: app-config-rhdh
4662
dynamicPluginsConfigMapName: orchestrator-plugin
63+
extraEnvs:
64+
secrets:
65+
- name: backend-auth-secret # secret that contains the BACKEND_SECRET key

0 commit comments

Comments
 (0)