Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Credentials.Types
Description
- newtype KeyId = KeyId Text
- defaultKeyId :: KeyId
- newtype Name = Name Text
- newtype Revision = Revision ByteString
- newtype Context = Context {
- fromContext :: HashMap Text Text
- data Encrypted = Encrypted {
- wrappedKey :: !ByteString
- ciphertext :: !ByteString
- digest :: !(HMAC SHA256)
- data Setup
- data CredentialError
- = MasterKeyMissing KeyId (Maybe Text)
- | IntegrityFailure Name ByteString ByteString
- | EncryptFailure Context Name Text
- | DecryptFailure Context Name Text
- | StorageMissing Text
- | StorageFailure Text
- | FieldMissing Text [Text]
- | FieldInvalid Text String
- | SecretMissing Name (Maybe Revision) Text
- | OptimisticLockFailure Name Revision Text
- class AsCredentialError a where
- _CredentialError :: Prism' a CredentialError
- _MasterKeyMissing :: Prism' a (KeyId, Maybe Text)
- _IntegrityFailure :: Prism' a (Name, ByteString, ByteString)
- _EncryptFailure :: Prism' a (Context, Name, Text)
- _DecryptFailure :: Prism' a (Context, Name, Text)
- _StorageMissing :: Prism' a Text
- _StorageFailure :: Prism' a Text
- _FieldMissing :: Prism' a (Text, [Text])
- _FieldInvalid :: Prism' a (Text, String)
- _SecretMissing :: Prism' a (Name, Maybe Revision, Text)
- _OptimisticLockFailure :: Prism' a (Name, Revision, Text)
Documentation
The KMS master key identifier.
Constructors
KeyId Text |
The default KMS master key alias.
Value: alias/credentials
A shared/readable name for a secret.
Constructors
Name Text |
An opaque, non-monotonic revision number.
Constructors
Revision ByteString |
A KMS encryption context.
See: KMS Encryption Context documentation for more information.
Constructors
Context | |
Fields
|
The encryption parameters required to perform decryption.
Constructors
Encrypted | |
Fields
|
Denotes idempotency of an action. That is, whether an action resulted in any setup being performed.
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