Skip to content

Commit d2796b9

Browse files
authored
Report FIPS-capability in ListAgentsResponse (#320)
1 parent d0a1653 commit d2796b9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

kibana/fleet.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ type AgentCommon struct {
321321
Host struct {
322322
Hostname string `json:"hostname"`
323323
} `json:"host"`
324+
Elastic struct {
325+
Agent struct {
326+
FIPS bool `json:"fips"`
327+
} `json:"agent"`
328+
} `json:"elastic"`
324329
} `json:"local_metadata"`
325330
PolicyID string `json:"policy_id"`
326331
PolicyRevision int `json:"policy_revision"`

kibana/fleet_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ func TestFleetListAgents(t *testing.T) {
236236
require.Equal(t, "eba58282-ec1c-4d9e-aac0-2b29f754b437", item.Agent.ID)
237237
require.Equal(t, "8.8.0", item.Agent.Version)
238238
require.Equal(t, "c75d66b1dac5", item.LocalMetadata.Host.Hostname)
239+
require.Equal(t, true, item.LocalMetadata.Elastic.Agent.FIPS)
239240
}
240241

241242
func TestFleetGetAgent(t *testing.T) {

kibana/testdata/fleet_list_agents_response.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"log_level": "info",
2121
"snapshot": false,
2222
"upgradeable": false,
23-
"version": "8.8.0"
23+
"version": "8.8.0",
24+
"fips": true
2425
}
2526
},
2627
"host": {
@@ -134,7 +135,8 @@
134135
"log_level": "info",
135136
"snapshot": false,
136137
"upgradeable": false,
137-
"version": "8.8.0"
138+
"version": "8.8.0",
139+
"fips": true
138140
}
139141
},
140142
"host": {

0 commit comments

Comments
 (0)