You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let is_gov_region = region.starts_with("us-gov-");
17
17
18
+
// Note that we are defaulting to `is_gov_region` for this rather than a specific default
19
+
// value. So if the `DD_LAMBDA_FIPS_MODE` environment is not set, we expect lambdas in govcloud
20
+
// to be running the runtime layers in FIPS mode.
18
21
env::var("DD_LAMBDA_FIPS_MODE")
19
22
.map(|val| val.to_lowercase() == "true")
20
23
.unwrap_or(is_gov_region)
21
24
}
22
25
23
-
#[cfg(feature = "fips")]
24
-
pubfncheck_fips_mode_mismatch(region:&str){
25
-
let runtime_would_enable = runtime_layer_would_enable_fips_mode(region);
26
-
if !runtime_would_enable {
27
-
debug!("FIPS mode is enabled in this Extension layer but would be disabled in the runtime layer based on region and environment settings. Set DD_LAMBDA_FIPS_MODE=true or deploy the standard (non-FIPS) version of the Extension layer to ensure consistent FIPS behavior.");
28
-
}
29
-
}
30
-
31
-
#[cfg(not(feature = "fips"))]
32
26
pubfncheck_fips_mode_mismatch(region:&str){
33
-
let runtime_would_enable = runtime_layer_would_enable_fips_mode(region);
34
-
if runtime_would_enable {
27
+
ifruntime_layer_would_enable_fips_mode(region){
28
+
#[cfg(not(feature = "fips"))]
35
29
debug!("FIPS mode is disabled in this Extension layer but would be enabled in the runtime layer based on region and environment settings. Deploy the FIPS version of the Extension layer or set DD_LAMBDA_FIPS_MODE=false to ensure consistent FIPS behavior.");
30
+
}else{
31
+
#[cfg(feature = "fips")]
32
+
debug!("FIPS mode is enabled in this Extension layer but would be disabled in the runtime layer based on region and environment settings. Set DD_LAMBDA_FIPS_MODE=true or deploy the standard (non-FIPS) version of the Extension layer to ensure consistent FIPS behavior.");
0 commit comments