Remove reporting the CA mode from startup logs

pull/1803/head
Herman Slatman 2 weeks ago
parent 6bc0a86207
commit 113a6dd8ab
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

@ -8,7 +8,6 @@ import (
"crypto/sha256"
"crypto/x509"
"encoding/hex"
"fmt"
"log"
"net/http"
"strings"
@ -823,26 +822,6 @@ func (a *Authority) init() error {
return nil
}
func (a *Authority) Mode() string {
if a.isRA() {
return fmt.Sprintf("RA (%s)", casapi.TypeOf(a.x509CAService).Name())
}
return "CA" // TODO(hs): more info? I.e. KMS type?
}
func (a *Authority) isRA() bool {
if a.x509CAService == nil {
return false
}
switch casapi.TypeOf(a.x509CAService) {
case casapi.StepCAS, casapi.CloudCAS, casapi.VaultCAS, casapi.ExternalCAS:
return true
default:
return false
}
}
// initLogf is used to log initialization information. The output
// can be disabled by starting the CA with the `--quiet` flag.
func (a *Authority) initLogf(format string, v ...any) {

@ -425,7 +425,6 @@ func (ca *CA) Run() error {
log.Printf("Current context: %s", step.Contexts().GetCurrent().Name)
}
log.Printf("Config file: %s", ca.getConfigFileOutput())
log.Printf("Mode: %s", ca.auth.Mode())
baseURL := fmt.Sprintf("https://%s%s",
authorityInfo.DNSNames[0],
ca.config.Address[strings.LastIndex(ca.config.Address, ":"):])

@ -67,23 +67,6 @@ func (t Type) String() string {
return strings.ToLower(string(t))
}
// Name returns the name of the CAS implementation.
func (t Type) Name() (name string) {
switch t {
case CloudCAS:
name = "GCP CAS"
case StepCAS:
name = "Step CAS"
case VaultCAS:
name = "Vault"
case ExternalCAS:
name = "External"
default:
name = "SoftCAS" // TODO(hs): different name? It's not a "CAS" CAS, really
}
return
}
// TypeOf returns the type of the given CertificateAuthorityService.
func TypeOf(c CertificateAuthorityService) Type {
if ct, ok := c.(interface{ Type() Type }); ok {

Loading…
Cancel
Save