Documentation
¶
Index ¶
- Variables
- func SigningMiddleware(logger *zap.Logger, pat *PAT, forwardingDomains []string) func(http.Handler) http.Handler
- func WithUMAIdentity(req *http.Request, targetPath string, user *models.UserContext, ...) (authorization.AuthzDecision, error)
- type OauthProxy
- type OpenIDRoundTripper
- type PAT
- type RPT
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHostNotConfigured = errors.New("acme/autocert: host not configured")
ErrHostNotConfigured indicates the hostname was not configured.
Functions ¶
func SigningMiddleware ¶
func SigningMiddleware( logger *zap.Logger, pat *PAT, forwardingDomains []string, ) func(http.Handler) http.Handler
SigningMiddleware is responsible for signing outbound requests.
func WithUMAIdentity ¶
func WithUMAIdentity( req *http.Request, targetPath string, user *models.UserContext, cookieUMAName string, provider *oidc3.Provider, clientID string, skipClientIDCheck bool, skipIssuerCheck bool, getIdentity func(req *http.Request, tokenCookie string, tokenHeader string) (string, error), authzFunc func(targetPath string, userPerms models.Permissions) (authorization.AuthzDecision, error), ) (authorization.AuthzDecision, error)
Types ¶
type OauthProxy ¶
type OauthProxy struct {
Provider *oidc3.Provider
Config *config.Config
Endpoint *url.URL
IdpClient *keycloak_client.Client
Listener net.Listener
Log *zap.Logger
Router http.Handler
Server *http.Server
HTTPServer *http.Server
AdminServer *http.Server
Store storage.Storage
Upstream core.ReverseProxy
Cm *cookie.Manager
ErrGroup *errgroup.Group
// contains filtered or unexported fields
}
func NewProxy ¶
func NewProxy(config *config.Config, log *zap.Logger, upstream core.ReverseProxy) (*OauthProxy, error)
NewProxy create's a new proxy from configuration
func (*OauthProxy) CreateReverseProxy ¶
func (r *OauthProxy) CreateReverseProxy() error
CreateReverseProxy creates a reverse proxy
func (*OauthProxy) NewOpenIDProvider ¶
func (r *OauthProxy) NewOpenIDProvider() (*oidc3.Provider, *keycloak_client.Client, error)
NewOpenIDProvider initializes the openID configuration, note: the redirection url is deliberately left blank in order to retrieve it from the host header on request.
func (*OauthProxy) Run ¶
func (r *OauthProxy) Run() (context.Context, error)
Run starts the proxy service
func (*OauthProxy) Shutdown ¶
func (r *OauthProxy) Shutdown() error
Shutdown finishes the proxy service with gracefully period.
type OpenIDRoundTripper ¶
func NewOpenIDRoundTripper ¶
func NewOpenIDRoundTripper(rt http.RoundTripper) OpenIDRoundTripper
type PAT ¶
type PAT struct {
Token *models.TokenResponse
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.