Description
Description
Kyma version 1.11.1
When calling the following curl to retrieve token there is a failure response and only in the 2nd call it succeed with new token.
curl -X POST -u {ClientId}:{ClientSecret} -d "grant_type=client_credentials&scope=application:read" https://oauth2.{domain}/token -H "Accept: application/json" -H "Accept-Language: en_US"
1st failed response
error":"invalid_client","error_description":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authenticatio n method)","status_code":401}
2nd response
300{"access_token":"hbhwWJDunwBFlEAWJjHiqK3CvrICJ8dt7g-VMGI7TmI.yHg41WlnOOPzzm64cmscope":"application:read","token_type":"bearer"}
Expected result
Get success response on first shot.
300{"access_token":"hbhwWJDunwBFlEAWJjHiqK3CvrICJ8dt7g-VMGI7TmI.yHg41WlnOOPzzm64cmscope":"application:read","token_type":"bearer"}
Actual result
a failure response in the 1st attempt and only in the 2nd call it succeed with new token.
1st failed response
error":"invalid_client","error_description":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authenticatio n method)","status_code":401}
2nd response
300{"access_token":"hbhwWJDunwBFlEAWJjHiqK3CvrICJ8dt7g-VMGI7TmI.yHg41WlnOOPzzm64cmscope":"application:read","token_type":"bearer"}
Steps to reproduce
Call the following URL (replace clientId,clientSecret and Kyma domain)
curl -X POST -u {ClientId}:{ClientSecret} -d "grant_type=client_credentials&scope=application:read" https://oauth2.{domain}/token -H "Accept: application/json" -H "Accept-Language: en_US"
Troubleshooting
Calling it several times until succeed response