Skip to content

Commit e8d4a48

Browse files
committed
debug
1 parent 4b48ac9 commit e8d4a48

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

.github/workflows/token-federation-test.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,9 @@ jobs:
214214
215215
# Create a properly URL-encoded request
216216
echo "Creating token exchange request..."
217-
curl_data=$(cat << 'EOF'
218-
client_id=$IDENTITY_FEDERATION_CLIENT_ID&\
219-
subject_token=$OIDC_TOKEN&\
220-
subject_token_type=urn:ietf:params:oauth:token-type:jwt&\
221-
grant_type=urn:ietf:params:oauth:grant-type:token-exchange&\
222-
scope=sql
223-
EOF
224-
)
225-
226-
# Substitute environment variables in the curl data
227-
curl_data=$(eval echo "$curl_data")
217+
# URL encode the token
218+
encoded_token=$(echo -n "$OIDC_TOKEN" | python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.stdin.read(), safe=""))')
219+
curl_data="client_id=$IDENTITY_FEDERATION_CLIENT_ID&subject_token=$encoded_token&subject_token_type=urn:ietf:params:oauth:token-type:jwt&grant_type=urn:ietf:params:oauth:grant-type:token-exchange&scope=sql"
228220
229221
# Print request details (except the token)
230222
echo "Request URL: https://$DATABRICKS_HOST_FOR_TF/oidc/v1/token"

0 commit comments

Comments
 (0)