-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to set required
cephx
auth config
Closes: #37 Signed-off-by: Tobias Wolf <[email protected]>
- Loading branch information
1 parent
edc2fce
commit 5324699
Showing
3 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
from .main import CephXAuthHandler | ||
|
||
MODULE_NAME = "cephx_auth_config" | ||
HANDLER_CLASS = CephXAuthHandler | ||
REQUIRES = [] | ||
AFTER = [] | ||
PREFLIGHT_REQUIRES = [] |
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,16 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from ..module import ModuleHandler | ||
from typing import Any, Dict | ||
|
||
|
||
class CephXAuthHandler(ModuleHandler): | ||
def run(self) -> Any: | ||
self.logger.debug("Reconfiguring Ceph to expect cephx auth") | ||
|
||
self.ceph.conf_set("auth_cluster_required", "cephx") | ||
self.ceph.conf_set("auth_service_required", "cephx") | ||
self.ceph.conf_set("auth_client_required", "cephx") | ||
|
||
self.logger.info("Reconfigured Ceph to expect cephx auth") | ||
return { "reconfigured": True } |