config

package
v0.29.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecret

func GetSecret(secretName string) (secretString string, err error)

GetSecret gets the value of the secret in AWS SecretsManager with the specified name

Types

type CloudProvider

type CloudProvider struct {
	Name    string
	Project string
	Self    string
}

CloudProvider type

type Config

type Config struct {
	IncludeAwsUserKeys              bool
	IncludeInactiveKeys             bool
	Datadog                         Datadog
	DatadogAPIKey                   string
	RotationMode                    bool
	CloudProviders                  []CloudProvider
	AccountFilter                   Filter
	AccountKeyLocations             []KeyLocations
	Credentials                     cred.Credentials
	DefaultRotationAgeThresholdMins int
	EnableKeyAgeLogging             bool
}

Config type

func GetConfig

func GetConfig(configPath string) (c Config, err error)

GetConfig returns the application config

func GetConfigFromAWSSecretManager

func GetConfigFromAWSSecretManager(secretName, configType string) (c Config, err error)

GetConfigFromAWSSecretManager grabs the cloud-key-rotator's config from AWS Secret Manager

func GetConfigFromGCS

func GetConfigFromGCS(bucketName, objectName, configType string) (c Config, err error)

GetConfigFromGCS grabs the cloud-key-rotator's config from GCS

type Datadog

type Datadog struct {
	MetricEnv     string
	MetricTeam    string
	MetricName    string
	MetricProject string
	MetricService string
}

Datadog type

type Filter

type Filter struct {
	Mode     string
	Accounts []ProviderServiceAccounts
}

Filter type

type KeyLocations

type KeyLocations struct {
	RotationAgeThresholdMins int
	ServiceAccountName       string
	Atlas                    []location.Atlas
	CircleCI                 []location.CircleCI
	CircleCIContext          []location.CircleCIContext
	DatadogGCPIntegration    []location.Datadog
	GCS                      []location.Gcs
	Git                      location.Git
	GitHub                   []location.GitHub
	Gocd                     []location.Gocd
	K8s                      []location.K8s
	SSM                      []location.Ssm
	SecretsManager           []location.SecretsManager
}

KeyLocations type

type ProviderServiceAccounts

type ProviderServiceAccounts struct {
	Provider         CloudProvider
	ProviderAccounts []string
}

ProviderServiceAccounts type

Jump to

Keyboard shortcuts

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