failed to decrypt data - pad block corrupted - on APIkey request

Hi all,

I tried to establish apikey validation on my endpoint like in this video https://www.youtube.com/watch?v=sS5EVb3fh0I

But when I try to request data from my endpoint I get “{“fault”:{“faultstring”:“failed to decrypt data”,“detail”:{“errorcode”:“Internal Server Error”}}}”

When I tried to corrupt my apikey, I got “{“fault”:{“faultstring”:“Invalid ApiKey”,“detail”:{“errorcode”:“oauth.v2.InvalidApiKey”}}}”. It means, api key validation is passed.

Can anyone help me with that. What is the reason of such kind of behaviour.

I see error code 500 it means it is not typical error.

Thank you!

1 Like

Hi,

I am getting the same error. For reference, I have signed up for a dev account and using the default oauth proxy that comes out of the box.

Following the guide https://docs.apigee.com/api-platform/tutorials/secure-calls-your-api-through-oauth-20-client-credentials#getanoauthaccesstoken,

I try doing a curl request to the /accesstoken endpoint

curl -X POST -H “Content-Type: application/x-www-form-urlencoded” “https://{hidden}-eval-test.apigee.net/oauth/client_credential?grant_type=client_credentials” -d “client_id={key}&client_secret={secret}”

Get a 500 - Internal server error, failed to decrypt data.

On the trace I can see the following:

GenerateAccessTokenClient policy has been aborted

Pressing next shows the following

error: failed to decrypt data

error.cause: pad block corrupted

error.class: java.lang.RuntimeException

Thank you for raising this, I’ve been able to reproduce this in a new evaluation org. Am checking with support and will follow up

This should now be resolved. Please let us know if you still see it

1 Like

Yes, it solved the problem.

But for now I have the same error in Publish->App UI of EDGE: “failed to decrypt data”. Could you fix and that connected issue too, please?

This particular issue I can’t reproduce. Do you have a screenshot for it ?

Yes, here it is

Thanks, will share with the team.