# Functions
CryptoRandIntn generates a random number between [0, n).
DefaultConfig constructs the default firewall Config struct.
IsPrivacyCaveat returns true if the given caveat string is a privacy mapper caveat.
NewInfoFromRequest parses the given RPC middleware interception request and returns a RequestInfo struct.
NewPrivacyMapper returns a new instance of PrivacyMapper.
NewRequestLogger creates a new RequestLogger.
NewRuleEnforcer constructs a new RuleEnforcer instance.
ObfuscateConfig alters the config string by replacing sensitive data with random values and returns new replacement pairs.
ParseMetaInfoCaveat tries to parse the given caveat string as a meta information struct.
ParseRuleCaveat tries to parse the given caveat string as a rule struct.
RulesToCaveat encodes a list of rules as a full custom caveat string representation in this format:
lnd-custom lit-mac-fw rules:[<array_of_JSON_encoded_rules>].
UseLogger uses a specified Logger to output package logging info.
# Constants
CondPrivacy is the name of the custom caveat that will instruct lnd to send all requests with this caveat to this interceptor.
MetaInfoValuePrefix is the static prefix a macaroon caveat value has to mark the beginning of the meta information JSON data.
MetaRulesValuePrefix is the static prefix a macaroon caveat value has to mark the beginning of the rules list JSON data.
MWRequestTypeRequest represents the type name for a request interception message.
MWRequestTypeResponse represents the type name for a response interception message.
MWRequestTypeStreamAuth represents the type name for a stream authentication interception message.
No description provided by the author
No description provided by the author
No description provided by the author
RequestLoggerName is the name of the RequestLogger interceptor.
RuleEnforcerCaveat is the name of the custom caveat that contains all the rules that need to be enforced in the firewall.
RuleEnforcerName is the name of the RuleEnforcer interceptor.
No description provided by the author
# Variables
ErrNoMetaInfoCaveat is the error that is returned if a caveat doesn't have the prefix to be recognized as a meta information caveat.
ErrNoRulesCaveat is the error that is returned if a caveat doesn't have the prefix to be recognized as a rules list caveat.
ErrNotSupportedByPrivacyMapper indicates that the invoked RPC method is not supported by the privacy mapper.
MetaInfoFullCaveatPrefix is the full prefix a caveat needs to have to be recognized as a meta information caveat.
MetaPrivacyCaveat is the caveat required to ensure that the privacy mapper is activated as an interceptor for a request.
MetaPrivacyCaveatPrefix is the caveat prefix that will be used to identify the privacy mapper caveat.
MetaRulesFullCaveatPrefix is the full prefix a caveat needs to have to be recognized as a rules list caveat.
# Structs
Config holds all config options for the firewall.
InterceptMetaInfo is the JSON serializable struct containing meta information about a request made by an automated node management software against LiT.
InterceptRules is the JSON serializable struct containing all the rules and their limits/settings that need to be enforced on a request made by an automated node management software against LiT.
PrivacyMapper is a RequestInterceptor that maps any pseudo names in certain requests to their real values and vice versa for responses.
RequestInfo stores the parsed representation of an incoming RPC middleware request.
RequestLogger is a RequestInterceptor that just logs incoming RPC requests.
RequestLoggerConfig holds all the config options for the request logger.
RuleEnforcer is a RequestInterceptor that makes sure all firewall related custom caveats in a macaroon are properly enforced.
# Type aliases
No description provided by the author