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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault: allow providing auth method path to the connect CA configuration #1029

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

ishustava
Copy link
Contributor

Changes proposed in this PR:

  • Add authMethodPath to the connect CA vault configuration so that you can use a different kubernetes auth method for a case when you are using a single vault server for multiple kubernetes clusters (WAN federation case).

How I've tested this PR:
acceptance tests

How I expect reviewers to test this PR:
馃憖

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@ishustava ishustava requested review from a team, jmurret, ndhanushkodi and thisisnotashwin and removed request for a team and jmurret February 9, 2022 23:17
Copy link
Contributor

@ndhanushkodi ndhanushkodi 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 Iryna!!

"global.secretsBackend.vault.connectCA.authMethodPath": "kubernetes-dc2",
"global.secretsBackend.vault.connectCA.rootPKIPath": "connect_root",
"global.secretsBackend.vault.connectCA.intermediatePKIPath": "dc2/connect_inter",
"global.secretsBackend.vault.connectCA.additionalConfig": fmt.Sprintf(`"{"connect": [{"ca_config": [{"tls_server_name": "%s-vault"}]}]}"`, vaultReleaseName),
Copy link
Contributor

Choose a reason for hiding this comment

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

Could it be worth having a global.secretsBackend.vault.connectCA.dc value and then generating an authMethodPath and intermediatePKIPath based on that? Or would most folks want to just configure those paths themselves?

Copy link
Contributor

Choose a reason for hiding this comment

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

I realize intermediatePKIPath is already a configurable value so maybe it has to be this way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think in most cases we'd want the user to decide how these paths should be configured in their Vault. They'd have to have different intermediate paths per datacenter, but we don't want to necessarily enforce a naming convention for them.

Copy link
Contributor

Choose a reason for hiding this comment

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

ya that makes sense!

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

NICE!!

@ishustava ishustava force-pushed the ishustava/vault-wan-fed-acls branch 3 times, most recently from 3f5383c to 43f6307 Compare February 17, 2022 17:18
Base automatically changed from ishustava/vault-wan-fed-acls to main February 17, 2022 19:08
@ishustava ishustava force-pushed the ishustava/vault-wan-fed-connect-ca branch 2 times, most recently from b02ab29 to 4afdd37 Compare February 17, 2022 20:03
@ishustava ishustava force-pushed the ishustava/vault-wan-fed-connect-ca branch from 4afdd37 to 94094e2 Compare February 17, 2022 20:04
@ishustava ishustava merged commit bc68466 into main Feb 17, 2022
@ishustava ishustava deleted the ishustava/vault-wan-fed-connect-ca branch February 17, 2022 21:06
@jmurret jmurret added the vault label Mar 24, 2022
geobeau pushed a commit to geobeau/consul-k8s that referenced this pull request May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants