Skip to content
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

Rename master and agent_master ACL tokens in the config file format #11665

Merged
merged 6 commits into from
Dec 1, 2021

Conversation

boxofrad
Copy link
Contributor

@boxofrad boxofrad commented Nov 26, 2021

This is a first step towards removing this non-inclusive language. In subsequent PRs we will update the naming in the API, the consul acl set-agent-token command, the auto-config API, and internal references, struct field names etc.

@github-actions github-actions bot added theme/config Relating to Consul Agent configuration, including reloading type/docs Documentation needs to be created/updated/clarified labels Nov 26, 2021
@hashicorp-ci
Copy link
Contributor

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

@boxofrad boxofrad force-pushed the boxofrad/rename-master-acl-tokens branch from 162b746 to efe4b21 Compare November 26, 2021 15:29
@vercel vercel bot temporarily deployed to Preview – consul November 26, 2021 15:29 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging November 26, 2021 15:29 Inactive
@boxofrad boxofrad marked this pull request as ready for review November 26, 2021 15:30
@boxofrad boxofrad requested a review from a team as a code owner November 26, 2021 15:30
@boxofrad boxofrad requested a review from a team November 26, 2021 15:31
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, nice work!

One suggestion below for making the deprecated fields a little more explicit even though we can't use the DeprecatedConfig struct. Also happy to chat about other options if you think there is a better way.

I think any of that could be done as a follow up, so nothing blocking a merge I can see.

agent/config/config.go Show resolved Hide resolved
agent/config/deprecated.go Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging November 26, 2021 22:11 Inactive
@vercel vercel bot temporarily deployed to Preview – consul November 26, 2021 22:11 Inactive
@boxofrad boxofrad force-pushed the boxofrad/rename-master-acl-tokens branch from 26622a8 to 9c2bc3c Compare November 26, 2021 22:17
@vercel vercel bot temporarily deployed to Preview – consul November 26, 2021 22:17 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging November 26, 2021 22:17 Inactive
@boxofrad boxofrad force-pushed the boxofrad/rename-master-acl-tokens branch from 9c2bc3c to 2d10e0d Compare November 26, 2021 22:32
@vercel vercel bot temporarily deployed to Preview – consul November 26, 2021 22:32 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging November 26, 2021 22:32 Inactive
Copy link
Contributor

@jkirschner-hashicorp jkirschner-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boxofrad : thanks for taking this on! I proposed some changes that make the docs easier to understand for users on Consul 1.4 - 1.10. Let me know what you think.

website/content/docs/agent/options.mdx Outdated Show resolved Hide resolved
website/content/docs/agent/options.mdx Outdated Show resolved Hide resolved
website/content/docs/agent/options.mdx Outdated Show resolved Hide resolved
website/content/docs/agent/options.mdx Show resolved Hide resolved
website/content/docs/agent/options.mdx Outdated Show resolved Hide resolved
@boxofrad
Copy link
Contributor Author

Thanks @jkirschner-hashicorp, that's much better. Let me know what you think now?

Copy link
Contributor

@jkirschner-hashicorp jkirschner-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, @boxofrad!

I added a few small comments to consider before merging, but have given my approval.

@@ -16,7 +16,7 @@ the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-s
## Bootstrap ACLs

This endpoint does a special one-time bootstrap of the ACL system, making the first
management token if the [`acl.tokens.master`](/docs/agent/options#acl_tokens_master)
management token if the [`acl.tokens.initial_management`](/docs/agent/options#acl_tokens_initial_management)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intent that, if someone is on Consul 1.11, they will follow this link, see

This is available in Consul 1.11 and later. In prior versions, use acl.tokens.master

and then find out the correct (previous) name that way?

I imagine we've had this problem before (and will have new instances of this problem in the future) when we rename things... do we mention every name everywhere? Or mention just the most recent name in most docs, but link to information about old names?

[Long term, this might be best solved by having versioned docs pages. But that's well outside the scope of this PR :) ]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! In this case, it's a bit more onerous because we've already renamed the token before (acl_master_tokenacl.tokens.masteracl.tokens.initial_management) so users on very old versions have a bit of a trail to follow.

do we mention every name everywhere? Or mention just the most recent name in most docs

That seems to be the case, yeah. For example, the current ACL System page mentions acl.tokens.agent_master, not acl_agent_master_token.

Comment on lines 662 to 663
- `master` ((#acl_tokens_master)) **Deprecated in Consul 1.11. Use the
[`acl.tokens.initial_management`](#acl_tokens_initial_management) field instead.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For someone on Consul <1.11, I'm not sure this text makes it clear that the initial_management token is a direct replacement (a rename), so the docs for initial_management apply here, too.

Perhaps this? Let me know what you think.

Suggested change
- `master` ((#acl_tokens_master)) **Deprecated in Consul 1.11. Use the
[`acl.tokens.initial_management`](#acl_tokens_initial_management) field instead.**
- `master` ((#acl_tokens_master)) **Renamed in Consul 1.11 to
[`acl.tokens.initial_management`](#acl_tokens_initial_management).**

Or if we must include the word deprecated...

Suggested change
- `master` ((#acl_tokens_master)) **Deprecated in Consul 1.11. Use the
[`acl.tokens.initial_management`](#acl_tokens_initial_management) field instead.**
- `master` ((#acl_tokens_master)) **Deprecated in Consul 1.11: renamed to
[`acl.tokens.initial_management`](#acl_tokens_initial_management).**

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, rename is clearer 👍🏻

This should only be used by operators during outages, regular ACL tokens should normally
be used by applications.

- `agent_master` ((#acl_tokens_agent_master)) **Deprecated in Consul 1.11. Use the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above (mention that it was renamed)

@vercel vercel bot temporarily deployed to Preview – consul-ui-staging December 1, 2021 20:42 Inactive
@boxofrad boxofrad merged commit d8afd2f into main Dec 1, 2021
@boxofrad boxofrad deleted the boxofrad/rename-master-acl-tokens branch December 1, 2021 21:08
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/512839.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/config Relating to Consul Agent configuration, including reloading type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants