Documentation ¶
Index ¶
- func BindTokenToCertThumbprint(token jwt.Token, certThumbprint string) (jwt.Token, error)
- func CalculateCertThumbprint(cert *x509.Certificate) string
- func CreateJwks(publicOnly bool, keys ...jwk.Key) (jwk.Set, error)
- func LoadJwksFromFile(path string) (jwk.Set, error)
- func ParseKeyFromPemBytes(pemBytes []byte) (jwk.Key, error)
- func ParseURLEncodedPEM(urlEncodedPEM string) (*x509.Certificate, error)
- func VerifyTokenBindingX5T(token jwt.Token, cert *x509.Certificate) error
- type Config
- type CredentialsConfig
- type DeviceTokenVerifier
- type EmbeddedOpaConfig
- type OPAInstance
- type PEPServer
- type PepResultError
- type ProfileConfig
- type RemoteOpaConfig
- type SessionConfig
- type SessionTokenManager
- type TokenBindingMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateCertThumbprint ¶
func CalculateCertThumbprint(cert *x509.Certificate) string
func ParseURLEncodedPEM ¶
func ParseURLEncodedPEM(urlEncodedPEM string) (*x509.Certificate, error)
Takes the URL-encoded PEM string and returns the parsed certificate
func VerifyTokenBindingX5T ¶
func VerifyTokenBindingX5T(token jwt.Token, cert *x509.Certificate) error
Types ¶
type Config ¶
type Config struct { Address string `mapstructure:"address" validate:"required"` DeviceVerifyJwksPath string `mapstructure:"device_verify_jwks_path" validate:"required"` EmbeddedOpa *EmbeddedOpaConfig `mapstructure:"embedded_opa"` Session *SessionConfig `mapstructure:"session"` Profiles []*ProfileConfig `mapstructure:"profiles" validate:"required,dive"` }
func ReadConfig ¶
type CredentialsConfig ¶
type CredentialsConfig struct { }
type DeviceTokenVerifier ¶
type DeviceTokenVerifier struct {
// contains filtered or unexported fields
}
func NewDeviceTokenVerifier ¶
func NewDeviceTokenVerifier( verifyJwks jwk.Set, bindingMethod TokenBindingMethod, ) (*DeviceTokenVerifier, error)
type EmbeddedOpaConfig ¶
type OPAInstance ¶
type OPAInstance interface { Decision(request sdk.DecisionOptions) (*sdk.DecisionResult, error) Stop() }
func NewEmbeddedOPA ¶
func NewEmbeddedOPA(id string, configPath string) (OPAInstance, error)
type PEPServer ¶
type PEPServer struct { SessionTokenManager SessionTokenManager // contains filtered or unexported fields }
type PepResultError ¶
type ProfileConfig ¶
type ProfileConfig struct { Name string `mapstructure:"name" validate:"required"` DeviceTokenBindingMethod TokenBindingMethod `mapstructure:"device_token_binding_method" validate:"required"` RequireDeviceToken bool `mapstructure:"require_device_token"` SessionTokenBindingMethod TokenBindingMethod `mapstructure:"session_token_binding_method" validate:"required"` }
type RemoteOpaConfig ¶
type RemoteOpaConfig struct { Url string `mapstructure:"url" validate:"required"` Credentials *CredentialsConfig `mapstructure:"credentials"` }
type SessionConfig ¶
type SessionTokenManager ¶
type SessionTokenManager struct { Issuer string Audience []string // contains filtered or unexported fields }
func NewSessionTokenManager ¶
type TokenBindingMethod ¶
type TokenBindingMethod string
const ( // is the x5t token binding method, RFC8705 TokenBindingX5T TokenBindingMethod = "x5t" // JKT is the jkt token binding method, RFC9449 TokenBindingJKT TokenBindingMethod = "jkt" // NONE is the none token binding method TokenBindingNONE TokenBindingMethod = "none" )
Click to show internal directories.
Click to hide internal directories.