package encryption

import "github.com/containerd/containerd/images/encryption"

Index

Functions

func CheckAuthorization

func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, dc *encconfig.DecryptConfig) error

CheckAuthorization checks whether a user has the right keys to be allowed to access an image (every layer) It takes decrypting of the layers only as far as decrypting the asymmetrically encrypted data The decryption is only done for the current platform

func DecryptImage

DecryptImage decrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest

func EncryptImage

EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest

func HasEncryptedLayer

func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool

HasEncryptedLayer returns true if any LayerInfo indicates that the layer is encrypted

func IsEncryptedDiff

func IsEncryptedDiff(ctx context.Context, mediaType string) bool

IsEncryptedDiff returns true if mediaType is a known encrypted media type.

Types

type LayerFilter

type LayerFilter func(desc ocispec.Descriptor) bool

LayerFilter allows to select Layers by certain criteria

Source Files

encryption.go

Version
v1.3.0-beta.0
Published
Jul 31, 2019
Platform
js/wasm
Imports
16 packages
Last checked
5 minutes ago

Tools for package owners.