config

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTLSGenDir = os.ExpandEnv("$HOME/.config/aserto/scim/certs")
)

Functions

func NewLoggerConfig added in v0.0.5

func NewLoggerConfig(configPath string) (*logger.Config, error)

Types

type AuthConfig

type AuthConfig struct {
	Basic struct {
		Enabled  bool   `json:"enabled"`
		Username string `json:"username"`
		Password string `json:"password"`
	} `json:"basic"`
	Bearer struct {
		Enabled bool   `json:"enabled"`
		Token   string `json:"token"`
	} `json:"bearer"`
}

type Config

type Config struct {
	Logging   logger.Config `json:"logging"`
	Directory client.Config `json:"directory"`
	Server    struct {
		ListenAddress string               `json:"listen_address"`
		Certs         certs.TLSCredsConfig `json:"certs"`
		Auth          AuthConfig           `json:"auth"`
	} `json:"server"`

	SCIM struct {
		CreateEmailIdentities bool            `json:"create_email_identities"`
		CreateRoleGroups      bool            `json:"create_role_groups"`
		GroupMappings         []ObjectMapping `json:"group_mappings"`
		UserMappings          []ObjectMapping `json:"user_mappings"`
		UserObjectType        string          `json:"user_object_type"`
		GroupMemberRelation   string          `json:"group_member_relation"`
		GroupObjectType       string          `json:"group_object_type"`
		IdentityObjectType    string          `json:"identity_object_type"`
		IdentityRelation      string          `json:"identity_relation"`
	} `json:"scim"`
}

func NewConfig

func NewConfig(configPath string, log *zerolog.Logger, certsGenerator *certs.Generator) (*Config, error)

type ObjectMapping added in v0.0.6

type ObjectMapping struct {
	SubjectID       string `json:"subject_id"`
	ObjectType      string `json:"object_type"`
	ObjectID        string `json:"object_id"`
	Relation        string `json:"relation"`
	SubjectRelation string `json:"subject_relation"`
}

Jump to

Keyboard shortcuts

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