internalauth

package
v0.0.0-...-a92fb97 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package internalauth manages authorizing gRPC calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RootPassword string `` /* 209-byte string literal not displayed */
}

type Permissions

type Permissions struct {
	// If set, a password that can be provided to bypass all access controls.
	RootPassword string
	RPCConfig    map[string]*RPCConfig
	Store        *store.Connection
	Cookies      *sessions.CookieConfig
}

Permissions manages all authorization in JSSO.

func NewFromConfig

func NewFromConfig(c *Config, s *store.Connection) *Permissions

NewFromConfig builds a Permissions object from configuration.

func (*Permissions) AllowAuthorizeHTTP

func (p *Permissions) AllowAuthorizeHTTP(ctx context.Context, proxyUser *types.User) error

func (*Permissions) AllowFinishEnrollment

func (p *Permissions) AllowFinishEnrollment(ctx context.Context, target *types.Session) error
func (p *Permissions) AllowGenerateEnrollmentLink(ctx context.Context, target *types.User, actor *types.Session) error

func (*Permissions) AllowRedirect

func (p *Permissions) AllowRedirect(destination string) error

func (*Permissions) AllowStartEnrollment

func (p *Permissions) AllowStartEnrollment(ctx context.Context, target *types.Session) error

func (*Permissions) AllowStartLogin

func (p *Permissions) AllowStartLogin(ctx context.Context, target *types.User) error

func (*Permissions) AllowUserEdit

func (p *Permissions) AllowUserEdit(ctx context.Context, target *types.User, actor *types.Session) error

func (*Permissions) AllowWebVisit

func (p *Permissions) AllowWebVisit(ctx context.Context, session *types.Session, requestURL *url.URL) error

func (*Permissions) AuthorizeRPC

func (p *Permissions) AuthorizeRPC(ctx context.Context, session *types.Session, fullMethod string) error

AuthorizeRPC returns whether the credentials provided allow the RPC to be called.

func (*Permissions) EnrollmentSessionPrototype

func (p *Permissions) EnrollmentSessionPrototype(ctx context.Context, target *types.User) (*types.Session, error)

General policy decisions start here.

func (*Permissions) LoginSessionPrototype

func (p *Permissions) LoginSessionPrototype(ctx context.Context, target *types.User) (*types.Session, error)

func (*Permissions) StreamServerInterceptor

func (p *Permissions) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*Permissions) UnaryServerInterceptor

func (p *Permissions) UnaryServerInterceptor() grpc.UnaryServerInterceptor

type RPCConfig

type RPCConfig struct {
	// An RPC must tolerate all session taints in order to be executed.
	Tolerations []string
}

RPCConfig configures permissions for an RPC.

Jump to

Keyboard shortcuts

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