-
Notifications
You must be signed in to change notification settings - Fork 344
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
Update Venafi username/password authentication section #1618
Merged
cert-manager-prow
merged 7 commits into
cert-manager:master
from
ilyesAj:feat/update_venafi_documentation
Jan 18, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dcc7677
Update venafi.md
ilyesAj 01cc876
clarify the procedure
ilyesAj e9e14a4
update scopes
ilyesAj 8ed8ba6
fmt
ilyesAj 136bc3c
Update content/docs/configuration/venafi.md
ilyesAj 27ddbea
fix typo
ilyesAj c58cb87
fix typo
ilyesAj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,8 +151,8 @@ credentials. | |
|
||
3. [Create a new application integration](https://docs.venafi.com/Docs/24.3/TopNav/Content/API-ApplicationIntegration/t-APIAppIntegrations-creating.php) | ||
|
||
Create an application integration with name and ID `cert-manager`. | ||
Set the "Base Access Settings" to `certificate: manage,revoke`. | ||
Create an application integration with name and ID `cert-manager.io`. | ||
Set the "Base Access Settings" to `certificate: manage`. | ||
|
||
"Edit Access" to the new application integration, and allow it to be used by the user you created earlier. | ||
|
||
|
@@ -163,7 +163,7 @@ credentials. | |
--username k8s-xyz-automation \ | ||
--password somepassword \ | ||
-u https://tpp.example.com/vedsdk \ | ||
--client-id cert-manager \ | ||
--client-id cert-manager.io \ | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--scope "certificate:manage,revoke" | ||
``` | ||
|
||
|
@@ -177,43 +177,48 @@ credentials. | |
|
||
5. Save the access-token to a Secret in the Kubernetes cluster | ||
|
||
```bash | ||
$ kubectl create secret generic \ | ||
tpp-secret \ | ||
--namespace=<NAMESPACE OF YOUR ISSUER RESOURCE> \ | ||
--from-literal=access-token='YOUR_TPP_ACCESS_TOKEN' | ||
``` | ||
```bash | ||
$ kubectl create secret generic \ | ||
tpp-secret \ | ||
--namespace=<NAMESPACE OF YOUR ISSUER RESOURCE> \ | ||
--from-literal=access-token='YOUR_TPP_ACCESS_TOKEN' | ||
``` | ||
|
||
### Username / Password Authentication | ||
|
||
> ⚠️ When you supply a Venafi TPP username and password, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we should now be fine to remove this warning as API keys are old and these docs only affect current and future. So previous version users can still adhear to the warning. Please shout out if anyone things we need to keep this warning on API Keys for TPP. |
||
> cert-manager uses an older authentication method which is called "API Keys", | ||
> which has been deprecated since Venafi TPP `19.2`. | ||
> | ||
> Beginning in Venafi TPP `22.2`, "API Keys" are disabled by default. | ||
> You will need to contact Venafi customer support for a special license key which will allow you to re-enable the "API Keys" feature, | ||
> so that you can continue to use username and password authentication with cert-manager. | ||
> | ||
> In Venafi TPP `22.3`, the "API Keys" feature will be permanently removed, | ||
> and you will need to use access-token authentication instead. | ||
> | ||
> 📖 Read [Deprecated functionality from Venafi Platform](https://docs.venafi.com/22.3/deprecation-list-current) | ||
> and [Functionality Scheduled for Deprecation](https://support.venafi.com/hc/en-us/articles/115001662292) for more information. | ||
> **Note**: when using username/password authentification, cert-manager will manage the generation of access token for you . As of now we don't use refresh tokens to renew access token, Make sure that the venafi application is appropriately configured. | ||
|
||
```bash | ||
$ kubectl create secret generic \ | ||
tpp-secret \ | ||
--namespace=<NAMESPACE OF YOUR ISSUER RESOURCE> \ | ||
--from-literal=username='YOUR_TPP_USERNAME_HERE' \ | ||
--from-literal=password='YOUR_TPP_PASSWORD_HERE' | ||
``` | ||
1. Create a new user with sufficient privileges to manage certificates in a particular policy folder (zone). | ||
|
||
> Note: If you are configuring your issuer as a `ClusterIssuer` resource in | ||
> order to issue `Certificates` across your whole cluster, you must set the | ||
> `--namespace` parameter to `cert-manager`, which is the default `Cluster | ||
> Resource Namespace`. The `Cluster Resource Namespace` can be configured | ||
> through the `--cluster-resource-namespace` flag on the cert-manager controller | ||
> component. | ||
E.g. `k8s-xyz-automation` | ||
|
||
2. [Create a new application integration](https://docs.venafi.com/Docs/24.3/TopNav/Content/API-ApplicationIntegration/t-APIAppIntegrations-creating.php) | ||
|
||
Create an application integration with name and ID `cert-manager.io`. | ||
Set the "Base Access Settings" to `certificate: manage`. | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
"Edit Access" to the new application integration, and allow it to be used by the user you created earlier. | ||
|
||
3. Save the credentials to a Secret in the Kubernetes cluster | ||
|
||
```bash | ||
$ kubectl create secret generic \ | ||
tpp-secret \ | ||
--namespace=<NAMESPACE OF YOUR ISSUER RESOURCE> \ | ||
--from-literal=username='YOUR_TPP_USERNAME_HERE' \ | ||
--from-literal=password='YOUR_TPP_PASSWORD_HERE' | ||
``` | ||
|
||
|
||
> Note: By default cert-manager uses `cert-manager.io` as client ID when authentificating to venafi. You can customize this by adding `client-id` key to the secret: | ||
>```bash | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
>$ kubectl create secret generic \ | ||
> tpp-secret \ | ||
> --namespace=<NAMESPACE OF YOUR ISSUER RESOURCE> \ | ||
> --from-literal=username='YOUR_TPP_USERNAME_HERE' \ | ||
> --from-literal=password='YOUR_TPP_PASSWORD_HERE' \ | ||
> --from-literal=client-id='YOUR_TPP_CLIENT-ID_HERE' | ||
>``` | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
These credentials will be used by cert-manager to interact with your Venafi TPP | ||
instance. Username attribute must be adhere to the `<identity | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
@@ -224,6 +229,13 @@ Once the Secret containing credentials has been created, you can create your | |
resource, you must change the `kind` field to `ClusterIssuer` and remove the | ||
`metadata.namespace` field. | ||
|
||
> Note: If you are configuring your issuer as a `ClusterIssuer` resource in | ||
> order to issue `Certificates` across your whole cluster, you must set the | ||
> `--namespace` parameter to `cert-manager`, which is the default `Cluster | ||
> Resource Namespace`. The `Cluster Resource Namespace` can be configured | ||
> through the `--cluster-resource-namespace` flag on the cert-manager controller | ||
> component. | ||
ilyesAj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Save the below content after making your amendments to a file named | ||
`tpp-issuer.yaml`. | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 can't remember whether recent versions of TPP include the
cert-manager.io
API integration by default.@hawksight do you know?
If so, we can add a note to explain that this step might be optional with recent versions of TPP.
Optional: Here, or in a followup PR we should make sure we're using accurate terminology.
For example, "application integration" should be "API integration".
And "Base Access Settings" should be "Scope".
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.
It is my understanding the
cert-manager.io
API integration is standard in recent versions at least yes. We can add that in a follow up PR I think.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.
@wallrj agrees with @hawksight , we can open a followup PR on this .
Venafi has updated its terminology starting from the recent version, and we need to ensure alignment with it. However, I currently do not have the ability to instantiate Venafi test environment to check it.