Skip to content

Commit a2f6d96

Browse files
committed
Enable FIPS mode when requested
This adds an option to enable FIPS mode if enablefips is set. OneAgent uses the FIPS mode to be compliant with the FIPS 140-3 computer security standard.
1 parent 93226a3 commit a2f6d96

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/framework-dynatrace_one_agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The credential payload of the service may contain the following entries:
3030
| `environmentid` | Your Dynatrace environment ID is the unique identifier of your Dynatrace environment. You can find it in the deploy Dynatrace section within your environment.
3131
| `networkzone` | (Optional) Network zones are Dynatrace entities that represent your network structure. They help you to route the traffic efficiently, avoiding unnecessary traffic across data centers and network regions. Enter the network zone you wish to pass to the server during the OneAgent Download.
3232
| `skiperrors` | (Optional) The errors during agent download are skipped and the injection is disabled. Use this option at your own risk. Possible values are 'true' and 'false'. This option is disabled by default!
33+
| `enablefips`| (Optional) Enables the use of [FIPS 140 cryptographic algorithms](https://docs.dynatrace.com/docs/shortlink/oneagentctl#fips-140). Possible values are 'true' and 'false'. This option is disabled by default!
3334

3435
## Configuration
3536
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].

lib/java_buildpack/framework/dynatrace_one_agent.rb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def release
7171
environment_variables = @droplet.environment_variables
7272
environment_variables.add_environment_variable(LD_PRELOAD, agent_path(manifest))
7373

74+
if enable_fips?
75+
File.delete(@droplet.sandbox + 'agent/dt_fips_disabled.flag')
76+
end
77+
7478
dynatrace_environment_variables(manifest)
7579
end
7680

@@ -87,6 +91,8 @@ def supports?
8791

8892
APITOKEN = 'apitoken'
8993

94+
ENABLE_FIPS = 'enablefips'
95+
9096
DT_APPLICATION_ID = 'DT_APPLICATIONID'
9197

9298
DT_CONNECTION_POINT = 'DT_CONNECTION_POINT'
@@ -109,8 +115,9 @@ def supports?
109115

110116
SKIP_ERRORS = 'skiperrors'
111117

112-
private_constant :APIURL, :APITOKEN, :DT_APPLICATION_ID, :DT_CONNECTION_POINT, :DT_NETWORK_ZONE, :DT_LOGSTREAM,
113-
:DT_TENANT, :DT_TENANTTOKEN, :ENVIRONMENTID, :FILTER, :NETWORKZONE, :SKIP_ERRORS
118+
private_constant :APIURL, :APITOKEN, :ENABLE_FIPS, :DT_APPLICATION_ID, :DT_CONNECTION_POINT, :DT_NETWORK_ZONE,
119+
:DT_LOGSTREAM, :DT_TENANT, :DT_TENANTTOKEN, :LD_PRELOAD, :ENVIRONMENTID, :FILTER, :NETWORKZONE,
120+
:SKIP_ERRORS
114121

115122
def agent_download_url
116123
download_uri = "#{api_base_url(credentials)}/v1/deployment/installer/agent/unix/paas/latest?include=java" \
@@ -193,7 +200,11 @@ def logstream?
193200
end
194201

195202
def skip_errors?
196-
credentials[SKIP_ERRORS].to_b
203+
credentials[SKIP_ERRORS] == "true"
204+
end
205+
206+
def enable_fips?
207+
credentials[ENABLE_FIPS] == "true"
197208
end
198209

199210
def tenanttoken(manifest)

0 commit comments

Comments
 (0)