Skip to content

Commit 4a160e5

Browse files
authored
Merge pull request #681 from hanzjk/patch-10.3
Update OAuth method for workload publisher
2 parents 2ae836e + 40c412d commit 4a160e5

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

deployments/helm-charts/wso2-amp-build-extension/templates/cluster-workflow-templates/generate-workload.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,11 @@ spec:
147147
CLIENT_SECRET="${OAUTH_CLIENT_SECRET}"
148148
149149
echo "Requesting OAuth token from ${OAUTH_URL}..."
150-
# Use client_secret_basic: credentials in Authorization header (Base64 encoded, no newlines)
151-
BASIC_AUTH=$(echo -n "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d '\n')
152-
153-
154150
TOKEN_RESPONSE=$(curl -s --fail-with-body \
155151
-X POST "${OAUTH_URL}" \
156152
-H "Host: ${OAUTH_HOST}" \
157153
-H "Content-Type: application/x-www-form-urlencoded" \
158-
-H "Authorization: Basic ${BASIC_AUTH}" \
159-
-d "grant_type=client_credentials")
154+
-d "grant_type=client_credentials&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}")
160155
161156
ACCESS_TOKEN=$(echo "${TOKEN_RESPONSE}" | jq -r '.access_token')
162157

deployments/helm-charts/wso2-amp-thunder-extension/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ thunder:
134134
# Workload Publisher Client configuration (for CI workflows to create workloads)
135135
workloadPublisherClient:
136136
clientId: "openchoreo-workload-publisher-client" # clusterauthzrolebinding is already created with this clientId by openchoreo, so it should not be changed unless the corresponding ClusterAuthzRoleBinding is also updated
137-
clientSecret: "openchoreo-workload-publisher-client-secret"
137+
clientSecret: "openchoreo-workload-publisher-secret"
138138
name: "Workload Publisher"
139139
description: "OpenChoreo Workload Publisher Client for creating workloads from CI workflows"
140140
grantTypes:
141141
- "client_credentials"
142-
tokenEndpointAuthMethod: "client_secret_basic"
142+
tokenEndpointAuthMethod: "client_secret_post"
143143
pkceRequired: false
144144
publicClient: false
145145
accessTokenValidityPeriod: 3600

deployments/single-cluster/values-openbao.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ server:
3939
policies=openchoreo-secret-writer-policy ttl=20m
4040
4141
# Workflow Plane
42-
bao kv put secret/workflow-plane-oauth-client-secret value="openchoreo-workload-publisher-client-secret"
42+
bao kv put secret/workflow-plane-oauth-client-secret value="openchoreo-workload-publisher-secret"
4343
4444
# Observer (observability)
4545
bao kv put secret/observer-oauth-client-secret value="openchoreo-observer-resource-reader-client-secret"

0 commit comments

Comments
 (0)