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

chef_client_trusted_certificate forces all file names to end in '.pem' #723

Open
ghost opened this issue Feb 2, 2021 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Feb 2, 2021

The issue here is that chef-client downloads the Chef Server trusted certs as .crt files when a bootstrap is performed. This means that trying to use this resource to remove those certificates does not work, because you end up with a file name ending in '.crt.pem' and chef-client doesn't find the file to remove it.

The readme also says "(and .pem appended if necessary)", which I interpreted as meaning that if it found an extention (such as .crt that it would not add .pem and is not the case. It would be better to say "(and .pem appended unless already ending in .pem)" if that is really what is desired from in resource.

Proposed options are;

  1. do not add .pem if it already ends in .crt (like it already does if it ends in .pem)
  2. add a new parameter for the file name ending and default it to .crt
  3. add a new parameter for the file name ending and default it to .pem (because of the above, consider 2 instead of this)
@ghost
Copy link
Author

ghost commented Feb 2, 2021

After creating this issue, I found that although "my" configuration creates these files with a .crt extension, others may be creating them with .pem. However, since chef-client reads all files with either of these extensions, I still feel that it needs to support both of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

0 participants