JJ
11/06/2023, 5:10 PMError: GET /api/latest/fleet/version received status 400 unknown if I don't hold the right role to perform the task? Trying to apply a policy to a Team via the CLI and I'm a 'Maintainer'.JJ
11/06/2023, 5:10 PMJJ
11/06/2023, 5:10 PMDherder
11/06/2023, 5:45 PMpolicies endpoint that you are a Team Maintainer of. Can you share the command that you are running? Are you sure you have the correct TeamID?JJ
11/06/2023, 5:50 PMfleetctl apply -f "./fleet-policy-cis-win10.yml" --policies-team WindowsJJ
11/06/2023, 5:51 PMDherder
11/06/2023, 5:55 PMfleetctl apply -f ./fleet-policy-cis-win10.yml --policies-team WindowsJJ
11/06/2023, 5:56 PMDherder
11/06/2023, 5:57 PMJJ
11/06/2023, 5:58 PMJJ
11/06/2023, 5:59 PM--context default and still received the same error.Dherder
11/06/2023, 6:05 PMcurl --location 'https://<your fleetserver>/api/v1/fleet/teams/<your team id>/policies' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your token>' \
--data '{
"name": "Gatekeeper enabled",
"query": "SELECT 1 FROM gatekeeper WHERE assessments_enabled = 1;",
"description": "Checks if gatekeeper is enabled on macOS devices",
"resolution": "Resolution steps",
"platform": "darwin"
}'JJ
11/06/2023, 6:09 PM<html>
<head><title>400 No required SSL certificate was sent</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>No required SSL certificate was sent</center>
<hr><center>nginx</center>
</body>
</html>Dherder
11/06/2023, 6:09 PMJJ
11/06/2023, 6:10 PM