Safe Haskell | None |
---|---|
Language | Haskell2010 |
Unless otherwise specified, all IO functions in this module may
potentially throw HttpException
or VaultException
- newtype VaultAddress = VaultAddress {}
- newtype VaultUnsealKey = VaultUnsealKey {}
- newtype VaultAuthToken = VaultAuthToken {}
- data VaultException
- data VaultHealth = VaultHealth {}
- vaultHealth :: VaultAddress -> IO VaultHealth
- data VaultConnection
- connectToVault :: VaultAddress -> VaultAuthToken -> IO VaultConnection
- vaultInit :: VaultAddress -> Int -> Int -> IO ([VaultUnsealKey], VaultAuthToken)
- data VaultSealStatus = VaultSealStatus {}
- vaultSealStatus :: VaultAddress -> IO VaultSealStatus
- vaultSeal :: VaultConnection -> IO ()
- data VaultUnseal
- vaultUnseal :: VaultAddress -> VaultUnseal -> IO VaultSealStatus
- data VaultMount a b = VaultMount {}
- type VaultMountRead = VaultMount Text VaultMountConfigRead
- type VaultMountWrite = VaultMount (Maybe Text) (Maybe VaultMountConfigWrite)
- data VaultMountConfig a = VaultMountConfig {}
- type VaultMountConfigRead = VaultMountConfig Int
- type VaultMountConfigWrite = VaultMountConfig (Maybe Int)
- vaultMounts :: VaultConnection -> IO [(Text, VaultMountRead)]
- vaultMountTune :: VaultConnection -> Text -> IO VaultMountConfigRead
- vaultMountSetTune :: VaultConnection -> Text -> VaultMountConfigWrite -> IO ()
- vaultNewMount :: VaultConnection -> Text -> VaultMountWrite -> IO ()
- vaultUnmount :: VaultConnection -> Text -> IO ()
- newtype VaultSecretPath = VaultSecretPath {}
- data VaultSecretMetadata = VaultSecretMetadata {}
- vaultWrite :: ToJSON a => VaultConnection -> VaultSecretPath -> a -> IO ()
- vaultRead :: FromJSON a => VaultConnection -> VaultSecretPath -> IO (VaultSecretMetadata, Either (Value, String) a)
- vaultDelete :: VaultConnection -> VaultSecretPath -> IO ()
- vaultList :: VaultConnection -> VaultSecretPath -> IO [VaultSecretPath]
- isFolder :: VaultSecretPath -> Bool
- vaultListRecursive :: VaultConnection -> VaultSecretPath -> IO [VaultSecretPath]
Documentation
newtype VaultAddress Source #
newtype VaultUnsealKey Source #
newtype VaultAuthToken Source #
data VaultException Source #
vaultHealth :: VaultAddress -> IO VaultHealth Source #
data VaultConnection Source #
connectToVault :: VaultAddress -> VaultAuthToken -> IO VaultConnection Source #
Just initializes the VaultConnection
objects, does not actually make any
contact with the vault server. (That is also the explanation why there is no
function to disconnect)
:: VaultAddress | |
-> Int |
|
-> Int |
|
-> IO ([VaultUnsealKey], VaultAuthToken) | master keys and initial root token |
data VaultSealStatus Source #
VaultSealStatus | |
|
vaultSeal :: VaultConnection -> IO () Source #
data VaultUnseal Source #
vaultUnseal :: VaultAddress -> VaultUnseal -> IO VaultSealStatus Source #
data VaultMount a b Source #
type VaultMountWrite = VaultMount (Maybe Text) (Maybe VaultMountConfigWrite) Source #
data VaultMountConfig a Source #
FromJSON VaultMountConfigRead Source # | |
FromJSON VaultMountRead Source # | |
ToJSON VaultMountConfigWrite Source # | |
ToJSON VaultMountWrite Source # | |
Eq a => Eq (VaultMountConfig a) Source # | |
Ord a => Ord (VaultMountConfig a) Source # | |
Show a => Show (VaultMountConfig a) Source # | |
type VaultMountConfigWrite = VaultMountConfig (Maybe Int) Source #
vaultMounts :: VaultConnection -> IO [(Text, VaultMountRead)] Source #
https://www.vaultproject.io/docs/http/sys-mounts.html
For your convenience, the results are returned sorted (by the mount point)
vaultMountSetTune :: VaultConnection -> Text -> VaultMountConfigWrite -> IO () Source #
vaultNewMount :: VaultConnection -> Text -> VaultMountWrite -> IO () Source #
vaultUnmount :: VaultConnection -> Text -> IO () Source #
newtype VaultSecretPath Source #
vaultWrite :: ToJSON a => VaultConnection -> VaultSecretPath -> a -> IO () Source #
https://www.vaultproject.io/docs/secrets/generic/index.html
The value that you give must encode as a JSON object
:: FromJSON a | |
=> VaultConnection | |
-> VaultSecretPath | |
-> IO (VaultSecretMetadata, Either (Value, String) a) | A You will get the
"data" as a raw
|
vaultDelete :: VaultConnection -> VaultSecretPath -> IO () Source #
vaultList :: VaultConnection -> VaultSecretPath -> IO [VaultSecretPath] Source #
https://www.vaultproject.io/docs/secrets/generic/index.html
This will normalise the results to be full secret paths.
Will return only secrets that in the are located in the folder hierarchy directly below the given folder.
Use isFolder
to check if whether each result is a secret or a subfolder.
The order of the results is unspecified.
To recursively retrieve all of the secrets use vaultListRecursive
isFolder :: VaultSecretPath -> Bool Source #
vaultListRecursive :: VaultConnection -> VaultSecretPath -> IO [VaultSecretPath] Source #
Recursively calls vaultList
to retrieve all of the secrets in a folder
(including all subfolders and sub-subfolders, etc...)
There will be no folders in the result.
The order of the results is unspecified.