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

Auto-generate an "asset_name" to uniquely represent certificates when installed on hosting devices #54

Open
tr1ck3r opened this issue May 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@tr1ck3r
Copy link
Member

tr1ck3r commented May 14, 2021

BUSINESS PROBLEM
In order to fully the support the certificate renewal use case for some pull provisioning targets like F5 an "asset name" is needed that is effectively unique while also meaningful to a person (i.e. a UUID will not suffice). The standard TPP naming convention for this has worked well but is based on attributes of the certificate and those attributes aren't readily available to Terraform (namely the Valid To and Serial Number).

PROPOSED SOLUTION
I believe the need would be addressed if the venafi_certificate resource was enhanced to include an asset_name property that gets automatically populated by terraform apply whenever a new certificate is enrolled. The naming convention should be as follows:

If the certificate has a common name:

{Common Name}_{Last 4 chars of Serial Number}_{Valid To UTC date as YYMMDD}

If the certificate has no common name but has at least one DNS SAN:

{any DNS SAN}_{Last 4 chars of Serial Number}_{Valid To UTC date as YYMMDD}

If the certificate has no common name or DNS SANs:

{Serial Number}_{Valid To UTC date as YYMMDD}

e.g. "www.company.com_a9f0_220514" or "450000b51360f9ccaabc8c9a5600020000b513_220514"

CURRENT ALTERNATIVES
Generate a context-less random ID that is not meaningful to a person looking at the results on their hosting devices. More difficult to troubleshoot or validate that processes are working as intended.

VENAFI EXPERIENCE
Lots and lots 😃

@tr1ck3r tr1ck3r added the enhancement New feature or request label May 14, 2021
@tr1ck3r tr1ck3r changed the title Auto-generate a "asset_name" to uniquely represent certificates when installed on hosting devices Auto-generate an "asset_name" to uniquely represent certificates when installed on hosting devices May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant