-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connection time acl check to standalone mcrouter
Summary: Add per-connection acl checker to mcrouter server. Reviewed By: callenrain Differential Revision: D13355499 fbshipit-source-id: 8ac8c5b68b325ce2315b86eef26ea00cadc86d9d
- Loading branch information
1 parent
4d98639
commit b4c5c8e
Showing
8 changed files
with
160 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the LICENSE | ||
* file in the root directory of this source tree. | ||
*/ | ||
#include "StandaloneConfig.h" | ||
|
||
#include <functional> | ||
#include <unordered_map> | ||
|
||
namespace facebook { | ||
namespace memcache { | ||
namespace mcrouter { | ||
|
||
void standalonePreInitFromCommandLineOpts( | ||
const std::unordered_map<std::string, std::string>& standaloneOptionsDict) { | ||
} | ||
|
||
void standaloneInit( | ||
const McrouterOptions& opts, | ||
const McrouterStandaloneOptions& standaloneOpts) {} | ||
|
||
void initStandaloneSSL() {} | ||
|
||
void finalizeStandaloneOptions(McrouterStandaloneOptions& opts) {} | ||
|
||
std::function<void(McServerSession&)> getConnectionAclChecker( | ||
const std::string& /* serviceIdentity */, | ||
bool /* enforce */) { | ||
return [](McServerSession&) {}; | ||
} | ||
|
||
} // namespace mcrouter | ||
} // namespace memcache | ||
} // namespace facebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the LICENSE | ||
* file in the root directory of this source tree. | ||
*/ | ||
#pragma once | ||
|
||
#include <functional> | ||
#include <unordered_map> | ||
|
||
namespace facebook { | ||
namespace memcache { | ||
|
||
// forward declarations | ||
class McrouterOptions; | ||
class McServerSession; | ||
|
||
namespace mcrouter { | ||
// forward declarations | ||
class McrouterStandaloneOptions; | ||
|
||
void standalonePreInitFromCommandLineOpts( | ||
const std::unordered_map<std::string, std::string>& standaloneOptionsDict); | ||
|
||
void standaloneInit( | ||
const McrouterOptions& opts, | ||
const McrouterStandaloneOptions& standaloneOpts); | ||
|
||
void initStandaloneSSL(); | ||
|
||
void finalizeStandaloneOptions(McrouterStandaloneOptions& opts); | ||
|
||
std::function<void(McServerSession&)> getConnectionAclChecker( | ||
const std::string& serviceIdentity, | ||
bool enforce); | ||
|
||
} // namespace mcrouter | ||
} // namespace memcache | ||
} // namespace facebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters