auditlogging

package
v0.0.0-...-c2c7f5f Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingMapping = errors.New("missing mapping for selected region in provider config")

Functions

func ApplyAuditLogConfig

func ApplyAuditLogConfig(shoot *gardener.Shoot, auditConfigFromFile map[string]map[string]AuditLogData, providerType string) (bool, error)

Types

type AuditLog

type AuditLog struct {
	AuditLogConfigurator
}

func (*AuditLog) Enable

func (al *AuditLog) Enable(ctx context.Context, shoot *gardener.Shoot) (bool, error)

func (*AuditLog) UpdateShootClient

func (al *AuditLog) UpdateShootClient(client client.Client)

type AuditLogConfigurator

type AuditLogConfigurator interface {
	CanEnableAuditLogsForShoot(seedName string) bool
	GetPolicyConfigMapName() string
	GetSeedObj(ctx context.Context, seedKey types.NamespacedName) (gardener.Seed, error)
	UpdateShoot(ctx context.Context, shoot *gardener.Shoot) error
	GetConfigFromFile() (data map[string]map[string]AuditLogData, err error)
	UpdateClient(client client.Client)
}

type AuditLogData

type AuditLogData struct {
	TenantID   string `json:"tenantID" validate:"required"`
	ServiceURL string `json:"serviceURL" validate:"required,url"`
	SecretName string `json:"secretName" validate:"required"`
}

type AuditLogging

type AuditLogging interface {
	Enable(ctx context.Context, shoot *gardener.Shoot) (bool, error)
	UpdateShootClient(client client.Client)
}

func NewAuditLogging

func NewAuditLogging(auditLogTenantConfigPath, auditLogPolicyConfigMapName string, k8s client.Client) AuditLogging

type AuditlogExtensionConfig

type AuditlogExtensionConfig struct {
	metav1.TypeMeta `json:",inline"`

	// Type is the type of auditlog service provider.
	Type string `json:"type"`
	// TenantID is the id of the tenant.
	TenantID string `json:"tenantID"`
	// ServiceURL is the URL of the auditlog service.
	ServiceURL string `json:"serviceURL"`
	// SecretReferenceName is the name of the reference for the secret containing the auditlog service credentials.
	SecretReferenceName string `json:"secretReferenceName"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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