Add the chain: Option<u16> field to the firewall-common::Rule struct. This would enable users to create AND chains between multiple rules. The OR logic can be achieved by creating alternative rules to the chain.
Requirements
[ ] controller: New /firewall/rules/:idx/chain-id to get the number of the chain the rule belongs to.
[ ] controller: New /firewall/rules/:idx/chain to get the rules of the chain the rule belongs to.
[ ] controller: New /firewall/chains/ methods to get unique chains, rules inside each chain
[ ] frontend: /firewall/chains to query available chains and single rules (optional)
[ ] frontend: Maybe deprecate /firewall/rules
[ ] Tagged serialized binary or default value stored in the sqlite db
Blockers
[ ] #30 is very desirable, to be able to change the chain a rule belongs to
[ ] The final strategy for #35 may block this implementation
Notes
Maybe a different structure for organizing rules is possible. ie Map<ID, Vec<Rule>>
Add the
chain: Option<u16>
field to thefirewall-common::Rule
struct. This would enable users to createAND
chains between multiple rules. TheOR
logic can be achieved by creating alternative rules to the chain.Requirements
/firewall/rules/:idx/chain-id
to get the number of the chain the rule belongs to./firewall/rules/:idx/chain
to get the rules of the chain the rule belongs to./firewall/chains/
methods to get unique chains, rules inside each chain/firewall/chains
to query available chains and single rules (optional)/firewall/rules
Blockers
Notes
Map<ID, Vec<Rule>>