credentials-0.0.1.1: Secure Credentials Storage and Distribution

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Credentials.Types

Description

 

Synopsis

Documentation

newtype KeyId Source

The KMS master key identifier.

Constructors

KeyId Text 

Instances

Eq KeyId Source 
Ord KeyId Source 
Show KeyId Source 
ToText KeyId Source 
FromText KeyId Source 
ToLog KeyId Source 
ToByteString KeyId Source 

defaultKeyId :: KeyId Source

The default KMS master key alias.

Value: alias/credentials

newtype Name Source

A shared/readable name for a secret.

Constructors

Name Text 

Instances

newtype Revision Source

An opaque, non-monotonic revision number.

Constructors

Revision ByteString 

newtype Context Source

A KMS encryption context.

See: KMS Encryption Context documentation for more information.

Constructors

Context 

Fields

fromContext :: HashMap Text Text
 

data Encrypted Source

The encryption parameters required to perform decryption.

Constructors

Encrypted 

Fields

wrappedKey :: !ByteString

The wrapped (encrypted) data encryption key.

ciphertext :: !ByteString

The encrypted ciphertext.

digest :: !(HMAC SHA256)

HMAC SHA256 digest of the ciphertext.

Instances

data Setup Source

Denotes idempotency of an action. That is, whether an action resulted in any setup being performed.

Constructors

Created 
Exists 

Instances

data CredentialError Source

Constructors

MasterKeyMissing KeyId (Maybe Text)

The specified master key id doesn't exist.

IntegrityFailure Name ByteString ByteString

The computed HMAC doesn't matched the stored HMAC.

EncryptFailure Context Name Text

Failure occured during local encryption.

DecryptFailure Context Name Text

Failure occured during local decryption.

StorageMissing Text

Storage doesn't exist, or has gone on holiday.

StorageFailure Text

Some storage pre-condition wasn't met. For example: DynamoDB column size exceeded.

FieldMissing Text [Text]

Missing field from the storage engine.

FieldInvalid Text String

Unable to parse field from the storage engine.

SecretMissing Name (Maybe Revision) Text

Secret with the specified name cannot found.

OptimisticLockFailure Name Revision Text

Attempting to insert a revision that already exists.

class AsCredentialError a where Source

Minimal complete definition

Nothing

Methods

_CredentialError :: Prism' a CredentialError Source

_MasterKeyMissing :: Prism' a (KeyId, Maybe Text) Source

_IntegrityFailure :: Prism' a (Name, ByteString, ByteString) Source

_EncryptFailure :: Prism' a (Context, Name, Text) Source

_DecryptFailure :: Prism' a (Context, Name, Text) Source

_StorageMissing :: Prism' a Text Source

_StorageFailure :: Prism' a Text Source

_FieldMissing :: Prism' a (Text, [Text]) Source

_FieldInvalid :: Prism' a (Text, String) Source

_SecretMissing :: Prism' a (Name, Maybe Revision, Text) Source

_OptimisticLockFailure :: Prism' a (Name, Revision, Text) Source