gateway

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RedirectURLHostname = "localhost"
	RedirectURLPort     = ":8000"
)

Variables

This section is empty.

Functions

func CreateInsecureConnection

func CreateInsecureConnection(ctx context.Context, url string) (*ggrpc.ClientConn, error)

func NewAPITokenServer added in v0.3.0

func NewAPITokenServer(
	issuer string,
	signer jwt.JWTSigner,
	userRepo repositories.UserRepository,
) api.APITokenServer

func NewAuthServer

func NewAuthServer(ctx context.Context, issuerURL string, oidcServer *auth.Server, policiesPath string, roleBindingRepo repositories.UserRoleBindingRepository) (*authServer, error)

NewAuthServer creates a new instance of gateway.authServer.

func NewClusterAuthAPIServer

func NewClusterAuthAPIServer(
	issuer string,
	signer jwt.JWTSigner,
	clusterAccessRepo repositories.ClusterAccessRepository,
	validity map[string]time.Duration,
) api.ClusterAuthServer

func NewGatewayAPIServer

func NewGatewayAPIServer(authConfig *auth.ClientConfig, client *auth.Client, server *auth.Server, userRepo repositories.UserRepository) api.GatewayServer

func NewInsecureAuthServerClient added in v0.3.6

func NewInsecureAuthServerClient(ctx context.Context, gatewayAddr string) (*grpc.ClientConn, gateway.GatewayAuthClient, error)

func NewOIDCProviderServer added in v0.3.6

func NewOIDCProviderServer(oidcServer *auth.Server) *oidcProviderServer

NewOIDCProviderServer creates a basic OIDC provider server

Types

type OpenIdConfiguration added in v0.3.0

type OpenIdConfiguration struct {
	Issuer  string `json:"issuer"`
	JwksURL string `json:"jwks_uri"`
}

type TestEnv added in v0.3.6

type TestEnv struct {
	*test.TestEnv
	JwtTestEnv                    *jwt.TestEnv
	ClientAuthConfig              *auth.ClientConfig
	ServerAuthConfig              *auth.ServerConfig
	IdentityProviderURL           string
	ApiListenerAPIServer          net.Listener
	ApiListenerOIDCProviderServer net.Listener
	HttpClient                    *http.Client
	GrpcServer                    *grpc.Server
	LocalOIDCProviderServer       *oidcProviderServer
	PoliciesPath                  string
	// contains filtered or unexported fields
}

func NewTestEnvWithParent added in v0.3.6

func NewTestEnvWithParent(testeEnv *test.TestEnv, eventStoreTestEnv *eventstore.TestEnv, mockData bool) (*TestEnv, error)

func (*TestEnv) GetApiAddr added in v0.3.6

func (env *TestEnv) GetApiAddr() string

func (*TestEnv) NewOidcClientServer added in v0.3.6

func (env *TestEnv) NewOidcClientServer(ready chan<- string) (*clientAuth.Server, error)

func (*TestEnv) Shutdown added in v0.3.6

func (env *TestEnv) Shutdown() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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