vault

package
v0.0.0-...-4892902 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVaultServer     = "auth.negentropy.flant.com"
	DefaultVaultServerType = v1.AuthServer
	DefaultAuthSocketPath  = "/run/authd/server-accessd.sock"
)
View Source
const FlantIAMMountpoint = "flant"
View Source
const ServerRole = "server"

ServerRole is project scoped role, definitely needs tenant and project allows LIST at flant/tenant/<tenant_uuid>/project/<project_uuid>/server/<server_uuid>/posix_users needs server_uuid be passed tr

Variables

This section is empty.

Functions

func ClientFromAuthd

func ClientFromAuthd(settings AuthdSettings, serverAccess ServerAccessSettings) (*api.Client, error)

Types

type AuthdSettings

type AuthdSettings struct {
	Server     string `json:"vaultServerAddr"`
	ServerType string `json:"vaultServerType"`
	SocketPath string `json:"authdSocketPath"`
}

func AssembleAuthdSettings

func AssembleAuthdSettings(settings AuthdSettings) AuthdSettings

type FlantIAMAuth

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

func NewFlantIAMAuth

func NewFlantIAMAuth(client *api.Client) *FlantIAMAuth

func (*FlantIAMAuth) PosixUsers

func (c *FlantIAMAuth) PosixUsers(settings ServerAccessSettings) ([]PosixUser, error)

type Logical

type Logical interface {
	Read(path string) (*api.Secret, error)
	ReadWithData(path string, data map[string][]string) (*api.Secret, error)
	List(path string) (*api.Secret, error)
	Write(path string, data map[string]interface{}) (*api.Secret, error)
	WriteBytes(path string, data []byte) (*api.Secret, error)
	Delete(path string) (*api.Secret, error)
	DeleteWithData(path string, data map[string][]string) (*api.Secret, error)
	Unwrap(wrappingToken string) (*api.Secret, error)
}

type PosixUser

type PosixUser struct {
	UID       int    `json:"uid"`
	Principal string `json:"principal"`

	Name     string `json:"name"`
	HomeDir  string `json:"home_directory"`
	Password string `json:"password"`
	Shell    string `json:"shell"`
	Gecos    string `json:"gecos"`
	Gid      int    `json:"gid"`
}

func ParsePosixUsers

func ParsePosixUsers(r io.Reader) ([]PosixUser, error)

type PosixUsers

type PosixUsers struct {
	Users []PosixUser `json:"posix_users"`
}

type PosixUsersData

type PosixUsersData struct {
	Data PosixUsers `json:"data"`
}

type ServerAccessSettings

type ServerAccessSettings struct {
	TenantUUID  string `json:"tenant"`
	ProjectUUID string `json:"project"`
	ServerUUID  string `json:"server"`
}

func AssembleServerAccessSettings

func AssembleServerAccessSettings(settings ServerAccessSettings) ServerAccessSettings

Jump to

Keyboard shortcuts

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