Documentation
¶
Index ¶
- func LegacyHashedPathDebugValue(rawSign, path string) (string, bool)
- func ParseRSAPrivateKeyPEM(data []byte) (*rsa.PrivateKey, error)
- func ParseRSAPublicKeyPEM(data []byte) (*rsa.PublicKey, error)
- type Capabilities
- type ChefVerifier
- type Error
- type ErrorKind
- type Key
- type KeyStore
- type MemoryKeyStore
- func (s *MemoryKeyStore) Delete(principal Principal, keyID string) error
- func (s *MemoryKeyStore) Lookup(_ context.Context, userID, organization string) ([]Key, error)
- func (s *MemoryKeyStore) Name() string
- func (s *MemoryKeyStore) Put(key Key) error
- func (s *MemoryKeyStore) Replace(keys []Key) error
- type Options
- type Principal
- type RequestContext
- type VerificationResult
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LegacyHashedPathDebugValue ¶
LegacyHashedPathDebugValue returns the server-side hashed path used by legacy Chef signing versions for safe authn failure diagnostics.
func ParseRSAPrivateKeyPEM ¶
func ParseRSAPrivateKeyPEM(data []byte) (*rsa.PrivateKey, error)
Types ¶
type Capabilities ¶
type ChefVerifier ¶
type ChefVerifier struct {
// contains filtered or unexported fields
}
func NewChefVerifier ¶
func NewChefVerifier(store KeyStore, opts Options) *ChefVerifier
func (*ChefVerifier) Capabilities ¶
func (v *ChefVerifier) Capabilities() Capabilities
func (*ChefVerifier) Name ¶
func (v *ChefVerifier) Name() string
func (*ChefVerifier) Verify ¶
func (v *ChefVerifier) Verify(ctx context.Context, req RequestContext) (VerificationResult, error)
type Error ¶
func (*Error) HTTPStatus ¶
type ErrorKind ¶
type ErrorKind string
const ( ErrorKindMissingHeaders ErrorKind = "missing_headers" ErrorKindUnsupportedSign ErrorKind = "unsupported_sign_description" ErrorKindBadHeaders ErrorKind = "bad_headers" ErrorKindBadClock ErrorKind = "bad_clock" ErrorKindRequestorNotFound ErrorKind = "requestor_not_found" ErrorKindBadSignature ErrorKind = "bad_signature" ErrorKindKeyStoreFailure ErrorKind = "key_store_failure" )
type MemoryKeyStore ¶
type MemoryKeyStore struct {
// contains filtered or unexported fields
}
func NewMemoryKeyStore ¶
func NewMemoryKeyStore() *MemoryKeyStore
func (*MemoryKeyStore) Delete ¶
func (s *MemoryKeyStore) Delete(principal Principal, keyID string) error
func (*MemoryKeyStore) Name ¶
func (s *MemoryKeyStore) Name() string
func (*MemoryKeyStore) Put ¶
func (s *MemoryKeyStore) Put(key Key) error
func (*MemoryKeyStore) Replace ¶
func (s *MemoryKeyStore) Replace(keys []Key) error
type RequestContext ¶
type VerificationResult ¶
type Verifier ¶
type Verifier interface {
Name() string
Capabilities() Capabilities
Verify(context.Context, RequestContext) (VerificationResult, error)
}
Click to show internal directories.
Click to hide internal directories.