Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 3 | #include <pam_authenticate.hpp> |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 4 | #include <persistent_data_middleware.hpp> |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 5 | #include <webassets.hpp> |
| 6 | #include <random> |
| 7 | #include <crow/app.h> |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 8 | #include <crow/http_codes.h> |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 9 | #include <crow/http_request.h> |
| 10 | #include <crow/http_response.h> |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 11 | #include <boost/bimap.hpp> |
Ed Tanous | 4758d5b | 2017-06-06 15:28:13 -0700 | [diff] [blame] | 12 | #include <boost/container/flat_set.hpp> |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 13 | |
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 14 | namespace crow { |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 15 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 16 | namespace TokenAuthorization { |
Ed Tanous | b4d29f4 | 2017-03-24 16:39:25 -0700 | [diff] [blame] | 17 | |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 18 | class Middleware { |
Ed Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 19 | public: |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 20 | struct context { |
| 21 | const crow::PersistentData::UserSession* session; |
| 22 | }; |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 23 | |
| 24 | void before_handle(crow::request& req, response& res, context& ctx) { |
Ed Tanous | bae064e | 2018-03-22 15:44:39 -0700 | [diff] [blame] | 25 | if (is_on_whitelist(req)) { |
| 26 | return; |
| 27 | } |
| 28 | |
Ed Tanous | 1ea9f06 | 2018-03-27 17:45:20 -0700 | [diff] [blame] | 29 | ctx.session = perform_xtoken_auth(req); |
| 30 | |
| 31 | if (ctx.session == nullptr) { |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 32 | ctx.session = perform_cookie_auth(req); |
Ed Tanous | 1ea9f06 | 2018-03-27 17:45:20 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | const std::string& auth_header = req.get_header_value("Authorization"); |
| 36 | // Reject any kind of auth other than basic or token |
| 37 | if (ctx.session == nullptr && boost::starts_with(auth_header, "Token ")) { |
| 38 | ctx.session = perform_token_auth(auth_header); |
| 39 | } |
| 40 | |
| 41 | if (ctx.session == nullptr && boost::starts_with(auth_header, "Basic ")) { |
| 42 | ctx.session = perform_basic_auth(auth_header); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 43 | } |
| 44 | |
Ed Tanous | bae064e | 2018-03-22 15:44:39 -0700 | [diff] [blame] | 45 | if (ctx.session == nullptr) { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 46 | CROW_LOG_WARNING << "[AuthMiddleware] authorization failed"; |
| 47 | res.code = static_cast<int>(HttpRespCode::UNAUTHORIZED); |
| 48 | res.add_header("WWW-Authenticate", "Basic"); |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 49 | res.end(); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 50 | return; |
| 51 | } |
Ed Tanous | f927347 | 2017-02-28 16:05:13 -0800 | [diff] [blame] | 52 | |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 53 | // TODO get user privileges here and propagate it via MW context |
| 54 | // else let the request continue unharmed |
| 55 | } |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 56 | |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 57 | template <typename AllContext> |
| 58 | void after_handle(request& req, response& res, context& ctx, |
| 59 | AllContext& allctx) { |
| 60 | // TODO(ed) THis should really be handled by the persistent data middleware, |
| 61 | // but because it is upstream, it doesn't have access to the session |
| 62 | // information. Should the data middleware persist the current user |
| 63 | // session? |
| 64 | if (ctx.session != nullptr && |
| 65 | ctx.session->persistence == |
| 66 | crow::PersistentData::PersistenceType::SINGLE_REQUEST) { |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 67 | PersistentData::session_store->remove_session(ctx.session); |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 71 | private: |
| 72 | const crow::PersistentData::UserSession* perform_basic_auth( |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 73 | const std::string& auth_header) const { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 74 | CROW_LOG_DEBUG << "[AuthMiddleware] Basic authentication"; |
| 75 | |
| 76 | std::string auth_data; |
| 77 | std::string param = auth_header.substr(strlen("Basic ")); |
| 78 | if (!crow::utility::base64_decode(param, auth_data)) { |
| 79 | return nullptr; |
| 80 | } |
| 81 | std::size_t separator = auth_data.find(':'); |
| 82 | if (separator == std::string::npos) { |
| 83 | return nullptr; |
| 84 | } |
| 85 | |
| 86 | std::string user = auth_data.substr(0, separator); |
| 87 | separator += 1; |
| 88 | if (separator > auth_data.size()) { |
| 89 | return nullptr; |
| 90 | } |
| 91 | std::string pass = auth_data.substr(separator); |
| 92 | |
| 93 | CROW_LOG_DEBUG << "[AuthMiddleware] Authenticating user: " << user; |
| 94 | |
| 95 | if (!pam_authenticate_user(user, pass)) { |
| 96 | return nullptr; |
| 97 | } |
| 98 | |
| 99 | // TODO(ed) generate_user_session is a little expensive for basic |
| 100 | // auth, as it generates some random identifiers that will never be |
| 101 | // used. This should have a "fast" path for when user tokens aren't |
| 102 | // needed. |
| 103 | // This whole flow needs to be revisited anyway, as we can't be |
| 104 | // calling directly into pam for every request |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 105 | return &(PersistentData::session_store->generate_user_session( |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 106 | user, crow::PersistentData::PersistenceType::SINGLE_REQUEST)); |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 107 | } |
Ed Tanous | 8041f31 | 2017-04-03 09:47:01 -0700 | [diff] [blame] | 108 | |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 109 | const crow::PersistentData::UserSession* perform_token_auth( |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 110 | const std::string& auth_header) const { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 111 | CROW_LOG_DEBUG << "[AuthMiddleware] Token authentication"; |
| 112 | |
| 113 | std::string token = auth_header.substr(strlen("Token ")); |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 114 | auto session = PersistentData::session_store->login_session_by_token(token); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 115 | return session; |
| 116 | } |
| 117 | |
| 118 | const crow::PersistentData::UserSession* perform_xtoken_auth( |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 119 | const crow::request& req) const { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 120 | CROW_LOG_DEBUG << "[AuthMiddleware] X-Auth-Token authentication"; |
| 121 | |
Ed Tanous | 1ea9f06 | 2018-03-27 17:45:20 -0700 | [diff] [blame] | 122 | const std::string& token = req.get_header_value("X-Auth-Token"); |
| 123 | if (token.empty()) { |
| 124 | return nullptr; |
| 125 | } |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 126 | auto session = PersistentData::session_store->login_session_by_token(token); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 127 | return session; |
| 128 | } |
| 129 | |
| 130 | const crow::PersistentData::UserSession* perform_cookie_auth( |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 131 | const crow::request& req) const { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 132 | CROW_LOG_DEBUG << "[AuthMiddleware] Cookie authentication"; |
| 133 | |
| 134 | auto& cookie_value = req.get_header_value("Cookie"); |
Ed Tanous | 1ea9f06 | 2018-03-27 17:45:20 -0700 | [diff] [blame] | 135 | if (cookie_value.empty()) { |
| 136 | return nullptr; |
| 137 | } |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 138 | |
| 139 | auto start_index = cookie_value.find("SESSION="); |
| 140 | if (start_index == std::string::npos) { |
| 141 | return nullptr; |
| 142 | } |
Ed Tanous | 41ff64d | 2018-01-30 13:13:38 -0800 | [diff] [blame] | 143 | start_index += sizeof("SESSION=") - 1; |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 144 | auto end_index = cookie_value.find(";", start_index); |
| 145 | if (end_index == std::string::npos) { |
| 146 | end_index = cookie_value.size(); |
| 147 | } |
| 148 | std::string auth_key = |
| 149 | cookie_value.substr(start_index, end_index - start_index); |
| 150 | |
| 151 | const crow::PersistentData::UserSession* session = |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 152 | PersistentData::session_store->login_session_by_token(auth_key); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 153 | if (session == nullptr) { |
| 154 | return nullptr; |
| 155 | } |
| 156 | |
| 157 | // RFC7231 defines methods that need csrf protection |
| 158 | if (req.method != "GET"_method) { |
| 159 | const std::string& csrf = req.get_header_value("X-XSRF-TOKEN"); |
| 160 | // Make sure both tokens are filled |
| 161 | if (csrf.empty() || session->csrf_token.empty()) { |
| 162 | return nullptr; |
| 163 | } |
| 164 | // Reject if csrf token not available |
| 165 | if (csrf != session->csrf_token) { |
| 166 | return nullptr; |
| 167 | } |
| 168 | } |
| 169 | return session; |
| 170 | } |
| 171 | |
| 172 | // checks if request can be forwarded without authentication |
| 173 | bool is_on_whitelist(const crow::request& req) const { |
| 174 | // it's allowed to GET root node without authentication |
| 175 | if ("GET"_method == req.method) { |
| 176 | if (req.url == "/redfish/v1") { |
| 177 | return true; |
| 178 | } else if (crow::webassets::routes.find(req.url) != |
| 179 | crow::webassets::routes.end()) { |
| 180 | return true; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | // it's allowed to POST on session collection & login without authentication |
| 185 | if ("POST"_method == req.method) { |
| 186 | if ((req.url == "/redfish/v1/SessionService/Sessions") || |
| 187 | (req.url == "/login") || (req.url == "/logout")) { |
| 188 | return true; |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | return false; |
| 193 | } |
Ed Tanous | 9992332 | 2017-03-03 14:21:24 -0800 | [diff] [blame] | 194 | }; |
Ed Tanous | f3d847c | 2017-06-12 16:01:42 -0700 | [diff] [blame] | 195 | |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 196 | // TODO(ed) see if there is a better way to allow middlewares to request |
| 197 | // routes. |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 198 | // Possibly an init function on first construction? |
| 199 | template <typename... Middlewares> |
| 200 | void request_routes(Crow<Middlewares...>& app) { |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 201 | static_assert( |
| 202 | black_magic::contains<PersistentData::Middleware, Middlewares...>::value, |
| 203 | "TokenAuthorization middleware must be enabled in app to use " |
| 204 | "auth routes"); |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 205 | CROW_ROUTE(app, "/login") |
| 206 | .methods( |
| 207 | "POST"_method)([&](const crow::request& req, crow::response& res) { |
| 208 | std::string content_type; |
| 209 | auto content_type_it = req.headers.find("content-type"); |
| 210 | if (content_type_it != req.headers.end()) { |
| 211 | content_type = content_type_it->second; |
| 212 | boost::algorithm::to_lower(content_type); |
| 213 | } |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 214 | const std::string* username; |
| 215 | const std::string* password; |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 216 | bool looks_like_ibm = false; |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 217 | |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 218 | // This object needs to be declared at this scope so the strings within |
| 219 | // it are not destroyed before we can use them |
| 220 | nlohmann::json login_credentials; |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 221 | // Check if auth was provided by a payload |
| 222 | if (content_type == "application/json") { |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 223 | login_credentials = nlohmann::json::parse(req.body, nullptr, false); |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 224 | if (login_credentials.is_discarded()) { |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 225 | res.code = 400; |
| 226 | res.end(); |
| 227 | return; |
| 228 | } |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 229 | // check for username/password in the root object |
| 230 | // THis method is how intel APIs authenticate |
| 231 | auto user_it = login_credentials.find("username"); |
| 232 | auto pass_it = login_credentials.find("password"); |
| 233 | if (user_it != login_credentials.end() && |
| 234 | pass_it != login_credentials.end()) { |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 235 | username = user_it->get_ptr<const std::string*>(); |
| 236 | password = pass_it->get_ptr<const std::string*>(); |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 237 | } else { |
| 238 | // Openbmc appears to push a data object that contains the same |
| 239 | // keys (username and password), attempt to use that |
| 240 | auto data_it = login_credentials.find("data"); |
| 241 | if (data_it != login_credentials.end()) { |
| 242 | // Some apis produce an array of value ["username", |
| 243 | // "password"] |
| 244 | if (data_it->is_array()) { |
| 245 | if (data_it->size() == 2) { |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 246 | username = (*data_it)[0].get_ptr<const std::string*>(); |
| 247 | password = (*data_it)[1].get_ptr<const std::string*>(); |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 248 | looks_like_ibm = true; |
| 249 | } |
| 250 | } else if (data_it->is_object()) { |
| 251 | auto user_it = data_it->find("username"); |
| 252 | auto pass_it = data_it->find("password"); |
| 253 | if (user_it != data_it->end() && pass_it != data_it->end()) { |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 254 | username = user_it->get_ptr<const std::string*>(); |
| 255 | password = pass_it->get_ptr<const std::string*>(); |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 256 | } |
| 257 | } |
| 258 | } |
| 259 | } |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 260 | } else { |
| 261 | // check if auth was provided as a query string |
| 262 | auto user_it = req.headers.find("username"); |
| 263 | auto pass_it = req.headers.find("password"); |
| 264 | if (user_it != req.headers.end() && pass_it != req.headers.end()) { |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 265 | username = &user_it->second; |
| 266 | password = &pass_it->second; |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 267 | } |
| 268 | } |
| 269 | |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 270 | if (username != nullptr && !username->empty() && password != nullptr && |
| 271 | !password->empty()) { |
| 272 | if (!pam_authenticate_user(*username, *password)) { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 273 | res.code = res.code = static_cast<int>(HttpRespCode::UNAUTHORIZED); |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 274 | } else { |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 275 | auto& session = |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 276 | PersistentData::session_store->generate_user_session(*username); |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 277 | |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 278 | if (looks_like_ibm) { |
| 279 | // IBM requires a very specific login structure, and doesn't |
| 280 | // actually look at the status code. TODO(ed).... Fix that |
| 281 | // upstream |
Ed Tanous | bae064e | 2018-03-22 15:44:39 -0700 | [diff] [blame] | 282 | res.json_value = {{"data", "User '" + *username + "' logged in"}, |
| 283 | {"message", "200 OK"}, |
| 284 | {"status", "ok"}}; |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 285 | res.add_header("Set-Cookie", "XSRF-TOKEN=" + session.csrf_token); |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 286 | res.add_header("Set-Cookie", "SESSION=" + session.session_token + |
| 287 | "; Secure; HttpOnly"); |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 288 | } else { |
| 289 | // if content type is json, assume json token |
Ed Tanous | bae064e | 2018-03-22 15:44:39 -0700 | [diff] [blame] | 290 | res.json_value = {{"token", session.session_token}}; |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 291 | } |
| 292 | } |
| 293 | |
| 294 | } else { |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 295 | res.code = static_cast<int>(HttpRespCode::BAD_REQUEST); |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 296 | } |
| 297 | res.end(); |
| 298 | }); |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 299 | |
| 300 | CROW_ROUTE(app, "/logout") |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 301 | .methods("POST"_method)( |
| 302 | [&](const crow::request& req, crow::response& res) { |
| 303 | auto& session = |
| 304 | app.template get_context<TokenAuthorization::Middleware>(req) |
| 305 | .session; |
| 306 | if (session != nullptr) { |
| 307 | PersistentData::session_store->remove_session(session); |
| 308 | } |
| 309 | res.code = static_cast<int>(HttpRespCode::OK); |
| 310 | res.end(); |
| 311 | return; |
Borawski.Lukasz | 9d8fd30 | 2018-01-05 14:56:09 +0100 | [diff] [blame] | 312 | |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 313 | }); |
Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 314 | } |
Ed Tanous | db024a5 | 2018-03-06 12:50:34 -0800 | [diff] [blame] | 315 | } // namespace TokenAuthorization |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 316 | } // namespace crow |