security

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PropertiesPrefix = "integrate.security"
)

Variables

View Source
var DefaultConfigFS embed.FS

Functions

This section is empty.

Types

type AccountCredentialsProperties

type AccountCredentialsProperties struct {
	Username      string `json:"username"`
	Password      string `json:"password"`
	SystemAccount bool   `json:"system-account"`
}

type AccountsProperties

type AccountsProperties struct {
	Default    AccountCredentialsProperties   `json:"default"`
	Additional []AccountCredentialsProperties `json:"additional"`
}

type AuthEndpointsProperties

type AuthEndpointsProperties struct {
	// BaseUrl is used to override service discovery and load-balancing, it should kept empty in production
	BaseUrl       string `json:"base-url"`
	PasswordLogin string `json:"password-login"`
	SwitchContext string `json:"switch-context"`
}

type ClientCredentialsProperties

type ClientCredentialsProperties struct {
	ClientId     string `json:"client-id"`
	ClientSecret string `json:"secret"`
}

type SecurityIntegrationProperties

type SecurityIntegrationProperties struct {
	// How much time after a failed attempt, when re-try is allowed. Before this period pass,
	// integration framework will not re-attempt switching context to same combination of username and tenant name
	FailureBackOff utils.Duration `json:"failure-back-off"`

	// How much time that security context is guaranteed to be valid after requested.
	// when such validity cannot be guaranteed (e.g. this value is longer than token's validity),
	// we use FailureBackOff and re-request new token after `back-off` passes
	GuaranteedValidity utils.Duration `json:"guaranteed-validity"`

	ServiceName string                      `json:"service-name"`
	Endpoints   AuthEndpointsProperties     `json:"endpoints"`
	Client      ClientCredentialsProperties `json:"client"`
	Accounts    AccountsProperties          `json:"accounts"`
}

func BindSecurityIntegrationProperties

func BindSecurityIntegrationProperties(ctx *bootstrap.ApplicationContext) SecurityIntegrationProperties

BindSecurityIntegrationProperties create and bind SessionProperties, with a optional prefix

func NewSecurityIntegrationProperties

func NewSecurityIntegrationProperties() *SecurityIntegrationProperties

NewSecurityIntegrationProperties create a DataProperties with default values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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