security

package module
v0.0.0-...-dfd34b6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

README

caddy-security

Security App and Plugin for Caddy v2. It includes:

  • Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication
  • Authorization Plugin for HTTP request authorization based on JWT/PASETO tokens
  • Credentials Plugin for managing credentials for various integrations

Please show your appreciation for this work and ⭐ ⭐ ⭐

Please consider sponsoring this project via Github Sponsors!

Please ask questions either here or via LinkedIn. I am happy to help you! @greenpau

Documentation: authp.github.io

Docker Container: authp/authp

Configuration Examples: here

Security Policy: SECURITY.md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name   string             `json:"-"`
	Config *authcrunch.Config `json:"config,omitempty"`

	SecretsManagersRaw []json.RawMessage `json:"secrets_managers,omitempty" caddy:"namespace=security.secrets inline_key=driver"`
	// contains filtered or unexported fields
}

App implements security manager.

func (App) CaddyModule

func (App) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*App) Provision

func (app *App) Provision(ctx caddy.Context) error

Provision sets up the repo manager.

func (App) Start

func (app App) Start() error

Start starts the App.

func (App) Stop

func (app App) Stop() error

Stop stops the App.

type AuthnMiddleware

type AuthnMiddleware struct {
	RouteMatcher string `json:"route_matcher,omitempty" xml:"route_matcher,omitempty" yaml:"route_matcher,omitempty"`
	PortalName   string `json:"portal_name,omitempty" xml:"portal_name,omitempty" yaml:"portal_name,omitempty"`
	// contains filtered or unexported fields
}

AuthnMiddleware implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication.

func (AuthnMiddleware) CaddyModule

func (AuthnMiddleware) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*AuthnMiddleware) Provision

func (m *AuthnMiddleware) Provision(ctx caddy.Context) error

Provision provisions Authenticator.

func (*AuthnMiddleware) ServeHTTP

ServeHTTP serves authentication portal.

func (*AuthnMiddleware) UnmarshalCaddyfile

func (m *AuthnMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)

UnmarshalCaddyfile unmarshals a caddyfile.

func (*AuthnMiddleware) Validate

func (m *AuthnMiddleware) Validate() error

Validate implements caddy.Validator.

type AuthzMiddleware

type AuthzMiddleware struct {
	RouteMatcher   string `json:"route_matcher,omitempty" xml:"route_matcher,omitempty" yaml:"route_matcher,omitempty"`
	GatekeeperName string `json:"gatekeeper_name,omitempty" xml:"gatekeeper_name,omitempty" yaml:"gatekeeper_name,omitempty"`
	// contains filtered or unexported fields
}

AuthzMiddleware authorizes access to endpoints based on the presense and content of JWT token.

func (AuthzMiddleware) Authenticate

Authenticate authorizes access based on the presense and content of authorization token.

func (AuthzMiddleware) CaddyModule

func (AuthzMiddleware) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*AuthzMiddleware) Provision

func (m *AuthzMiddleware) Provision(ctx caddy.Context) error

Provision provisions Authorizer.

func (*AuthzMiddleware) UnmarshalCaddyfile

func (m *AuthzMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)

UnmarshalCaddyfile unmarshals caddyfile.

func (*AuthzMiddleware) Validate

func (m *AuthzMiddleware) Validate() error

Validate implements caddy.Validator.

type SecretsManager

type SecretsManager interface {
	GetSecret(context.Context) (map[string]interface{}, error)
	GetSecretByKey(context.Context, string) (interface{}, error)
}

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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