diff --git a/internal/certification/certificates.go b/internal/certification/certificates.go index 4cad4e2..53bd843 100644 --- a/internal/certification/certificates.go +++ b/internal/certification/certificates.go @@ -33,11 +33,6 @@ const ( ) type Certificates struct { - // { - // ClientCertificateSecretKey: { - // "tls.crt": []byte - // } - // } Certificates map[string]map[string]core.SecretBytes // Context is the context used to control the application. diff --git a/internal/configuration/settings.go b/internal/configuration/settings.go index 72be6fa..d15ad84 100644 --- a/internal/configuration/settings.go +++ b/internal/configuration/settings.go @@ -179,7 +179,6 @@ func (s *Settings) Initialize() error { certificates := certification.NewCertificates(s.Context, s.K8sClient) - // q. Why is this a separate step? err = certificates.Initialize() if err != nil { return fmt.Errorf(`error occurred initializing certificates: %w`, err) diff --git a/internal/core/secret_bytes.go b/internal/core/secret_bytes.go index fddd6cf..0bbc3bf 100644 --- a/internal/core/secret_bytes.go +++ b/internal/core/secret_bytes.go @@ -4,6 +4,12 @@ import ( "encoding/json" ) +// Wraps byte slices which potentially could contain +// sensitive data that should not be output to the logs. +// This will output [REDACTED] if attempts are made +// to print this type in logs, serialize to JSON, or +// otherwise convert it to a string. +// Usage: core.SecretBytes(myByteSlice) type SecretBytes []byte func (sb SecretBytes) String() string {