proxy

package
v1.2.45 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(sso *apiv1.SSO, serviceName string, serviceAccount string) error

Cleanup executes the exposecontroller as a job to cleanup the ingress resources

func ConvertHostsToRedirectURLs

func ConvertHostsToRedirectURLs(hosts []string, sso *apiv1.SSO) []string

ConvertHostsToRedirectURLs converts a list of host to proxy redirect URLs

func Expose

func Expose(sso *apiv1.SSO, serviceName string, serviceAccount string) error

Expose executes the exposecontroller as a Job in order publicly expose the SSO service

func FakeRedirectURL

func FakeRedirectURL() string

FakeRedirectURL builds a fake redirect URL for oauth2 proxy

func GenerateCookieKey added in v1.0.13

func GenerateCookieKey() (string, error)

GenerateCookieKey generates a random key which used to sign the SSO cookie

func RedirectURL

func RedirectURL(URL string) string

RedirectURL build the redirect URL for oauth2 proxy

func Update

func Update(proxy *Proxy, sso *apiv1.SSO, client *api.Client, cookieSecret string) error

Update updates the oauth2_proxy secret and deployment

Types

type Config

type Config struct {
	Port int32

	ClientID     string
	ClientSecret string

	OIDCIssuerURL string
	RedirectURL   string
	LoginURL      string
	RedeemURL     string

	Upstream     string
	ForwardToken bool

	Cookie Cookie
}

Config holds the configuration for oauth2_proxy

type Cookie struct {
	Name     string
	Secret   string
	Domain   string
	Expire   string
	Refresh  string
	Secure   bool
	HTTPOnly bool
}

Cookie holds the configuration for oauth2_proxy cookie

type ExposeConfig

type ExposeConfig struct {
	Domain      string   `yaml:"domain,omitempty" json:"domain"`
	Exposer     string   `yaml:"exposer" json:"exposer"`
	PathMode    string   `yaml:"path-mode" json:"path_mode"`
	HTTP        bool     `yaml:"http" json:"http"`
	TLSAcme     bool     `yaml:"tls-acme" json:"tls_acme"`
	Services    []string `yaml:"services,omitempty" json:"services"`
	URLTemplate string   `yaml:"urltemplate,omitempty" json:"urltemplate"`
}

ExposeConfig holds the configuration for exposecontroller

type Proxy

type Proxy struct {
	AppName    string
	Secret     *v1.Secret
	Deployment *appsv1.Deployment
	Service    *v1.Service
}

Proxy keeps the k8s resources created for a proxy

func Deploy

func Deploy(sso *apiv1.SSO, oidcClient *api.Client, cookieSecret string) (*Proxy, error)

Deploy deploys the oauth2 proxy

Jump to

Keyboard shortcuts

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