Documentation
¶
Index ¶
- func DecodeP12(p12 []byte) ([]byte, []byte, error)
- func DecodePEM(certPEM []byte) tls.Certificate
- func GetSMValue(ctx context.Context, secretsManager SecretsManagerAPI, key string) ([]byte, error)
- func GetTLS(cfg TLSConfig) (*tls.Config, error)
- func MakeTLS(clientCert, key []byte, isP12 bool) (*tls.Config, error)
- type SecretManagerConfig
- type SecretsManagerAPI
- type TLSConfig
- type VaultInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePEM ¶
func DecodePEM(certPEM []byte) tls.Certificate
DecodePEM builds a PEM certificate object
func GetSMValue ¶
TODO @shipperizer mvoe this to be a method and enhance the SecretsManagerAPI or split it and wrap it
Types ¶
type SecretManagerConfig ¶
type SecretManagerConfig struct { CertificateString string KeyString string P12String string SMClient SecretsManagerAPI // TODO @shipperizer deprecate in favour of the one below Vault VaultInterface }
func NewSecretManagerConfig ¶ added in v1.2.0
func NewSecretManagerConfig(cert, key, p12 string, vault VaultInterface) *SecretManagerConfig
type SecretsManagerAPI ¶
type SecretsManagerAPI interface {
GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
}
SecretsManagerAPI interface for AWS Secrets Manager Client.
func SMClient ¶
func SMClient(region, endpoint string) (SecretsManagerAPI, error)
SMClient returns SecretsManagerAPI interface that implements secretsmanager.Client. `endpoint` arg can be used when developing locally.
type TLSConfig ¶
type TLSConfig struct { UseTLS bool UseP12 bool SMConfig *SecretManagerConfig ClientSignedCertificate []byte ClientKey []byte // contains filtered or unexported fields }
TLSConfig holds core configuration to setup TLS for kafka
func NewTLSConfig ¶ added in v1.2.0
func NewTLSConfig(cert, key []byte, useTLS, useP12 bool, secretsConfig *SecretManagerConfig, logger logging.LoggerInterface) *TLSConfig
Click to show internal directories.
Click to hide internal directories.