diff --git a/builtin/credential/cert/path_login.go b/builtin/credential/cert/path_login.go
index <HASH>..<HASH> 100644
--- a/builtin/credential/cert/path_login.go
+++ b/builtin/credential/cert/path_login.go
@@ -90,6 +90,7 @@ func (b *backend) pathLogin(ctx context.Context, req *logical.Request, data *fra
 			Metadata: map[string]string{
 				"cert_name":        matched.Entry.Name,
 				"common_name":      clientCerts[0].Subject.CommonName,
+				"serial_number":    clientCerts[0].SerialNumber.String(),
 				"subject_key_id":   certutil.GetHexFormatted(clientCerts[0].SubjectKeyId, ":"),
 				"authority_key_id": certutil.GetHexFormatted(clientCerts[0].AuthorityKeyId, ":"),
 			},
@@ -99,7 +100,7 @@ func (b *backend) pathLogin(ctx context.Context, req *logical.Request, data *fra
 				MaxTTL:    matched.Entry.MaxTTL,
 			},
 			Alias: &logical.Alias{
-				Name: clientCerts[0].SerialNumber.String(),
+				Name: clientCerts[0].Subject.CommonName,
 			},
 		},
 	}
Fix alias data being used for cert auth (serial number -> common name) (#<I>)

Fixes #<I>