Open ollimppio opened 3 years ago
@malinthaprasan , can you please look into this Git issue.
@Mariangela shall we move this to https://github.com/wso2/product-apim.
@ollimppio It seems there is an authentication failure from the APIM's internal IDP side when trying change the client secret. Do you get the same error when trying other operations like Generate Application Keys (https://apim.docs.wso2.com/en/latest/develop/product-apis/devportal-apis/devportal-v1/devportal-v1/#tag/Application-Keys/paths/~1applications~1{applicationId}~1generate-keys/post) or you are getting this only for Map keys? Do you see any other error log just above the error you posted, if so can you post that too?
@malinthaprasan , I getting this error for Map key only.
When tried "Generate Application Keys" it works:
curl -k -H "Authorization: Bearer fbf005ab-f832-349e-a62a-74ea77e13580" -H "Content-Type: application/json" -X POST -d @generatekey "https://localhost:9443/api/am/store/v1/applications/d1420b31-1c01-4e1e-ab27-ae7459101694/generate-keys"
{
"keyMappingId": "a6772a74-bdec-4da5-8b7d-949e8b272ff9",
"keyManager": "Resident Key Manager",
"consumerKey": "dMsvaUTOCn59DfT615_FwZ_22NYa",
"consumerSecret": "sEKro0gR46SjkXVZWu1H5FWcYNQa",
"supportedGrantTypes": [
"password",
"client_credentials"
],
"callbackUrl": "http://sample.com/callback/url",
"keyState": "APPROVED",
"keyType": "PRODUCTION",
"groupId": null,
"token": {
"accessToken": "eyJ4NXQiOiJNell4TW1Ga09HWXdNV0kwWldObU5EY3hOR1l3WW1NNFpUQTNNV0kyTkRBelpHUXpOR00wWkdSbE5qSmtPREZrWkRSaU9URmtNV0ZoTXpVMlpHVmxOZyIsImtpZCI6Ik16WXhNbUZrT0dZd01XSTBaV05tTkRjeE5HWXdZbU00WlRBM01XSTJOREF6WkdRek5HTTBaR1JsTmpKa09ERmtaRFJpT1RGa01XRmhNelUyWkdWbE5nX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhdWQiOiJkTXN2YVVUT0NuNTlEZlQ2MTVfRndaXzIyTllhIiwibmJmIjoxNjA3NjExMDQ5LCJhenAiOiJkTXN2YVVUT0NuNTlEZlQ2MTVfRndaXzIyTllhIiwic2NvcGUiOiJhbV9hcHBsaWNhdGlvbl9zY29wZSBkZWZhdWx0IiwiaXNzIjoiaHR0cHM6XC9cL2xvY2FsaG9zdDo5NDQzXC9vYXV0aDJcL3Rva2VuIiwiZXhwIjoxNjA3NjE0NjQ5LCJpYXQiOjE2MDc2MTEwNDksImp0aSI6IjlkNDVkOTM1LTg2NGYtNDBiNi1hZjMzLTZiYWFkMmNjOTQ2NCJ9.k6O3S21aZM7cf1hti_Eo7qU7pGuxYZJHrnaKOFj-fBcUU5XJ3nFhQXc7w69bJ3C6h0OFzcL7Q10XHZZVcdwG5XiaB2Imi4WNN1p5_hN2rUDwSLxwmSkm-lWLxGN5amOK-TtEFGEy5gX4ZFcmoHn90wTVS9xRFkJ0HbV5EoXg7aeQtXiQntttcxnXz26Gm--dNn3HehIOPlItsU_FwdKnFPoHEpBOOMpS8y5IHLTGdFtFh6uhxNwHRRYg-yKDqh6hD6nUPOhWXV7WTaVhRhtaxp2yERFQ1wIFwtkno8Y49KwuTIYWMTzTCT-kIyaafkGfqg_Un5H1TWTvOMZpwlMfcA",
"tokenScopes": [
"am_application_scope",
"default"
],
"validityTime": 3600
},
"additionalProperties": "{}"
}
But when trying change the client secret, isn't work:
curl -k -H "Authorization: Bearer fbf005ab-f832-349e-a62a-74ea77e13580" -H "Content-Type: application/json" -X POST -d @data.json "https://localhost:9443/api/am/store/v1/applications/d1420b31-1c01-4e1e-ab27-ae7459101694/map-keys"
{
"code": 900967,
"message": "General Error",
"description": "Server Error Occurred",
"moreInfo": "",
"error": []
}
[wso2carbon.log](https://github.com/wso2/product-apim/files/5673557/wso2carbon.log)
Location : https://apim.docs.wso2.com/en/latest/develop/product-apis/devportal-apis/devportal-v1/devportal-v1/
I'm trying to change the values of the consumerKey and consumerSecret as https://apim.docs.wso2.com/en/latest/develop/product-apis/devportal-apis/devportal-v1/devportal-v1/#tag/Application-Keys/paths/~1applications~1{applicationId}~1map-keys/post, but I'm getting an error.
My data.json sample:
Curl comand:
wso2carbon.log: