saml

package
v2.2.2-patch1-rc1+inco... Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PingName     = "ping"
	ADFSName     = "adfs"
	KeyCloakName = "keycloak"
	OKTAName     = "okta"
)

Variables

View Source
var SamlProviders = make(map[string]*Provider)

Functions

func AuthHandler

func AuthHandler() http.Handler

func Configure

func Configure(ctx context.Context, mgmtCtx *config.ScaledContext, userMGR user.Manager, tokenMGR *tokens.Manager, name string) common.AuthProvider

func InitializeSamlServiceProvider

func InitializeSamlServiceProvider(configToSet *v3.SamlConfig, name string) error

func PerformSamlLogin

func PerformSamlLogin(name string, apiContext *types.APIContext, input interface{}) error

Types

type IDPMetadata

type IDPMetadata struct {
	XMLName           xml.Name                `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"`
	ValidUntil        time.Time               `xml:"validUntil,attr"`
	EntityID          string                  `xml:"entityID,attr"`
	IDPSSODescriptors []saml.IDPSSODescriptor `xml:"IDPSSODescriptor"`
	SPSSODescriptors  []saml.SPSSODescriptor  `xml:"SPSSODescriptor"`
}

type Provider

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

func (*Provider) AuthenticateUser

func (s *Provider) AuthenticateUser(input interface{}) (v3.Principal, []v3.Principal, string, error)

func (*Provider) CanAccessWithGroupProviders

func (s *Provider) CanAccessWithGroupProviders(userPrincipalID string, groupPrincipals []v3.Principal) (bool, error)

func (*Provider) CustomizeSchema

func (s *Provider) CustomizeSchema(schema *types.Schema)

func (*Provider) GetName

func (s *Provider) GetName() string

func (*Provider) GetPrincipal

func (s *Provider) GetPrincipal(principalID string, token v3.Token) (v3.Principal, error)

func (*Provider) HandleSamlAssertion

func (s *Provider) HandleSamlAssertion(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion)

HandleSamlAssertion processes/handles the assertion obtained by the POST to /saml/acs from IdP

func (*Provider) HandleSamlLogin

func (s *Provider) HandleSamlLogin(w http.ResponseWriter, r *http.Request) (string, error)

HandleSamlLogin is the endpoint for /saml/login endpoint

func (*Provider) RefetchGroupPrincipals

func (s *Provider) RefetchGroupPrincipals(principalID string, secret string) ([]v3.Principal, error)

func (*Provider) SearchPrincipals

func (s *Provider) SearchPrincipals(searchKey, principalType string, token v3.Token) ([]v3.Principal, error)

func (*Provider) ServeHTTP

func (s *Provider) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is the handler for /saml/metadata and /saml/acs endpoints

func (*Provider) TransformToAuthProvider

func (s *Provider) TransformToAuthProvider(authConfig map[string]interface{}) map[string]interface{}

Jump to

Keyboard shortcuts

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