Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInfoHandler ¶
func NewInfoHandler(ctx context.Context, c Config, certCache credloader.CertCache) func(writer http.ResponseWriter, request *http.Request)
NewInfoHandler returns handler which gives information about the CMP client certificate. The issuer and the subject are dynamically loaded from the certificate itself (reading the cert from the cert cache every time the endpoint is hit) rather than using hardcoded env values.
Types ¶
type Config ¶
type Config struct { APIEndpoint string `envconfig:"APP_INFO_API_ENDPOINT,default=/v1/info" json:"-"` RootCA string `envconfig:"APP_INFO_ROOT_CA"` ExternalClientCertSecretName string `envconfig:"APP_EXTERNAL_CLIENT_CERT_SECRET_NAME"` }
Config contains the data that should be exported on the info endpoint
Click to show internal directories.
Click to hide internal directories.