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

cert-puller tries to install certs no longer listed in .conf file #7

Open
dlangille opened this issue Dec 18, 2019 · 3 comments
Open

Comments

@dlangille
Copy link
Owner

dlangille commented Dec 18, 2019

Downloaded certs are stored in /var/db/anvil (or DOWNLOAD_DIR).

If you remove a cert from the .conf file, cert-puller will no longer attempt to fetch that cert.

When modifying the .conf file, best practice is to run cert-puller -s and use the output to update the sudoers file (on FreeBSD, via visudo).

However, the removed cert is stashed in DOWNLOAD_DIR and you'll get sudo errors when cert-puller attempts to install that cert, because it's in DOWNLOAD_DIR

Two solutions:

  1. clear DOWNLOAD_DIR upon startup

  2. use the list of configured certs to walk through DOWNLOAD_DIR contents finding stuff to install.

Either should work.

The clear option starts with a fresh slate. At present, cert-puller never deletes anything in that directory. A delete will be safe because this is running as non-root.

The .conf file solution is clean because then the fetch and the install both use the same source and ignores what is on disk.

@dlangille
Copy link
Owner Author

The current solution to this problem: remove the errant cert from /var/db/anvil

@dlangille
Copy link
Owner Author

This hit me again today and I spent about 20 minutes trying to find my configuration error. :/

@dlangille
Copy link
Owner Author

dlangille commented Feb 12, 2021

I think DOWNLOADDIR should be changed to ~anvil/downloads.

After a run, delete what is in that directory.

I know I have done an su -l anvil to debug issues. This created a .bash_history file which anvil then attempted to in the certs directory. Let's not do that again. ;)

I say installed because sudo permissions prevented that.

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

No branches or pull requests

1 participant