Is there anyway that I can authenticate the client using the client certificates (nginx can be configured for it) and pass this information in http headers into Mattermost?
There’s no explicit support in Mattermost for it, all our authentication is done through email/password, OAuth or LDAP. Once the user is created we then return temporary session tokens to the client to provide in headers to get access to that specific session. Sessions are configurable for how long they last so you might be able to configure them to last a long time and somehow embed the session token in your client certificate and have nginx push in the appropriate HTTP headers.
If you’d like to make a feature request for this you can follow our process here.