Chapter 3. Customizing Red Hat Developer Hub backend secret
The default Red Hat Developer Hub configuration defines the Developer Hub backend secret for service to service authentication.
You can define your custom Developer Hub backend secret.
Prerequisites
- You added a custom Developer Hub application configuration, and have sufficient permissions to modify it.
Procedure
To define the Developer Hub backend secret, add to your custom
<my_product_secrets>.txt
file theBACKEND_SECRET
environment variable with a base64 encoded string. Use a unique value for each Developer Hub instance.$ echo > <my_product_secrets>.txt "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
$ echo > <my_product_secrets>.txt "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
Copy to Clipboard Copied! <my_product_secrets>.txt
exampleBACKEND_SECRET=3E2/rIPuZNFCtYHoxVP8wjriffnN1q/z
BACKEND_SECRET=3E2/rIPuZNFCtYHoxVP8wjriffnN1q/z
Copy to Clipboard Copied! Add your backend secret to your custom
app-config.yaml
file.app-config.yaml
excerpt defining the backend secretbackend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}"
backend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}"
Copy to Clipboard Copied!