File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 9393 DATABRICKS_DIR="$HOME/.databricks"
9494 DATABRICKS_CONFIG_FILE="$HOME/.databricks/connection.json"
9595 fi
96+
97+ # Get GitHub OIDC token
98+ echo "Getting GitHub OIDC token..."
99+ echo "ACTIONS_ID_TOKEN_REQUEST_URL: '$ACTIONS_ID_TOKEN_REQUEST_URL'"
100+
101+ # Construct the full URL for the OIDC token request
102+ OIDC_TOKEN_URL="${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https://github.com/apache"
103+ echo "Full OIDC token URL: '$OIDC_TOKEN_URL'"
104+
105+ # Test the URL format
106+ if [[ "$OIDC_TOKEN_URL" =~ ^https?:// ]]; then
107+ echo "OIDC URL format appears valid (starts with http/https)"
108+ else
109+ echo "WARNING: OIDC URL format may be invalid - doesn't start with http/https"
110+ fi
96111
97112 # Get GitHub OIDC token
98113 GITHUB_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
@@ -103,8 +118,13 @@ jobs:
103118 exit 1
104119 fi
105120
121+ # Debug the URL construction
122+ echo "DATABRICKS_WORKSPACE_URL: '$DATABRICKS_WORKSPACE_URL'"
123+ TOKEN_URL="https://$DATABRICKS_WORKSPACE_URL/oidc/v1/token"
124+ echo "Constructed token URL: '$TOKEN_URL'"
125+
106126 # Exchange OIDC token for Databricks OAuth token
107- OAUTH_RESPONSE=$(curl -X POST "https://$DATABRICKS_WORKSPACE_URL/oidc/v1/token " \
127+ OAUTH_RESPONSE=$(curl -X POST "$TOKEN_URL " \
108128 -H "Content-Type: application/x-www-form-urlencoded" \
109129 -d "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
110130 -d "client_id=$DATABRICKS_SP_CLIENT_ID" \
You can’t perform that action at this time.
0 commit comments