Skip to content

Commit

Permalink
use country/org config values in csr
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Avetisyan <[email protected]>
  • Loading branch information
Henry Avetisyan committed Nov 12, 2021
1 parent 0c87e98 commit c00da20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions provider/aws/sia-eks/authn.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func GetRoleCertificate(ztsUrl, svcKeyFile, svcCertFile string, opts *options.Op

certFilePem := util.GetRoleCertFileName(opts.CertDir, role.Filename, roleName)

csr, err := util.GenerateRoleCertCSR(key, "US", "", opts.Domain, opts.Services[0].Name, roleName, opts.TaskId, provider, opts.ZTSAWSDomains[0])
csr, err := util.GenerateRoleCertCSR(key, opts.CertCountryName, opts.CertOrgName, opts.Domain, opts.Services[0].Name, roleName, opts.TaskId, provider, opts.ZTSAWSDomains[0])
if err != nil {
logutil.LogInfo(sysLogger, "unable to generate CSR for %s, err: %v\n", roleName, err)
failures += 1
Expand Down Expand Up @@ -210,7 +210,7 @@ func registerSvc(svc options.Service, data *attestation.AttestationData, ztsUrl
}

provider := getProviderName(opts.ProviderDomain, opts.Region)
csr, err := util.GenerateSvcCertCSR(key, "US", "Oath Inc.", opts.Domain, svc.Name, data.Role, opts.TaskId, provider, opts.ZTSAWSDomains, opts.SanDnsWildcard)
csr, err := util.GenerateSvcCertCSR(key, opts.CertCountryName, opts.CertOrgName, opts.Domain, svc.Name, data.Role, opts.TaskId, provider, opts.ZTSAWSDomains, opts.SanDnsWildcard)
if err != nil {
return err
}
Expand Down Expand Up @@ -280,7 +280,7 @@ func refreshSvc(svc options.Service, data *attestation.AttestationData, ztsUrl s
return err
}

csr, err := util.GenerateSvcCertCSR(key, "US", "Oath Inc.", opts.Domain, svc.Name, data.Role, opts.TaskId, provider, opts.ZTSAWSDomains, opts.SanDnsWildcard)
csr, err := util.GenerateSvcCertCSR(key, opts.CertCountryName, opts.CertOrgName, opts.Domain, svc.Name, data.Role, opts.TaskId, provider, opts.ZTSAWSDomains, opts.SanDnsWildcard)
if err != nil {
logutil.LogInfo(sysLogger, "Unable to generate CSR for %s, err: %v\n", opts.Name, err)
return err
Expand Down

0 comments on commit c00da20

Please sign in to comment.