feat(infrastructure): write fedramp: true to infra config when region is GOV or FEDRAMP - #1401
Merged
Merged
Conversation
… is GOV or FEDRAMP When NEW_RELIC_REGION is GOV or FEDRAMP, the infrastructure agent requires fedramp: true in newrelic-infra.yml to route all ingest to the FedRAMP- compliant gov-* endpoints (gov-infra-api, gov-identity-api, gov-infrastructure-command-api, gov-metric-api). Without this flag the agent silently 401s against the US ingest cell. Changes across all 7 platform recipes: - ubuntu.yml, debian.yml, centos_rhel.yml, awslinux.yml, suse.yml, darwin.yml: add sed cleanup of ^fedramp key on reinstall, and write fedramp: true when region matches ^(gov|fedramp)$ (case-insensitive) - windows.yml: add fedramp: true branch in Write-FreshConfig for gov/fedramp Verified from newrelic/infrastructure-agent pkg/config/config.go: Fedramp bool `yaml:"fedramp" envconfig:"fedramp"` When true routes to defaultSecureFederalURL (gov-infra-api.newrelic.com), defaultSecureFedralIdentityURL, defaultSecureFedralCmdChannelURL, and defaultSecureFederalMetricURL. No behaviour change for US, EU, JP, or Staging installs.
nr-developer-toolkit
approved these changes
Jul 17, 2026
Member
Author
|
Confirmed that the failures are not a result of the changes in these recipes - they seem to be occuring because of race conditions (overload) with AWS. Merging this PR. |
burhan-nr
pushed a commit
to kkhandelwal-nr/temp-open-install-library
that referenced
this pull request
Jul 21, 2026
Changes since v0.86.4: - feat(infrastructure): write fedramp: true to infra config when region is GOV or FEDRAMP (newrelic#1401) (3a112fe) - test: exercise all nrdot recipes to surface CI test issues (newrelic#1393) (af8392d) - support k8s 1.35, remove support for 1.30 (3e403f4) Release: https://github.com/newrelic/open-install-library/releases/tag/v0.87.0 [skip ci]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
NEW_RELIC_REGIONisGOVorFEDRAMP, the infrastructure agent requiresfedramp: trueinnewrelic-infra.ymlto route all ingest to the FedRAMP-compliantgov-*endpoints. Without this flag the agent silently 401s against the US ingest cell — confirmed by end-to-end testing on Ubuntu 22.04.Why
fedramp: trueis the correct and only attribute neededVerified directly from
pkg/config/config.goandpkg/config/defaults.goinnewrelic/infrastructure-agent:When
fedramp: true, the agent routes to:gov-infra-api.newrelic.comgov-identity-api.newrelic.comgov-infrastructure-command-api.newrelic.comgov-metric-api.newrelic.comNo other config attributes are required.
fedrampis checked beforestagingin the agent's URL calculation, so the two flags don't conflict (though they'd never be set together in practice).FIPSmode (NEW_RELIC_FIPS_ENABLED) is a separate concern — it installs the FIPS-crypto binary variant. This PR does not touch FIPS handling.Changes
All 7 platform recipes are updated with the same two-part change:
Linux / macOS (
ubuntu.yml,debian.yml,centos_rhel.yml,awslinux.yml,suse.yml,darwin.yml):sed -i "/^fedramp/d"to the cleanup block so reinstalling with a non-GOV region removes any leftoverfedramp: truefedramp: truewhenNEW_RELIC_REGIONmatches^(gov|fedramp)$(case-insensitive, exact match — not a substring)Windows (
windows.yml):fedramp: truebranch inWrite-FreshConfig(which always writes a fresh file, so no cleanup step needed)Non-regression guarantee
grep -iqE '^(gov|fedramp)$'pattern is an exact case-insensitive match — it will not matchstaging,us,eu,jp, or any other valuesed -i "/^fedramp/d"cleanup is a no-op when the key is not presentTest evidence
End-to-end test on Ubuntu 22.04 EC2, kernel 6.8 (us-west-2):
fedramp: true: infra agent 401s on every push toinfra-api.newrelic.comfedramp: truemanually added: infra agent routes togov-infra-api.newrelic.com, 19SystemSampleevents confirmed in GOV account (account 4012030) via NRQL within 60 secondsRelated
newrelic/newrelic-client-goPR #1434 (merged, released as v2.91.0) — defines the GOV region with FedRAMP-compliant endpointsnewrelic/newrelic-cliPR #1866 — acceptsGOVandFEDRAMPas validNEW_RELIC_REGIONvalues🤖 Generated with Claude Code