Safe Haskell | Safe-Infered |
---|
Implementation of the Ganeti confd utilities.
This holds a few utility functions that could be useful in both clients and servers.
- maxClockSkew :: Integer
- getClusterHmac :: IO HashKey
- parseSignedMessage :: JSON a => HashKey -> String -> Result (String, String, a)
- parseRequest :: HashKey -> String -> Integer -> Result (String, ConfdRequest)
- parseReply :: HashKey -> String -> String -> Result (String, ConfdReply)
- signMessage :: HashKey -> String -> String -> SignedMessage
Documentation
maxClockSkew :: IntegerSource
getClusterHmac :: IO HashKeySource
Returns the HMAC key.
parseSignedMessage :: JSON a => HashKey -> String -> Result (String, String, a)Source
Parses a signed message.
parseRequest :: HashKey -> String -> Integer -> Result (String, ConfdRequest)Source
Message parsing. This can either result in a good, valid request message, or fail in the Result monad.
parseReply :: HashKey -> String -> String -> Result (String, ConfdReply)Source
Message parsing. This can either result in a good, valid reply message, or fail in the Result monad. It also checks that the salt in the message corresponds to the one that is expected
signMessage :: HashKey -> String -> String -> SignedMessageSource
Signs a message with a given key and salt.