Add provisioner name to RA info

This commit is contained in:
Mariano Cano 2022-08-03 18:44:04 -07:00
parent 9648fe6b4c
commit 6b5d3dca95
4 changed files with 4 additions and 0 deletions

View file

@ -346,6 +346,7 @@ type RAInfo struct {
AuthorityID string `json:"authorityId"`
ProvisionerID string `json:"provisionerId"`
ProvisionerType string `json:"provisionerType"`
ProvisionerName string `json:"provisionerName"`
}
// raProvisioner wraps a provisioner with RA data.

View file

@ -102,6 +102,7 @@ func (a *Authority) Sign(csr *x509.CertificateRequest, signOpts provisioner.Sign
pInfo = &casapi.ProvisionerInfo{
ProvisionerID: prov.GetID(),
ProvisionerType: prov.GetType().String(),
ProvisionerName: prov.GetName(),
}
// Adds new options to NewCertificate
case provisioner.CertificateOptions:

View file

@ -14,6 +14,7 @@ type raInfo struct {
AuthorityID string `json:"authorityId,omitempty"`
ProvisionerID string `json:"provisionerId"`
ProvisionerType string `json:"provisionerType"`
ProvisionerName string `json:"provisionerName"`
}
type stepIssuer interface {

View file

@ -81,6 +81,7 @@ func (s *StepCAS) CreateCertificate(req *apiv1.CreateCertificateRequest) (*apiv1
AuthorityID: s.authorityID,
ProvisionerID: p.ProvisionerID,
ProvisionerType: p.ProvisionerType,
ProvisionerName: p.ProvisionerName,
}
}