Record the common name in TLS metadata

It is useful to be able to save the client cert's Common Name for auditing purposes when using a central CA.

This adds a "common_name" value to the Metadata structure passed from login.
This commit is contained in:
Christian Svensson 2015-06-14 23:18:21 +01:00
parent f355049ef1
commit e3d3012795

View file

@ -62,6 +62,7 @@ func (b *backend) pathLogin(
DisplayName: matched.Entry.DisplayName,
Metadata: map[string]string{
"cert_name": matched.Entry.Name,
"common_name": connState.PeerCertificates[0].Subject.CommonName,
},
LeaseOptions: logical.LeaseOptions{
Renewable: true,