mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-06 05:27:23 +00:00
TokenCredentialRequest uses actual cert expiry time instead of estimate
and also audit logs both the NotBefore and NotAfter of the issued cert. Implemented by changing the return type of the cert issuer helpers to make them also return the NotBefore and NotAfter values of the new cert, along with the key PEM and cert PEM.
This commit is contained in:
committed by
Joshua Casey
parent
032160a85e
commit
ae5aad178d
@@ -79,7 +79,7 @@ func TestController(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
someUnknownHostNames := []string{"some-dns-name", "some-other-dns-name"}
|
||||
someLocalIPAddress := []net.IP{net.ParseIP("10.2.3.4")}
|
||||
pemServerCertForUnknownServer, _, err := caForUnknownServer.IssueServerCertPEM(
|
||||
pemServerCertForUnknownServer, err := caForUnknownServer.IssueServerCertPEM(
|
||||
someUnknownHostNames,
|
||||
someLocalIPAddress,
|
||||
time.Hour,
|
||||
@@ -216,7 +216,7 @@ func TestController(t *testing.T) {
|
||||
badWebhookAuthenticatorSpecGoodEndpointButUnknownCA := authenticationv1alpha1.WebhookAuthenticatorSpec{
|
||||
Endpoint: goodWebhookDefaultServingCertEndpoint,
|
||||
TLS: &authenticationv1alpha1.TLSSpec{
|
||||
CertificateAuthorityData: base64.StdEncoding.EncodeToString(pemServerCertForUnknownServer),
|
||||
CertificateAuthorityData: base64.StdEncoding.EncodeToString(pemServerCertForUnknownServer.CertPEM),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user