info

package
v0.0.0-...-a423d60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL