Commit 3e81f1d
* Use native Go for Linux FIPS builds (#51345)
* feat: use native Go for Linux FIPS builds
Switch Linux FIPS builds from Microsoft Go (GOEXPERIMENT=systemcrypto)
to the upstream Go native FIPS module (GOFIPS140=v1.0.0, CMVP cert #5247).
Drops CGO requirement and the Microsoft Go cross-build Docker image.
Updates package tests to verify GOFIPS140 and DefaultGODEBUG buildinfo
instead of GOEXPERIMENT and OpenSSL ELF symbols.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: clean up MS Go FIPS artifacts
- Remove GOEXPERIMENT=systemcrypto from CI pipelines and ECH test script
- Switch FIPS unit/ECH test steps from AWS FIPS image to standard GCP image; unskip
- Update VerifyFIPSBinary to check GOFIPS140+DefaultGODEBUG instead of GOEXPERIMENT+OpenSSL symbols
- Strengthen GOFIPS140 assertion to require v1.0.0 version; improve error messages
- Remove dead CGO field and OR from FIPSConfig/DefaultBuildArgs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: golangci-lint fixes
Signed-off-by: Dominik Rosiek <dominik.rosiek@elastic.co>
* fix: propagate FIPS env to unit tests and pre-populate module cache for crossbuild
- Inject FIPS compile env vars (GOFIPS140=v1.0.0) into go test args so
that test binaries actually enforce FIPS crypto at runtime, not just
compile with the requirefips tag.
- Pre-populate golang.org/fips140 in the host module cache before FIPS
crossbuild containers mount it read-only, avoiding a write failure
when the toolchain tries to unpack the module inside the container.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: update TestConnectionTLS for native Go FIPS
Add verification_mode:strict so Go's native TLS stack performs chain
verification (InsecureSkipVerify=false) and the FIPS key-size check
triggers. Update the expected error string to match native Go's message.
Simplify the test comment to remove implementation details.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* mod: pin elastic-agent-libs to main for native Go FIPS validation
Picks up the unreleased FIPS 140-3 peer-cert key-type enforcement
(elastic/elastic-agent-libs#426), which TestConnectionTLS depends on.
Update the test's expected error string to match the actual message
that check produces, rather than Go's own (unreachable, since a
custom TLS callback is always installed) internal FIPS error.
This is a temporary pin for CI validation ahead of a tagged
elastic-agent-libs release containing the fix.
* notice: regenerate for elastic-agent-libs pin bump
* mod: bump elastic-agent-libs to released v0.45.0
Swaps the temporary pseudo-version pin (unreleased main commit) for
the now-tagged release containing the FIPS 140-3 peer-cert key-type
enforcement fix (elastic/elastic-agent-libs#426). Same commit
content (d72ff2012311), now backed by a real release.
* notice: regenerate for elastic-agent-libs v0.45.0
* fix: address reviewer findings on FIPS migration
- gotest.go: wire fipsTestEnv() into makeGoTestArgsForPackage too, so
per-module integration test builds (FIPS=true mage goIntegTest on a
single module) get GOFIPS140 set, not just the requirefips tag.
- crossbuild.go: drop the bogus "G122" gosec rule code from the nolint
comment on os.Chown (gosec has no G122; nolint:gosec suppresses by
linter name, so the code was misleading, not functional).
- connection_test.go: cover both elastic-agent-libs FIPS callback paths
(verification_mode strict and none use different callbacks) and
assert the RSA-1024-specific error message instead of the more
generic FIPS-rejection substring.
* test: require GOFIPS140 value to start with v1.0.0, not just contain it
Contains would tolerate v1.0.0 appearing anywhere in the buildinfo
value; HasPrefix asserts it's actually the version identifier itself.
* test: describe TestConnectionTLS modes by behavior, not libs internals
The comment named elastic-agent-libs' unexported checkAllChainsFIPS
and fipsVerifyNoneCallback, leaking implementation details of a
dependency with no compatibility guarantee. Describe the observable
strict-vs-none distinction instead.
---------
Signed-off-by: Dominik Rosiek <dominik.rosiek@elastic.co>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit a829d56)
# Conflicts:
# .buildkite/libbeat/pipeline.libbeat.yml
# .buildkite/x-pack/pipeline.xpack.filebeat.yml
# .buildkite/x-pack/pipeline.xpack.metricbeat.yml
* fix: resolve merge conflicts in backport of #51345
Mergify left unresolved conflict markers in three Buildkite pipeline
files. Resolve by keeping 9.3's image versions (1782878510) and
dropping IMAGE_UBUNTU_X86_64_FIPS, which no step references after the
switch to native Go FIPS (GOFIPS140=v1.0.0).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: suppress gosec G706 on dev-tool log line
DEV_OS/DEV_ARCH are trusted build-time env vars set by CI, not user
input. Add nolint:gosec to match the fix already present on main.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Dominik Rosiek <6997361+macdewee@users.noreply.github.com>
Co-authored-by: Dominik Rosiek <dominik.rosiek@elastic.co>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c01c713 commit 3e81f1d
16 files changed
Lines changed: 148 additions & 111 deletions
File tree
- .buildkite
- libbeat
- scripts
- x-pack
- changelog/fragments
- dev-tools
- mage
- packaging
- libbeat/esleg/eslegclient
- testing/go-ech
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
| |||
106 | 104 | | |
107 | 105 | | |
108 | 106 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
115 | | - | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
221 | 220 | | |
222 | 221 | | |
223 | 222 | | |
224 | | - | |
225 | 223 | | |
226 | 224 | | |
227 | | - | |
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
| |||
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
244 | 241 | | |
245 | 242 | | |
246 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
260 | 259 | | |
261 | 260 | | |
262 | 261 | | |
263 | | - | |
264 | 262 | | |
265 | 263 | | |
266 | | - | |
267 | 264 | | |
268 | 265 | | |
269 | 266 | | |
| |||
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
280 | | - | |
281 | | - | |
282 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
283 | 280 | | |
284 | 281 | | |
285 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10732 | 10732 | | |
10733 | 10733 | | |
10734 | 10734 | | |
10735 | | - | |
| 10735 | + | |
10736 | 10736 | | |
10737 | 10737 | | |
10738 | 10738 | | |
10739 | | - | |
| 10739 | + | |
10740 | 10740 | | |
10741 | 10741 | | |
10742 | 10742 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
172 | | - | |
| 172 | + | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
295 | | - | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| |||
278 | 287 | | |
279 | 288 | | |
280 | 289 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 290 | | |
285 | 291 | | |
286 | 292 | | |
| |||
584 | 590 | | |
585 | 591 | | |
586 | 592 | | |
587 | | - | |
| 593 | + | |
588 | 594 | | |
589 | 595 | | |
590 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
144 | 157 | | |
145 | 158 | | |
146 | 159 | | |
| |||
395 | 408 | | |
396 | 409 | | |
397 | 410 | | |
| 411 | + | |
398 | 412 | | |
399 | 413 | | |
400 | 414 | | |
| |||
0 commit comments