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

docs: Consul Workload Identity integration #18685

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Oct 6, 2023

Documentation updates to support the new Consul integration with Nomad Workload Identity. Included:

  • Added a large section to the Consul integration docs to explain how to set up auth methods and binding rules (by hand, assuming we don't ship a nomad setup-consul tool for now), and how to safely migrate from the existing workflow to the new one.
  • Move consul block out of group and onto its own page now that we have it available at the task scope, and expanded examples of its use.
  • Added the service_identity and task_identity blocks to the Nomad agent configuration, and provided a recommended default.
  • Added the identity block to the service block page.
  • Added a rough compatibility matrix to the Consul integration page.

Preview links for the significant page changes (I'll try to keep these links up to date as I land changes):

@tgross tgross force-pushed the docs-consul-workload-identity branch from 52041ab to f606552 Compare October 6, 2023 17:56
@tgross tgross force-pushed the docs-consul-workload-identity branch from f606552 to 5be077f Compare October 6, 2023 17:59
@tgross tgross force-pushed the docs-consul-workload-identity branch from 5be077f to c377e4f Compare October 6, 2023 18:15
@tgross tgross added theme/docs Documentation issues and enhancements theme/consul labels Oct 6, 2023
@tgross tgross added this to the 1.7.0 milestone Oct 6, 2023
@tgross tgross force-pushed the docs-consul-workload-identity branch from c377e4f to fedb510 Compare October 6, 2023 18:23
@tgross tgross marked this pull request as ready for review October 6, 2023 18:30
@tgross tgross force-pushed the docs-consul-workload-identity branch from fedb510 to ba0ddd1 Compare October 9, 2023 19:14
Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Some comments, but mostly are probably due to my own ignorance on the topic 😅

website/content/docs/configuration/consul.mdx Outdated Show resolved Hide resolved
website/content/docs/integrations/consul-integration.mdx Outdated Show resolved Hide resolved

```json
{
"JWKSURL": "https://nomad.example.com:4646/.well-known/jwks.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can Consul reference internal services here? 🤔

Suggested change
"JWKSURL": "https://nomad.example.com:4646/.well-known/jwks.json",
"JWKSURL": "https://nomad.service.consul:4646/.well-known/jwks.json",

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably, but I doubt Nomad's TLS cert is going to be set up for that typically?

website/content/docs/job-specification/consul.mdx Outdated Show resolved Hide resolved
Comment on lines +75 to +78
The Nomad client will make the Consul token available to the task by writing it
to the secret directory at `secrets/consul_token` and by injecting a
`CONSUL_TOKEN` environment variable in the task. If the Nomad cluster is
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding env and file to the consul block (like vault) could be a nice future work.

Copy link
Contributor

@mikenomitch mikenomitch left a comment

Choose a reason for hiding this comment

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

High level thoughts:

  • Overall this is looking good! I hadn't 100% followed along with the ways that this diverged with Vault, but its really not that much harder once you configure the agent defaults. I'm excited to get this going!
  • In "Using Nomad Workload Identity with Consul" on "integrations/consul-integration" we should explicitly say that you no longer will need to pass in Consul tokens on job submit. Probably also worth mentioning in the "Migrating to Using Workload Identity with Consul" category.
  • Should we elevate the Workload Identity example in the agent config section to come right after the Default? Should this become the default in 1.8? In 1.9?
  • Parsing error at end of docs/job-specification/consul (see the preview page, it'll be obvious) - also at "The token provided by the [-consul-token] flag" and at "Refer to [Configuring Consul Authentication][] for more details." - A few other link rendering errors too

@tgross
Copy link
Member Author

tgross commented Oct 16, 2023

In "Using Nomad Workload Identity with Consul" on "integrations/consul-integration" we should explicitly say that you no longer will need to pass in Consul tokens on job submit. Probably also worth mentioning in the "Migrating to Using Workload Identity with Consul" category.

Good call. Done.

Should we elevate the Workload Identity example in the agent config section to come right after the Default? Should this become the default in 1.8? In 1.9?

Done. Yes, in Nomad 1.9 we'll make it the default.

Parsing error at end of docs/job-specification/consul (see the preview page, it'll be obvious) - also at "The token provided by the [-consul-token] flag" and at "Refer to [Configuring Consul Authentication][] for more details." - A few other link rendering errors too

Gah. Ok, I think I've fixed them all. Will re-review once the new preview is done.

Documentation updates to support the new Consul integration with Nomad Workload
Identity. Included:

* Added a large section to the Consul integration docs to explain how to set up
  auth methods and binding rules (by hand, assuming we don't ship a `nomad
  setup-consul` tool for now), and how to safely migrate from the existing
  workflow to the new one.
* Move `consul` block out of `group` and onto its own page now that we have it
  available at the `task` scope, and expanded examples of its use.
* Added the `service_identity` and `task_identity` blocks to the Nomad agent
  configuration, and provided a recommended default.
* Added the `identity` block to the `service` block page.
* Added a rough compatibility matrix to the Consul integration page.
@tgross tgross force-pushed the docs-consul-workload-identity branch from 8b341e2 to ea93817 Compare October 19, 2023 20:48
@tgross tgross merged commit 8a31125 into main Oct 23, 2023
8 checks passed
@tgross tgross deleted the docs-consul-workload-identity branch October 23, 2023 13:17
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
Documentation updates to support the new Consul integration with Nomad Workload
Identity. Included:

* Added a large section to the Consul integration docs to explain how to set up
  auth methods and binding rules (by hand, assuming we don't ship a `nomad
  setup-consul` tool for now), and how to safely migrate from the existing
  workflow to the new one.
* Move `consul` block out of `group` and onto its own page now that we have it
  available at the `task` scope, and expanded examples of its use.
* Added the `service_identity` and `task_identity` blocks to the Nomad agent
  configuration, and provided a recommended default.
* Added the `identity` block to the `service` block page.
* Added a rough compatibility matrix to the Consul integration page.
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
Documentation updates to support the new Consul integration with Nomad Workload
Identity. Included:

* Added a large section to the Consul integration docs to explain how to set up
  auth methods and binding rules (by hand, assuming we don't ship a `nomad
  setup-consul` tool for now), and how to safely migrate from the existing
  workflow to the new one.
* Move `consul` block out of `group` and onto its own page now that we have it
  available at the `task` scope, and expanded examples of its use.
* Added the `service_identity` and `task_identity` blocks to the Nomad agent
  configuration, and provided a recommended default.
* Added the `identity` block to the `service` block page.
* Added a rough compatibility matrix to the Consul integration page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/consul theme/docs Documentation issues and enhancements theme/workload-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants