-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: create migration guide for enforced agent id format #3527 #5247
doc: create migration guide for enforced agent id format #3527 #5247
Conversation
Signed-off-by: Matteus Silva <[email protected]>
Thanks for the contribution @SilvaMatteus! Is it ready for review? |
Hi @evan2645 , I would like to discuss with someone the comments I left in the Markdown file before we say it is ready to review. Like the following:
and
(just noticed the SPIRE CLI command would be actually I contacted @azdagron via Slack, but he did not have time yet to answer that. If you do have time before Andrew does, @evan2645 , here are some points I would like to discuss:
When we have this PR ready, I would also start the implementation side. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the long latency getting back to you @SilvaMatteus 😮💨 If you are still interested in continuing this work, I've left a few comments. Also, @zmt has been through this scenario and has volunteered to help guide you as you author this document (thanks @zmt!).
@@ -0,0 +1,101 @@ | |||
# SPIRE Agent ID Migration Guide | |||
|
|||
This guide outlines the steps required to update your SPIRE agent IDs to conform to the enforced ID shape. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use "SPIRE Agent" instead of "SPIRE agent".
This guide outlines the steps required to update your SPIRE agent IDs to conform to the enforced ID shape. | |
This guide outlines the steps required to update your SPIRE Agent IDs to conform to the enforced ID shape. |
------------------- | ||
Warn on the undesired ID usage (this is already merged and will ship in 1.2.1. Since this was not in place for 1.2.0, we cannot change it through 1.3.x) | ||
|
||
-> Beginning with 1.4.0 (THIS HAS CHANGED, RIGHT?), disallow newly attested nodes which do not conform to the expected ID shape. Existing agents will still continue to operate successfully. As part of this change, we will also introduce a warning for existing IDs that are non-conformant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this has very much changed :) We introduced the warning in 1.2.1. We decided that we couldn't start enforcing until this migration guide was written. Once this guide has been authored and merged, the next minor release of SPIRE will start enforcing new agents to have that ID shape. The following minor version will start rejecting old agents.
- SPIRE CLI ([spire-server entry update](https://github.com/spiffe/spire/blob/main/doc/spire_server.md#spire-server-entry-update)) | ||
- SPIRE server logs | ||
- [Agent configuration](https://github.com/spiffe/spire/tree/main/doc) | ||
|
||
<!-- todo(matteus): which are other methods that may be available? --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the most complete way to identify non-conforming IDs is with the spire-server agent list
command. That will show all existing agents. It accepts a --output=json
flag to output in JSON. The output could be piped into jq
or something to get out all IDs.
You will also need to enumerate all registration entries to identify entries that are parented to the bad IDs. These registration entries will need to be duplicated and modified with the new agent ID. After the migration is successfully complete, the old entries can be removed.
This step depends on your specific deployment and the node attestor's behavior. | ||
|
||
|
||
<!-- todo(matteus): here I also thought of `spire-server entry update` command... --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's probably better to create new registrations, start transitioning agents, and then when all done, remove old registrations.
Refer to your node attestor's documentation for specific configuration instructions. | ||
|
||
|
||
### Re-Register Agents (if necessary): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't so much re-registering agents as it is duplicating workload registrations parented directly to those agents.
- SPIRE will deny agent authorization for agents with non-conformant IDs. | ||
|
||
|
||
## Migration Steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll also need a step here for slowly migrating agents over to the new IDs. In order to force an agent to re-attest, you'd need to use spire-server agent evict
to evict the agent. This could be done slowly in the beginning to make sure the transition is ok.
Hi! All good, I also took a long time to come up with the first draft. Thanks for the comments. I will reach @zmt out in Slack. Thanks folks. |
This PR has been open a while without activity. I'll go ahead and close this for now. If/when progress is made, please feel free to re-open :) |
Pull Request check list
Affected functionality
Description of change
Which issue this PR fixes
#3527