mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-02 14:12:27 +00:00
fix: add CommonName to SAML SP certificate (#10700)
# Which Problems Are Solved There is no CN (CommonName) defined in the certificates to use an external SAML IDP. # How the Problems Are Solved Add Issuer and CommonName to the certificate information. # Additional Changes None # Additional Context Closes #9048 Co-authored-by: Gayathri Vijayan <66356931+grvijayan@users.noreply.github.com>
This commit is contained in:
@@ -294,8 +294,13 @@ func samlCertificateAndKeyGenerator(keySize int, lifetime time.Duration) func(id
|
|||||||
SerialNumber: big.NewInt(int64(serial)),
|
SerialNumber: big.NewInt(int64(serial)),
|
||||||
Subject: pkix.Name{
|
Subject: pkix.Name{
|
||||||
Organization: []string{"ZITADEL"},
|
Organization: []string{"ZITADEL"},
|
||||||
|
CommonName: fmt.Sprintf("ZITADEL SP %s", id),
|
||||||
SerialNumber: id,
|
SerialNumber: id,
|
||||||
},
|
},
|
||||||
|
Issuer: pkix.Name{
|
||||||
|
Organization: []string{"ZITADEL"},
|
||||||
|
CommonName: "ZITADEL",
|
||||||
|
},
|
||||||
NotBefore: now,
|
NotBefore: now,
|
||||||
NotAfter: now.Add(lifetime),
|
NotAfter: now.Add(lifetime),
|
||||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
|
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
|
||||||
|
|||||||
Reference in New Issue
Block a user