I am using Vertx framework for my API and have enabled https on it successfully.
For user authentication/authorization, I wan't to use client certificates i.e. who can access which APIs. The flow will:
- When a client makes a API hit, it presents its certificate to Vertx server. This certificate should contain username as CN.
- Vertx server should validate the client certificate and extract the Common name from it and then do the authorization based on this username.
How do I read the client certificate to extract cn i.e. user principal ?