secretsutils

package
v0.59.0-devel Latest Latest
Warning

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

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

Documentation

Overview

Package secretsutils contains utilities to manage secrets for e2e tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithUnixSecretPermissions

func WithUnixSecretPermissions(allowGroupExec bool) optional.Option[perms.FilePermissions]

WithUnixSecretPermissions returns an UnixPermissions object containing correct permissions for a secret backend script.

func WithUnixSecretSetupScript

func WithUnixSecretSetupScript(path string, allowGroupExec bool) func(*agentparams.Params) error

WithUnixSecretSetupScript returns an agent param that setups a secret resolver script with correct permissions.

func WithWindowsSecretPermissions added in v0.56.0

func WithWindowsSecretPermissions(allowGroupExec bool) optional.Option[perms.FilePermissions]

WithWindowsSecretPermissions returns a WindowsPermissions object containing correct permissions for a secret backend script.

func WithWindowsSecretSetupScript added in v0.56.0

func WithWindowsSecretSetupScript(wrapperPath string, allowGroupExec bool) []func(*agentparams.Params) error

WithWindowsSecretSetupScript returns a list of agent params that setups a secret resolver script with correct permissions.

Types

type SecretClient

type SecretClient struct {
	// contains filtered or unexported fields
}

SecretClient is a client that can create and delete files containing secrets

func NewSecretClient

func NewSecretClient(t *testing.T, host *components.RemoteHost, rootDir string) *SecretClient

NewSecretClient creates a new SecretClient that can create and delete files containing secrets

func (*SecretClient) RemoveSecret

func (c *SecretClient) RemoveSecret(name string) error

RemoveSecret deletes the file containing the secret

func (*SecretClient) SetSecret

func (c *SecretClient) SetSecret(name string, value string) int64

SetSecret creates a new file containing the secret value

Jump to

Keyboard shortcuts

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