Skip to content

Commit 273601d

Browse files
Agent configuration reference docs (#26999)
- Remove rotate enroll secret instructions because they're wrong: #25755 - Update contributor docs to simplify: #24309 --------- Co-authored-by: Rachael Shaw <[email protected]>
1 parent b42dbf2 commit 273601d

File tree

2 files changed

+5
-72
lines changed

2 files changed

+5
-72
lines changed

docs/Configuration/agent-configuration.md

+2-14
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,9 @@ To see a description for all available settings, first [enroll your host](https:
5656
osquery > SELECT name, default_value, value, description FROM osquery_flags;
5757
```
5858

59-
> Running the interactive osquery shell loads a standalone instance of osquery, with a default configuration rather than the one set in agent options. If you'd like to verify that your hosts are running with the latest settings set in `options`, run the query as a live query through Fleet.
59+
Running the interactive osquery shell loads a standalone instance of osquery, with a default configuration rather than the one set in agent options. If you'd like to verify that your hosts are running with the latest settings set in `options`, run the query as a live query in Fleet.
6060

61-
> If you revoked an old enroll secret, the `command_line_flags` won't update for hosts that enrolled to Fleet using this old enroll secret. This is because fleetd uses the enroll secret to receive new flags from Fleet. For these hosts, all existing features will work as expected.
62-
63-
How to rotate enroll secrets:
64-
65-
1. Check which hosts need a new enroll secret by running the following query: `SELECT * FROM orbit_info WHERE enrolled = false`.
66-
67-
> The hosts that don't have Fleetd installed will return an error because the `orbit_info` table doesn't exist. You can safely ignore these errors.
68-
69-
2. In Fleet, head to the Hosts page and select **Add hosts** to find the fleetctl package command with an active enroll secret.
70-
71-
3. Copy and run the fleetctl package command to create a new package. Distribute this package to the hosts that returned results in step 1.
72-
73-
4. Done!
61+
> If you revoke an old enroll secret, the `command_line_flags` won't update for hosts that enrolled to Fleet using this old enroll secret. This is because fleetd uses the enroll secret to receive new flags from Fleet. For these hosts, all existing features will work as expected.
7462

7563
#### Advanced
7664

docs/Contributing/fleetctl-apply.md

+3-58
Original file line numberDiff line numberDiff line change
@@ -123,64 +123,9 @@ Another reason you might want to use multiple enroll secrets is to use a certain
123123
124124
### Rotating enroll secrets
125125
126-
Rotating enroll secrets follows this process:
127-
128-
1. Add a new secret.
129-
2. Transition existing clients to the new secret. Note that existing clients may not need to be
130-
updated, as the enroll secret is not used by already enrolled clients.
131-
3. Remove the old secret.
132-
133-
To do this with `fleetctl` (assuming the existing secret is `oldsecret` and the new secret is `newsecret`):
134-
135-
Begin by retrieving the existing secret configuration:
136-
137-
```sh
138-
$ fleetctl get enroll_secret
139-
---
140-
apiVersion: v1
141-
kind: enroll_secret
142-
spec:
143-
secrets:
144-
- created_at: "2021-11-17T00:39:50Z"
145-
secret: oldsecret
146-
```
147-
148-
Apply the new configuration with both secrets:
149-
150-
```sh
151-
$ echo '
152-
---
153-
apiVersion: v1
154-
kind: enroll_secret
155-
spec:
156-
secrets:
157-
- created_at: "2021-11-17T00:39:50Z"
158-
secret: oldsecret
159-
- secret: newsecret
160-
' > secrets.yml
161-
$ fleetctl apply -f secrets.yml
162-
```
163-
164-
Now transition clients to using only the new secret. When the transition is completed, remove the
165-
old secret:
166-
167-
```sh
168-
$ echo '
169-
---
170-
apiVersion: v1
171-
kind: enroll_secret
172-
spec:
173-
secrets:
174-
- secret: newsecret
175-
' > secrets.yml
176-
$ fleetctl apply -f secrets.yml
177-
```
178-
179-
At this point, the old secret will no longer be accepted for new enrollments and the rotation is
180-
complete.
181-
182-
A similar process may be followed for rotating team-specific enroll secrets. For teams, the secrets
183-
are managed in the team yaml.
126+
1. In Fleet, head to **Hosts > Manage enroll secret** and add a new secret.
127+
2. Create a fleetd agent with the new enroll secret and install it on hosts.
128+
3. Delete the old enroll secret.
184129
185130
## Teams
186131

0 commit comments

Comments
 (0)