samlctx

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GrantTypeSamlSSO = oauth2.GrantTypeSamlSSO
)
View Source
const SamlPropertiesPrefix = "security.auth.saml"

Variables

View Source
var Module = &bootstrap.Module{
	Name:       "saml",
	Precedence: security.MinSecurityPrecedence + 20,
	Options: []fx.Option{
		fx.Provide(BindSamlProperties),
	},
}

Functions

This section is empty.

Types

type SamlBindingManager

type SamlBindingManager interface {
	// PreferredBindings returns supported bindings in order of preference.
	// possible values are
	// - saml.HTTPRedirectBinding
	// - saml.HTTPPostBinding
	// - saml.HTTPArtifactBinding
	// - saml.SOAPBinding
	// Note that this is not list of supported bindings. Supported bindings are determined by IDP and SP
	PreferredBindings() []string
}

SamlBindingManager is an additional interface that SamlIdentityProviderManager could implement.

type SamlClient

type SamlClient interface {
	GetEntityId() string
	GetMetadataSource() string
	ShouldSkipAssertionEncryption() bool
	ShouldSkipAuthRequestSignatureVerification() bool
	GetTenantRestrictions() utils.StringSet
	GetTenantRestrictionType() string

	ShouldMetadataRequireSignature() bool
	ShouldMetadataTrustCheck() bool
	GetMetadataTrustedKeys() []string
}

type SamlClientStore

type SamlClientStore interface {
	GetAllSamlClient(ctx context.Context) ([]SamlClient, error)
	GetSamlClientByEntityId(ctx context.Context, entityId string) (SamlClient, error)
}

type SamlIdentityProvider

type SamlIdentityProvider interface {
	idp.IdentityProvider
	EntityId() string
	MetadataLocation() string
	ExternalIdName() string
	ExternalIdpName() string
	ShouldMetadataRequireSignature() bool
	ShouldMetadataTrustCheck() bool
	GetMetadataTrustedKeys() []string
	GetAutoCreateUserDetails() security.AutoCreateUserDetails
}

type SamlIdentityProviderManager

type SamlIdentityProviderManager interface {
	GetIdentityProviderByEntityId(ctx context.Context, entityId string) (idp.IdentityProvider, error)
}

type SamlProperties

type SamlProperties struct {
	CertificateFile string `json:"certificate-file"`
	KeyFile         string `json:"key-file"`
	KeyPassword     string `json:"key-password"`
	NameIDFormat    string `json:"name-id-format"`
}

func BindSamlProperties

func BindSamlProperties(ctx *bootstrap.ApplicationContext) SamlProperties

func NewSamlProperties

func NewSamlProperties() *SamlProperties

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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