|
16 | 16 | from ddtrace.appsec._constants import LOGIN_EVENTS_MODE
|
17 | 17 | from ddtrace.appsec._constants import TELEMETRY_INFORMATION_NAME
|
18 | 18 | from ddtrace.constants import APPSEC_ENV
|
19 |
| -from ddtrace.internal.utils.deprecations import DDTraceDeprecationWarning |
20 | 19 | from ddtrace.settings._core import report_telemetry as _report_telemetry
|
21 |
| -from ddtrace.vendor.debtcollector import deprecate |
22 | 20 |
|
23 | 21 |
|
24 | 22 | def _validate_non_negative_int(r: int) -> None:
|
@@ -75,34 +73,6 @@ class ASMConfig(Env):
|
75 | 73 | _appsec_standalone_enabled = Env.var(bool, APPSEC.STANDALONE_ENV, default=False)
|
76 | 74 | _use_metastruct_for_triggers = True
|
77 | 75 |
|
78 |
| - _automatic_login_events_mode = Env.var(str, APPSEC.AUTOMATIC_USER_EVENTS_TRACKING, default="", parser=str.lower) |
79 |
| - # Deprecation phase, to be removed in ddtrace 3.0.0 |
80 |
| - if _automatic_login_events_mode is not None: |
81 |
| - if _automatic_login_events_mode == "extended": |
82 |
| - deprecate( |
83 |
| - "Using DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING=extended is deprecated", |
84 |
| - message="Please use 'DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE=identification instead", |
85 |
| - removal_version="3.0.0", |
86 |
| - category=DDTraceDeprecationWarning, |
87 |
| - ) |
88 |
| - _automatic_login_events_mode = LOGIN_EVENTS_MODE.IDENT |
89 |
| - elif _automatic_login_events_mode == "safe": |
90 |
| - deprecate( |
91 |
| - "Using DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING=safe is deprecated", |
92 |
| - message="Please use 'DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE=anonymisation instead", |
93 |
| - removal_version="3.0.0", |
94 |
| - category=DDTraceDeprecationWarning, |
95 |
| - ) |
96 |
| - _automatic_login_events_mode = LOGIN_EVENTS_MODE.ANON |
97 |
| - elif _automatic_login_events_mode == "disabled": |
98 |
| - deprecate( |
99 |
| - "Using DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING=disabled is deprecated", |
100 |
| - message="Please use 'DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE=disabled" |
101 |
| - " instead or DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING_ENABLED=false" |
102 |
| - " to disable the feature and bypass Remote Config", |
103 |
| - removal_version="3.0.0", |
104 |
| - category=DDTraceDeprecationWarning, |
105 |
| - ) |
106 | 76 | _auto_user_instrumentation_local_mode = Env.var(
|
107 | 77 | str,
|
108 | 78 | APPSEC.AUTO_USER_INSTRUMENTATION_MODE,
|
@@ -209,7 +179,6 @@ class ASMConfig(Env):
|
209 | 179 | "_iast_telemetry_report_lvl",
|
210 | 180 | "_ep_enabled",
|
211 | 181 | "_use_metastruct_for_triggers",
|
212 |
| - "_automatic_login_events_mode", |
213 | 182 | "_auto_user_instrumentation_local_mode",
|
214 | 183 | "_auto_user_instrumentation_rc_mode",
|
215 | 184 | "_auto_user_instrumentation_enabled",
|
@@ -250,9 +219,6 @@ def __init__(self):
|
250 | 219 | super().__init__()
|
251 | 220 | # Is one click available?
|
252 | 221 | self._eval_asm_can_be_enabled()
|
253 |
| - # Only for deprecation phase |
254 |
| - if self._automatic_login_events_mode and APPSEC.AUTO_USER_INSTRUMENTATION_MODE not in os.environ: |
255 |
| - self._auto_user_instrumentation_local_mode = self._automatic_login_events_mode |
256 | 222 | if not self._asm_libddwaf_available:
|
257 | 223 | self._asm_enabled = False
|
258 | 224 | self._asm_can_be_enabled = False
|
|
0 commit comments