Skip to content

apigateway mtls error "Access denied Reason Could not find issuer for certificate"

0

I have a apigateway with domain configuration and domain has mtls and i hava trustore.pem and the client which is using this api has a client.pem which has only intermediate certificate and in my trustore I has both root and intermediate for that certificate and when I run openssl verify -CAfile truststore.pem client.pem I'm getting OK status but when client is accessing the api they are getting 403 "Access denied Reason Could not find issuer for certificate" why this is happening and how to fix this?

asked a year ago270 views

1 Answer
0

This error occurs when API Gateway cannot find the issuer for the client certificate during mutual TLS (mTLS) authentication. Even though your OpenSSL verification works locally, there are several potential reasons for this issue:

  1. Certificate Chain Issues: The client might not be sending the complete certificate chain. For mTLS in API Gateway, the client must present a certificate whose issuer (and the complete chain of trust up to the root CA certificate) is in your truststore.

  2. Truststore Format: Ensure your truststore.pem file is properly formatted and contains all necessary certificates in the correct order. The truststore should include the root CA certificate and all intermediate certificates in the chain.

  3. Certificate Conflicts: API Gateway allows only one issuer per certificate subject for mutual TLS domains. If multiple Certificate Authorities have issued certificates for the same domain, you'll encounter conflicts.

To resolve this issue:

  1. Verify that the client is sending the complete certificate chain during the TLS handshake.

  2. Double-check your truststore.pem to ensure it contains all required certificates in PEM format.

  3. Make sure the client certificate's issuer and the complete chain of trust up to the root CA certificate are included in your truststore.

  4. If you've recently updated your truststore, ensure the API Gateway custom domain name is properly updated to use the new truststore.

  5. Check if there are any certificate warnings in API Gateway that might indicate issues with certificates in your truststore.

If the problem persists after these checks, you might need to contact AWS Support for further investigation, especially if there are certificate conflicts that you cannot resolve directly.
Sources
How to turn on mutual TLS authentication for your REST APIs in API Gateway - Amazon API Gateway
How to turn on mutual TLS authentication for your HTTP APIs in API Gateway - Amazon API Gateway

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.