key

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListLatestActiveKeysByPolicyInternal

func ListLatestActiveKeysByPolicyInternal(c ctx.RequestContext, namespaceProvider models.NamespaceProvider, namespaceId string, policyIdentifier resdoc.DocIdentifier) ([]string, error)

func ReadOneTimeKey

func ReadOneTimeKey(c ctx.RequestContext, namespaceProvider models.NamespaceProvider, namespaceId string, keyID string) (*cloudkey.JsonWebKey, error)

Types

type JsonWebKeyOperation

type JsonWebKeyOperation = cloudkey.JsonWebKeyOperation

type KeyAdminServer

type KeyAdminServer struct {
	api.APIServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(apiServer api.APIServer) (*KeyAdminServer, error)

func (*KeyAdminServer) CreateOneTimeKey

func (s *KeyAdminServer) CreateOneTimeKey(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string) error

CreateOneTimeKey implements admin.ServerInterface.

func (*KeyAdminServer) GenerateKey

func (*KeyAdminServer) GenerateKey(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string, id string) error

GenerateKey implements admin.ServerInterface.

func (*KeyAdminServer) GetKey

func (*KeyAdminServer) GetKey(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string, id string, params admin.GetKeyParams) error

GetKey implements admin.ServerInterface.

func (*KeyAdminServer) GetKeyPolicy

func (*KeyAdminServer) GetKeyPolicy(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string, id string) error

GetKeyPolicy implements ServerInterface.

func (*KeyAdminServer) ListKeyPolicies

func (*KeyAdminServer) ListKeyPolicies(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string) error

ListKeyPolicies implements ServerInterface.

func (*KeyAdminServer) ListKeys

func (*KeyAdminServer) ListKeys(ec echo.Context, namespaceProvider models.NamespaceProvider, namespaceId string, params admin.ListKeysParams) error

ListKeys implements admin.ServerInterface.

func (*KeyAdminServer) PutKeyPolicy

func (*KeyAdminServer) PutKeyPolicy(ec echo.Context, nsProvider models.NamespaceProvider, nsID string, ID string) error

type KeyDoc

type KeyDoc struct {
	resdoc.ResourceDoc
	cloudkey.JsonWebKey
	Status        keymodels.KeyStatus  `json:"status"`
	Created       models.NumericDate   `json:"iat"`
	NotBefore     *models.NumericDate  `json:"nbf,omitempty"`
	NotAfter      *models.NumericDate  `json:"exp,omitempty"`
	Policy        resdoc.DocIdentifier `json:"policy"`
	PolicyVersion []byte               `json:"policyVersion"`
	Checksum      []byte               `json:"checksum"`
}

func GetKeyInternal

func GetKeyInternal(c context.Context, namespaceProvider models.NamespaceProvider, namespaceId string, id string) (*KeyDoc, error)

func (*KeyDoc) ToKeyRef

func (d *KeyDoc) ToKeyRef() (m keymodels.KeyRef)

func (*KeyDoc) ToModel

func (d *KeyDoc) ToModel(includeJwk bool) (m keymodels.Key)

type KeyPolicyDoc

type KeyPolicyDoc struct {
	resdoc.ResourceDoc
	DisplayName string `json:"displayName"`

	KeySpec    keymodels.JsonWebKeySpec `json:"keySpec"`
	ExpiryTime *caldur.CalendarDuration `json:"expiryTime,omitempty"`

	Version []byte `json:"version"`
}

func GetKeyPolicyInternal

func GetKeyPolicyInternal(c ctx.RequestContext, nsProvider models.NamespaceProvider, nsID string, policyID string) (*KeyPolicyDoc, error)

func (*KeyPolicyDoc) ToModel

func (doc *KeyPolicyDoc) ToModel() (m keymodels.KeyPolicy)

func (*KeyPolicyDoc) ToRef

func (doc *KeyPolicyDoc) ToRef() (m models.Ref)

type OneTimeKeyDoc

type OneTimeKeyDoc struct {
	resdoc.ResourceDoc
	JWK      cloudkey.JsonWebKey `json:"jwk"`
	NotAfter resdoc.NumericDate  `json:"exp"`
	Created  resdoc.NumericDate  `json:"iat"`
}

func (*OneTimeKeyDoc) ToModel

func (doc *OneTimeKeyDoc) ToModel() *keymodels.OneTimeKey

Jump to

Keyboard shortcuts

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