models

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SCEP

type SCEP struct {
	ID                            string               `json:"-"`
	Type                          string               `json:"type"`
	Name                          string               `json:"name"`
	ForceCN                       bool                 `json:"forceCN"`
	ChallengePassword             string               `json:"challenge"`
	Capabilities                  []string             `json:"capabilities,omitempty"`
	IncludeRoot                   bool                 `json:"includeRoot"`
	ExcludeIntermediate           bool                 `json:"excludeIntermediate"`
	MinimumPublicKeyLength        int                  `json:"minimumPublicKeyLength"`
	DecrypterCertificate          []byte               `json:"decrypterCertificate"`
	DecrypterKeyPEM               []byte               `json:"decrypterKeyPEM"`
	DecrypterKeyURI               string               `json:"decrypterKey"`
	DecrypterKeyPassword          string               `json:"decrypterKeyPassword"`
	EncryptionAlgorithmIdentifier int                  `json:"encryptionAlgorithmIdentifier"`
	Options                       *provisioner.Options `json:"options,omitempty"`
	Claims                        *provisioner.Claims  `json:"claims,omitempty"`
}

SCEP is the SCEP provisioner model used solely in CA API responses. All methods for the provisioner.Interface interface are implemented, but return a dummy error. TODO(hs): remove reliance on the interface for the API responses

func (*SCEP) AuthorizeRenew

func (s *SCEP) AuthorizeRenew(context.Context, *x509.Certificate) error

AuthorizeRenew returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for renewing x509 Certificates.

func (*SCEP) AuthorizeRevoke

func (s *SCEP) AuthorizeRevoke(context.Context, string) error

AuthorizeRevoke returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for revoking x509 Certificates.

func (*SCEP) AuthorizeSSHRekey

func (s *SCEP) AuthorizeSSHRekey(context.Context, string) (*ssh.Certificate, []provisioner.SignOption, error)

AuthorizeSSHRekey returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for rekeying SSH Certificates.

func (*SCEP) AuthorizeSSHRenew

func (s *SCEP) AuthorizeSSHRenew(context.Context, string) (*ssh.Certificate, error)

AuthorizeSSHRenew returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for renewing SSH Certificates.

func (*SCEP) AuthorizeSSHRevoke

func (s *SCEP) AuthorizeSSHRevoke(context.Context, string) error

AuthorizeSSHRevoke returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for revoking SSH Certificates.

func (*SCEP) AuthorizeSSHSign

func (s *SCEP) AuthorizeSSHSign(context.Context, string) ([]provisioner.SignOption, error)

AuthorizeSSHSign returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for signing SSH Certificates.

func (*SCEP) AuthorizeSign

func (s *SCEP) AuthorizeSign(context.Context, string) ([]provisioner.SignOption, error)

AuthorizeSign returns an unimplemented error. Provisioners should overwrite this method if they will support authorizing tokens for signing x509 Certificates.

func (*SCEP) GetEncryptedKey

func (s *SCEP) GetEncryptedKey() (string, string, bool)

GetEncryptedKey returns the base provisioner encrypted key if it's defined.

func (*SCEP) GetID

func (s *SCEP) GetID() string

GetID returns the provisioner unique identifier.

func (*SCEP) GetIDForToken

func (s *SCEP) GetIDForToken() string

GetIDForToken returns an identifier that will be used to load the provisioner from a token.

func (*SCEP) GetName

func (s *SCEP) GetName() string

GetName returns the name of the provisioner.

func (*SCEP) GetTokenID

func (s *SCEP) GetTokenID(string) (string, error)

GetTokenID returns the identifier of the token.

func (*SCEP) GetType

func (s *SCEP) GetType() provisioner.Type

GetType returns the type of provisioner.

func (*SCEP) Init

func (s *SCEP) Init(_ provisioner.Config) (err error)

Init initializes and validates the fields of a SCEP type.

Jump to

Keyboard shortcuts

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