Skip to content

Commit

Permalink
Merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
umaannamalai committed Jun 1, 2023
2 parents 33b51fc + 7a43a7f commit 0c2cbbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 28 deletions.
3 changes: 2 additions & 1 deletion newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3184,9 +3184,10 @@ def _setup_security_module():
if not _settings.security.agent.enabled:
return
from newrelic_security.api.agent import Agent as SecurityAgent

# initialize security agent
security_agent = SecurityAgent()
# create a callback to reinitialise the security module
# create a callback to reinitialise the security module
newrelic.core.agent.Agent.run_on_startup(security_agent.refresh_agent)
except Exception as k2error:
_logger.error("K2 Startup failed with error %s", k2error)
Expand Down
40 changes: 13 additions & 27 deletions newrelic/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,26 +278,31 @@ class ApplicationLoggingMetricsSettings(Settings):
class ApplicationLoggingLocalDecoratingSettings(Settings):
pass


class SecuritySettings(Settings):
pass


class SecurityDetectionSettings(Settings):
pass


class SecurityAgentSettings(Settings):
pass


class SecurityDetectionRCISettings(Settings):
pass


class SecurityDetectionRXSSSettings(Settings):
pass


class SecurityDetectionDeserializationSettings(Settings):
pass



class InfiniteTracingSettings(Settings):
_trace_observer_host = None

Expand Down Expand Up @@ -864,33 +869,14 @@ def default_host(license_key):
"NEW_RELIC_APPLICATION_LOGGING_LOCAL_DECORATING_ENABLED", default=False
)

_settings.security.agent.enabled = _environ_as_bool(
"NEW_RELIC_SECURITY_AGENT_ENABLED",
False
)
_settings.security.enabled = _environ_as_bool(
"NEW_RELIC_SECURITY_ENABLED",
False
)
_settings.security.mode = os.environ.get(
"NEW_RELIC_SECURITY_MODE",
"IAST"
)
_settings.security.validator_service_url = os.environ.get(
"NEW_RELIC_SECURITY_VALIDATOR_SERVICE_URL",
None
)
_settings.security.detection.rci.enabled = _environ_as_bool(
"NEW_RELIC_SECURITY_DETECTION_RCI_ENABLED",
True
)
_settings.security.detection.rxss.enabled = _environ_as_bool(
"NEW_RELIC_SECURITY_DETECTION_RXSS_ENABLED",
True
)
_settings.security.agent.enabled = _environ_as_bool("NEW_RELIC_SECURITY_AGENT_ENABLED", False)
_settings.security.enabled = _environ_as_bool("NEW_RELIC_SECURITY_ENABLED", False)
_settings.security.mode = os.environ.get("NEW_RELIC_SECURITY_MODE", "IAST")
_settings.security.validator_service_url = os.environ.get("NEW_RELIC_SECURITY_VALIDATOR_SERVICE_URL", None)
_settings.security.detection.rci.enabled = _environ_as_bool("NEW_RELIC_SECURITY_DETECTION_RCI_ENABLED", True)
_settings.security.detection.rxss.enabled = _environ_as_bool("NEW_RELIC_SECURITY_DETECTION_RXSS_ENABLED", True)
_settings.security.detection.deserialization.enabled = _environ_as_bool(
"NEW_RELIC_SECURITY_DETECTION_DESERIALIZATION_ENABLED",
True
"NEW_RELIC_SECURITY_DETECTION_DESERIALIZATION_ENABLED", True
)


Expand Down

0 comments on commit 0c2cbbc

Please sign in to comment.