Fix alias data being used for cert auth (serial number -> common name) (#4495)
Fixes #4475
This commit is contained in:
parent
9b9be9622a
commit
b1d44a7dee
|
@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue