blob: ed3a4c45d8501cc544028f68c67ad443b2a25be1 [file] [log] [blame]
Ed Tanous40e9b922024-09-10 13:50:16 -07001// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright OpenBMC Authors
Ed Tanous7045c8d2017-04-03 10:04:37 -07003#pragma once
4
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08005#include "async_resp.hpp"
Ed Tanous08bbe112023-04-06 13:10:02 -07006#include "dbus_privileges.hpp"
Ed Tanous04e438c2020-10-03 08:06:26 -07007#include "http_request.hpp"
8#include "http_response.hpp"
9#include "logging.hpp"
Ed Tanous08bbe112023-04-06 13:10:02 -070010#include "routing/baserule.hpp"
11#include "routing/dynamicrule.hpp"
Ed Tanous08bbe112023-04-06 13:10:02 -070012#include "routing/taggedrule.hpp"
Ed Tanous5b607ea2025-03-26 12:13:39 -070013#include "routing/trie.hpp"
Ed Tanous2c9efc32022-07-31 22:08:26 -070014#include "verb.hpp"
Ed Tanous1abe55e2018-09-05 08:30:59 -070015
Ed Tanousd7857202025-01-28 15:32:26 -080016#include <boost/beast/http/field.hpp>
17#include <boost/beast/http/status.hpp>
Gunnar Mills1214b7e2020-06-04 10:11:30 -050018
Ed Tanousd9e89df2024-03-27 14:08:59 -070019#include <algorithm>
Ed Tanousd7857202025-01-28 15:32:26 -080020#include <array>
Ed Tanous7045c8d2017-04-03 10:04:37 -070021#include <cstdint>
Ed Tanouse0d918b2018-03-27 17:41:04 -070022#include <cstdlib>
Ed Tanousd7857202025-01-28 15:32:26 -080023#include <format>
24#include <functional>
Ed Tanous7045c8d2017-04-03 10:04:37 -070025#include <memory>
Ed Tanous2c9efc32022-07-31 22:08:26 -070026#include <optional>
Ed Tanousd7857202025-01-28 15:32:26 -080027#include <stdexcept>
28#include <string>
Ed Tanousa3b9eb92024-06-03 08:39:37 -070029#include <string_view>
Ed Tanous7045c8d2017-04-03 10:04:37 -070030#include <tuple>
Ed Tanous7045c8d2017-04-03 10:04:37 -070031#include <utility>
32#include <vector>
Ed Tanous9140a672017-04-24 17:01:32 -070033
Ed Tanous1abe55e2018-09-05 08:30:59 -070034namespace crow
35{
Tanousf00032d2018-11-05 01:18:10 -030036
Ed Tanous1abe55e2018-09-05 08:30:59 -070037class Router
38{
39 public:
Ed Tanous0c0084a2019-10-24 15:57:51 -070040 Router() = default;
Ed Tanous7045c8d2017-04-03 10:04:37 -070041
Ed Tanous1abe55e2018-09-05 08:30:59 -070042 DynamicRule& newRuleDynamic(const std::string& rule)
43 {
44 std::unique_ptr<DynamicRule> ruleObject =
45 std::make_unique<DynamicRule>(rule);
46 DynamicRule* ptr = ruleObject.get();
Tanousf00032d2018-11-05 01:18:10 -030047 allRules.emplace_back(std::move(ruleObject));
Ed Tanous7045c8d2017-04-03 10:04:37 -070048
Ed Tanous1abe55e2018-09-05 08:30:59 -070049 return *ptr;
Ed Tanous7045c8d2017-04-03 10:04:37 -070050 }
51
Ed Tanousd9e89df2024-03-27 14:08:59 -070052 template <uint64_t NumArgs>
Ed Tanouscfe3bc02023-06-26 12:47:24 -070053 auto& newRuleTagged(const std::string& rule)
Ed Tanous1abe55e2018-09-05 08:30:59 -070054 {
Ed Tanousd9e89df2024-03-27 14:08:59 -070055 if constexpr (NumArgs == 0)
Ed Tanouscfe3bc02023-06-26 12:47:24 -070056 {
57 using RuleT = TaggedRule<>;
58 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
59 RuleT* ptr = ruleObject.get();
60 allRules.emplace_back(std::move(ruleObject));
61 return *ptr;
62 }
Ed Tanousd9e89df2024-03-27 14:08:59 -070063 else if constexpr (NumArgs == 1)
Ed Tanouscfe3bc02023-06-26 12:47:24 -070064 {
65 using RuleT = TaggedRule<std::string>;
66 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
67 RuleT* ptr = ruleObject.get();
68 allRules.emplace_back(std::move(ruleObject));
69 return *ptr;
70 }
Ed Tanousd9e89df2024-03-27 14:08:59 -070071 else if constexpr (NumArgs == 2)
Ed Tanouscfe3bc02023-06-26 12:47:24 -070072 {
73 using RuleT = TaggedRule<std::string, std::string>;
74 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
75 RuleT* ptr = ruleObject.get();
76 allRules.emplace_back(std::move(ruleObject));
77 return *ptr;
78 }
Ed Tanousd9e89df2024-03-27 14:08:59 -070079 else if constexpr (NumArgs == 3)
Ed Tanouscfe3bc02023-06-26 12:47:24 -070080 {
81 using RuleT = TaggedRule<std::string, std::string, std::string>;
82 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
83 RuleT* ptr = ruleObject.get();
84 allRules.emplace_back(std::move(ruleObject));
85 return *ptr;
86 }
Ed Tanousd9e89df2024-03-27 14:08:59 -070087 else if constexpr (NumArgs == 4)
Ed Tanouscfe3bc02023-06-26 12:47:24 -070088 {
89 using RuleT =
90 TaggedRule<std::string, std::string, std::string, std::string>;
91 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
92 RuleT* ptr = ruleObject.get();
93 allRules.emplace_back(std::move(ruleObject));
94 return *ptr;
95 }
96 else
97 {
98 using RuleT = TaggedRule<std::string, std::string, std::string,
99 std::string, std::string>;
100 std::unique_ptr<RuleT> ruleObject = std::make_unique<RuleT>(rule);
101 RuleT* ptr = ruleObject.get();
102 allRules.emplace_back(std::move(ruleObject));
103 return *ptr;
104 }
Ed Tanousd9e89df2024-03-27 14:08:59 -0700105 static_assert(NumArgs <= 5, "Max number of args supported is 5");
Ed Tanous7045c8d2017-04-03 10:04:37 -0700106 }
107
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700108 struct PerMethod
109 {
110 std::vector<BaseRule*> rules;
Rohit PAI81f915b2025-04-02 12:29:29 +0530111 Trie<crow::Node> trie;
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700112 // rule index 0 has special meaning; preallocate it to avoid
113 // duplication.
114 PerMethod() : rules(1) {}
115
116 void internalAdd(std::string_view rule, BaseRule* ruleObject)
117 {
118 rules.emplace_back(ruleObject);
119 trie.add(rule, static_cast<unsigned>(rules.size() - 1U));
120 // directory case:
121 // request to `/about' url matches `/about/' rule
122 if (rule.size() > 2 && rule.back() == '/')
123 {
124 trie.add(rule.substr(0, rule.size() - 1),
125 static_cast<unsigned>(rules.size() - 1));
126 }
127 }
128 };
129
Tanousf00032d2018-11-05 01:18:10 -0300130 void internalAddRuleObject(const std::string& rule, BaseRule* ruleObject)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700131 {
Tanousf00032d2018-11-05 01:18:10 -0300132 if (ruleObject == nullptr)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700133 {
Tanousf00032d2018-11-05 01:18:10 -0300134 return;
135 }
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700136 for (size_t method = 0; method <= maxVerbIndex; method++)
Tanousf00032d2018-11-05 01:18:10 -0300137 {
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700138 size_t methodBit = 1 << method;
Ed Tanouse662eae2022-01-25 10:39:19 -0800139 if ((ruleObject->methodsBitfield & methodBit) > 0U)
Tanousf00032d2018-11-05 01:18:10 -0300140 {
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700141 perMethods[method].internalAdd(rule, ruleObject);
Tanousf00032d2018-11-05 01:18:10 -0300142 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700143 }
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700144
145 if (ruleObject->isNotFound)
146 {
147 notFoundRoutes.internalAdd(rule, ruleObject);
148 }
149
150 if (ruleObject->isMethodNotAllowed)
151 {
152 methodNotAllowedRoutes.internalAdd(rule, ruleObject);
153 }
154
155 if (ruleObject->isUpgrade)
156 {
157 upgradeRoutes.internalAdd(rule, ruleObject);
158 }
Ed Tanous7045c8d2017-04-03 10:04:37 -0700159 }
160
Ed Tanous1abe55e2018-09-05 08:30:59 -0700161 void validate()
162 {
Tanousf00032d2018-11-05 01:18:10 -0300163 for (std::unique_ptr<BaseRule>& rule : allRules)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700164 {
165 if (rule)
166 {
Tanousf00032d2018-11-05 01:18:10 -0300167 std::unique_ptr<BaseRule> upgraded = rule->upgrade();
Ed Tanous1abe55e2018-09-05 08:30:59 -0700168 if (upgraded)
Ed Tanous3174e4d2020-10-07 11:41:22 -0700169 {
Ed Tanous1abe55e2018-09-05 08:30:59 -0700170 rule = std::move(upgraded);
Ed Tanous3174e4d2020-10-07 11:41:22 -0700171 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700172 rule->validate();
Tanousf00032d2018-11-05 01:18:10 -0300173 internalAddRuleObject(rule->rule, rule.get());
Ed Tanous1abe55e2018-09-05 08:30:59 -0700174 }
175 }
Tanousf00032d2018-11-05 01:18:10 -0300176 for (PerMethod& perMethod : perMethods)
177 {
178 perMethod.trie.validate();
179 }
Ed Tanous7045c8d2017-04-03 10:04:37 -0700180 }
181
Ed Tanous44e45182022-07-26 16:47:23 -0700182 struct FindRoute
183 {
184 BaseRule* rule = nullptr;
Ed Tanous15a42df2023-02-09 18:08:23 -0800185 std::vector<std::string> params;
Ed Tanous44e45182022-07-26 16:47:23 -0700186 };
187
188 struct FindRouteResponse
189 {
190 std::string allowHeader;
191 FindRoute route;
192 };
193
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700194 static FindRoute findRouteByPerMethod(std::string_view url,
195 const PerMethod& perMethod)
Ed Tanous759cf102022-07-31 16:36:52 -0700196 {
197 FindRoute route;
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700198
Rohit PAI81f915b2025-04-02 12:29:29 +0530199 Trie<crow::Node>::FindResult found = perMethod.trie.find(url);
Ed Tanousd9e89df2024-03-27 14:08:59 -0700200 if (found.ruleIndex >= perMethod.rules.size())
Ed Tanous759cf102022-07-31 16:36:52 -0700201 {
202 throw std::runtime_error("Trie internal structure corrupted!");
203 }
204 // Found a 404 route, switch that in
Ed Tanousd9e89df2024-03-27 14:08:59 -0700205 if (found.ruleIndex != 0U)
Ed Tanous759cf102022-07-31 16:36:52 -0700206 {
Ed Tanousd9e89df2024-03-27 14:08:59 -0700207 route.rule = perMethod.rules[found.ruleIndex];
208 route.params = std::move(found.params);
Ed Tanous759cf102022-07-31 16:36:52 -0700209 }
210 return route;
211 }
212
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700213 FindRouteResponse findRoute(const Request& req) const
Ed Tanous44e45182022-07-26 16:47:23 -0700214 {
215 FindRouteResponse findRoute;
216
Ed Tanous44e45182022-07-26 16:47:23 -0700217 // Check to see if this url exists at any verb
218 for (size_t perMethodIndex = 0; perMethodIndex <= maxVerbIndex;
219 perMethodIndex++)
220 {
221 // Make sure it's safe to deference the array at that index
Patrick Williamsbd79bce2024-08-16 15:22:20 -0400222 static_assert(
223 maxVerbIndex < std::tuple_size_v<decltype(perMethods)>);
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700224 FindRoute route = findRouteByPerMethod(req.url().encoded_path(),
225 perMethods[perMethodIndex]);
Ed Tanous759cf102022-07-31 16:36:52 -0700226 if (route.rule == nullptr)
Ed Tanous44e45182022-07-26 16:47:23 -0700227 {
228 continue;
229 }
230 if (!findRoute.allowHeader.empty())
231 {
232 findRoute.allowHeader += ", ";
233 }
Ed Tanous2c9efc32022-07-31 22:08:26 -0700234 HttpVerb thisVerb = static_cast<HttpVerb>(perMethodIndex);
235 findRoute.allowHeader += httpVerbToString(thisVerb);
Ed Tanous44e45182022-07-26 16:47:23 -0700236 }
Ed Tanous50bfc912024-07-29 14:20:50 -0700237
238 std::optional<HttpVerb> verb = httpVerbFromBoost(req.method());
239 if (!verb)
240 {
241 return findRoute;
242 }
243 size_t reqMethodIndex = static_cast<size_t>(*verb);
244 if (reqMethodIndex >= perMethods.size())
245 {
246 return findRoute;
247 }
248
249 FindRoute route = findRouteByPerMethod(req.url().encoded_path(),
250 perMethods[reqMethodIndex]);
251 if (route.rule != nullptr)
252 {
253 findRoute.route = route;
254 }
255
Ed Tanous44e45182022-07-26 16:47:23 -0700256 return findRoute;
257 }
258
Ed Tanous1abe55e2018-09-05 08:30:59 -0700259 template <typename Adaptor>
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700260 void handleUpgrade(const std::shared_ptr<Request>& req,
P Dheeraj Srujan Kumara9f076e2021-10-18 22:45:37 +0530261 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
262 Adaptor&& adaptor)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700263 {
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700264 PerMethod& perMethod = upgradeRoutes;
Rohit PAI81f915b2025-04-02 12:29:29 +0530265 Trie<crow::Node>& trie = perMethod.trie;
Tanousf00032d2018-11-05 01:18:10 -0300266 std::vector<BaseRule*>& rules = perMethod.rules;
267
Rohit PAI81f915b2025-04-02 12:29:29 +0530268 Trie<crow::Node>::FindResult found =
269 trie.find(req->url().encoded_path());
Ed Tanousd9e89df2024-03-27 14:08:59 -0700270 unsigned ruleIndex = found.ruleIndex;
Ed Tanouse662eae2022-01-25 10:39:19 -0800271 if (ruleIndex == 0U)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700272 {
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700273 BMCWEB_LOG_DEBUG("Cannot match rules {}",
274 req->url().encoded_path());
P Dheeraj Srujan Kumara9f076e2021-10-18 22:45:37 +0530275 asyncResp->res.result(boost::beast::http::status::not_found);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700276 return;
277 }
278
279 if (ruleIndex >= rules.size())
Ed Tanous3174e4d2020-10-07 11:41:22 -0700280 {
Ed Tanous1abe55e2018-09-05 08:30:59 -0700281 throw std::runtime_error("Trie internal structure corrupted!");
Ed Tanous3174e4d2020-10-07 11:41:22 -0700282 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700283
P Dheeraj Srujan Kumar7e9093e2021-09-18 01:19:04 +0530284 BaseRule& rule = *rules[ruleIndex];
Ed Tanous1abe55e2018-09-05 08:30:59 -0700285
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700286 BMCWEB_LOG_DEBUG("Matched rule (upgrade) '{}'", rule.rule);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700287
P Dheeraj Srujan Kumar7e9093e2021-09-18 01:19:04 +0530288 // TODO(ed) This should be able to use std::bind_front, but it doesn't
289 // appear to work with the std::move on adaptor.
Patrick Williamsbd79bce2024-08-16 15:22:20 -0400290 validatePrivilege(
291 req, asyncResp, rule,
292 [req, &rule, asyncResp,
293 adaptor = std::forward<Adaptor>(adaptor)]() mutable {
294 rule.handleUpgrade(*req, asyncResp, std::move(adaptor));
295 });
Ed Tanous7045c8d2017-04-03 10:04:37 -0700296 }
297
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700298 void handle(const std::shared_ptr<Request>& req,
zhanghch058d1b46d2021-04-01 11:18:24 +0800299 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700300 {
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700301 FindRouteResponse foundRoute = findRoute(*req);
Ed Tanous44e45182022-07-26 16:47:23 -0700302
Ed Tanous759cf102022-07-31 16:36:52 -0700303 if (foundRoute.route.rule == nullptr)
Ed Tanous88a03c52022-03-14 10:16:07 -0700304 {
Ed Tanous759cf102022-07-31 16:36:52 -0700305 // Couldn't find a normal route with any verb, try looking for a 404
306 // route
307 if (foundRoute.allowHeader.empty())
Ed Tanous44e45182022-07-26 16:47:23 -0700308 {
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700309 foundRoute.route = findRouteByPerMethod(
310 req->url().encoded_path(), notFoundRoutes);
Ed Tanous759cf102022-07-31 16:36:52 -0700311 }
312 else
313 {
314 // See if we have a method not allowed (405) handler
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700315 foundRoute.route = findRouteByPerMethod(
316 req->url().encoded_path(), methodNotAllowedRoutes);
Ed Tanous44e45182022-07-26 16:47:23 -0700317 }
318 }
Ed Tanous759cf102022-07-31 16:36:52 -0700319
320 // Fill in the allow header if it's valid
321 if (!foundRoute.allowHeader.empty())
Ed Tanous44e45182022-07-26 16:47:23 -0700322 {
Ed Tanous88a03c52022-03-14 10:16:07 -0700323 asyncResp->res.addHeader(boost::beast::http::field::allow,
Ed Tanous44e45182022-07-26 16:47:23 -0700324 foundRoute.allowHeader);
Ed Tanous88a03c52022-03-14 10:16:07 -0700325 }
Tanousf00032d2018-11-05 01:18:10 -0300326
Ed Tanous44e45182022-07-26 16:47:23 -0700327 // If we couldn't find a real route or a 404 route, return a generic
328 // response
329 if (foundRoute.route.rule == nullptr)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700330 {
Ed Tanous44e45182022-07-26 16:47:23 -0700331 if (foundRoute.allowHeader.empty())
332 {
333 asyncResp->res.result(boost::beast::http::status::not_found);
334 }
335 else
Ed Tanous2634dcd2019-03-26 09:28:06 -0700336 {
Ed Tanous88a03c52022-03-14 10:16:07 -0700337 asyncResp->res.result(
338 boost::beast::http::status::method_not_allowed);
Ed Tanous2634dcd2019-03-26 09:28:06 -0700339 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700340 return;
341 }
342
Ed Tanous44e45182022-07-26 16:47:23 -0700343 BaseRule& rule = *foundRoute.route.rule;
Ed Tanous15a42df2023-02-09 18:08:23 -0800344 std::vector<std::string> params = std::move(foundRoute.route.params);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700345
Ed Tanous62598e32023-07-17 17:06:25 -0700346 BMCWEB_LOG_DEBUG("Matched rule '{}' {} / {}", rule.rule,
Ed Tanous50bfc912024-07-29 14:20:50 -0700347 req->methodString(), rule.getMethods());
Ed Tanous1abe55e2018-09-05 08:30:59 -0700348
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700349 if (req->session == nullptr)
James Feist7166bf02019-12-10 16:52:14 +0000350 {
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700351 rule.handle(*req, asyncResp, params);
James Feist7166bf02019-12-10 16:52:14 +0000352 return;
353 }
Jonathan Doman102a4cd2024-04-15 16:56:23 -0700354 validatePrivilege(
355 req, asyncResp, rule,
356 [req, asyncResp, &rule, params = std::move(params)]() {
Patrick Williamsbd79bce2024-08-16 15:22:20 -0400357 rule.handle(*req, asyncResp, params);
358 });
Ed Tanous7045c8d2017-04-03 10:04:37 -0700359 }
Ed Tanous7045c8d2017-04-03 10:04:37 -0700360
Ed Tanous1abe55e2018-09-05 08:30:59 -0700361 void debugPrint()
362 {
Ed Tanous271584a2019-07-09 16:24:22 -0700363 for (size_t i = 0; i < perMethods.size(); i++)
Tanousf00032d2018-11-05 01:18:10 -0300364 {
Ed Tanousd9e89df2024-03-27 14:08:59 -0700365 BMCWEB_LOG_DEBUG("{}", httpVerbToString(static_cast<HttpVerb>(i)));
Tanousf00032d2018-11-05 01:18:10 -0300366 perMethods[i].trie.debugPrint();
367 }
Ed Tanous3dac7492017-08-02 13:46:20 -0700368 }
Ed Tanousb4a7bfa2017-04-04 17:23:00 -0700369
Ed Tanous1abe55e2018-09-05 08:30:59 -0700370 std::vector<const std::string*> getRoutes(const std::string& parent)
371 {
Ed Tanous1abe55e2018-09-05 08:30:59 -0700372 std::vector<const std::string*> ret;
Tanousf00032d2018-11-05 01:18:10 -0300373
374 for (const PerMethod& pm : perMethods)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700375 {
Tanousf00032d2018-11-05 01:18:10 -0300376 std::vector<unsigned> x;
377 pm.trie.findRouteIndexes(parent, x);
378 for (unsigned index : x)
379 {
380 ret.push_back(&pm.rules[index]->rule);
381 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700382 }
383 return ret;
384 }
385
386 private:
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700387 std::array<PerMethod, static_cast<size_t>(HttpVerb::Max)> perMethods;
Ed Tanous888880a2020-08-24 13:48:50 -0700388
Ed Tanousa3b9eb92024-06-03 08:39:37 -0700389 PerMethod notFoundRoutes;
390 PerMethod upgradeRoutes;
391 PerMethod methodNotAllowedRoutes;
392
Tanousf00032d2018-11-05 01:18:10 -0300393 std::vector<std::unique_ptr<BaseRule>> allRules;
Ed Tanous7045c8d2017-04-03 10:04:37 -0700394};
Ed Tanous1abe55e2018-09-05 08:30:59 -0700395} // namespace crow