-
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.
Signed-off-by: Tobias Wolf <[email protected]>
- Loading branch information
1 parent
27aa23a
commit 6aa972c
Showing
4 changed files
with
31 additions
and
1 deletion.
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 | ||
|
||
|
||
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} |
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