1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
1
The error message you're encountering is likely due to an incorrect syntax in the command you're using. Here's the correct syntax for the aws iot test-invoke-authorizer command:
aws iot test-invoke-authorizer
--authorizer-name my-new-authorizer
--token "tokenKeyValue"
--token-signature "$(echo -n "tokenKeyValue" | openssl dgst -sha256 -sign private-key.pem | openssl base64)"
Note that the tokenKeyValue and the token-signature values need to be passed in quotes, as they are string values. Also, the calculation of the token-signature value should be included in the command.
respondido hace un año
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 3 años
Thank You for the reply. I followed your instructions. Now I am getting the following error: An error occurred (InvalidRequestException) when calling the TestInvokeAuthorizer operation: Token signature mismatch for authorizer my-new-authorizer.
I am using Openssl version:OpenSSL 1.1.1s 1 Nov 2022 Windows10. Kindly help
The error message suggests that the token signature you are passing in the command is incorrect. Here are a few steps you can try to resolve this issue:
am still getiing the error: An error occurred (InvalidRequestException) when calling the TestInvokeAuthorizer operation: Token signature mismatch for authorizer my-new-authorizer.
1.How to check tokenKeyValue value is correct? 2.How to verify the token signature calculation? I have ensured that the private-key.pem file is the correct private key that corresponds to the public key associated with the authorizer. Kindly help