Remove user whitelisting
parent
e90bfa72fa
commit
640381e881
|
@ -35,11 +35,8 @@ class TracerConfig(Config):
|
||||||
if self.tracer_config.get("tracer_enabled", False):
|
if self.tracer_config.get("tracer_enabled", False):
|
||||||
# The tracer is enabled so sanitize the config
|
# The tracer is enabled so sanitize the config
|
||||||
# If no whitelists are given
|
# If no whitelists are given
|
||||||
self.tracer_config.setdefault("user_whitelist", ["*"])
|
|
||||||
self.tracer_config.setdefault("homeserver_whitelist", ["*"])
|
self.tracer_config.setdefault("homeserver_whitelist", ["*"])
|
||||||
|
|
||||||
if type(self.tracer_config.get("user_whitelist")) != list:
|
|
||||||
raise RuntimeError("Tracer user_whitelist config is malformed")
|
|
||||||
if type(self.tracer_config.get("homeserver_whitelist")) != list:
|
if type(self.tracer_config.get("homeserver_whitelist")) != list:
|
||||||
raise RuntimeError("Tracer homesererver_whitelist config is malformed")
|
raise RuntimeError("Tracer homesererver_whitelist config is malformed")
|
||||||
|
|
||||||
|
@ -50,10 +47,6 @@ class TracerConfig(Config):
|
||||||
#opentracing:
|
#opentracing:
|
||||||
# # Enable / disable tracer
|
# # Enable / disable tracer
|
||||||
# tracer_enabled: false
|
# tracer_enabled: false
|
||||||
# # The list of users who's requests will be traced
|
|
||||||
# # The list is a list of regex which is matched against the user_id
|
|
||||||
# user_whitelist:
|
|
||||||
# - "*"
|
|
||||||
# # The list of homeservers we wish to trace across
|
# # The list of homeservers we wish to trace across
|
||||||
# # The list is a list of regex which is matched against the homeserver name
|
# # The list is a list of regex which is matched against the homeserver name
|
||||||
# homeserver_whitelist:
|
# homeserver_whitelist:
|
||||||
|
|
|
@ -25,13 +25,11 @@ logger = logging.getLogger(__name__)
|
||||||
class LogContextScopeManager(ScopeManager):
|
class LogContextScopeManager(ScopeManager):
|
||||||
|
|
||||||
_homeserver_whitelist = ["*"]
|
_homeserver_whitelist = ["*"]
|
||||||
_user_whitelist = ["*"]
|
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
# Set the whitelists
|
# Set the whitelists
|
||||||
logger.info(config.tracer_config)
|
logger.info(config.tracer_config)
|
||||||
self._homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
|
self._homeserver_whitelist = config.tracer_config["homeserver_whitelist"]
|
||||||
self._user_whitelist = config.tracer_config["user_whitelist"]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def active(self):
|
def active(self):
|
||||||
|
@ -86,9 +84,6 @@ class LogContextScopeManager(ScopeManager):
|
||||||
def request_from_whitelisted_homeserver(self, request):
|
def request_from_whitelisted_homeserver(self, request):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def user_whitelisted(self, request):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class _LogContextScope(Scope):
|
class _LogContextScope(Scope):
|
||||||
def __init__(self, manager, span, logcontext, enter_logcontext, finish_on_close):
|
def __init__(self, manager, span, logcontext, enter_logcontext, finish_on_close):
|
||||||
|
|
Loading…
Reference in New Issue