phive icon indicating copy to clipboard operation
phive copied to clipboard

Added option to skip signature verification

Open ricardoboss opened this issue 2 years ago • 7 comments

My use case for this is running phive in a CI pipeline. I want to be able to install PHARs without user interaction and with already known versions.

ricardoboss avatar Jan 19 '22 15:01 ricardoboss

I'm not convinced I like this option. Let me try to explain:

  • While in the end it of course is the user's/admin's choice, generally offering a means to do insecure things should be avoided
  • The very purpose of phive is to download and verify the signatures before using things
  • It appears to me that your main reason for this change is a lack of a means to interactively confirm a key rather than really wanting to skip the verification
    • If that is correct:
      • For the time being, you could be using --trust-gpg-keys and list the trusted key-ids or fingerprints
      • You could also keep the ~/.phive directory with a previously loaded gpg key ring, containing all trusted key
      • In the hopefully not so distant future, trusted keys can and should be configurable with phive

theseer avatar Jan 19 '22 15:01 theseer

I understand and support your position. On the other hand, I also think it is more important to leave the choice to the user.

My current solution is to add trusted keys via --trust-gpg-keys, but this isn't a long term solution. Checking in ~/.phive with already trusted keys sounds like a reasonable solution.

Anyhow, I think this flag should exist, just in case one quickly needs to test something without user interaction. I'd rather have the choice than being constrained by my tools for "security reasons".

ricardoboss avatar Jan 19 '22 15:01 ricardoboss

I'd also be in for a refactoring (something along the lines of --skip-key-verification-yes-i-know-what-im-doing) and/or a warning message being emitted to draw attention to the fact that what the user is doing could be a bad idea.

ricardoboss avatar Jan 19 '22 15:01 ricardoboss

I'll think about it some more :) Appreciate the work either way!

theseer avatar Jan 19 '22 15:01 theseer

@theseer Hi, I'm currently looking through my open PRs. Have you thought about it yet? :)

ricardoboss avatar Oct 22 '22 01:10 ricardoboss

I'll try to work on phive in the upcoming days, so i'll give more feedback asap.

theseer avatar Nov 08 '22 15:11 theseer

Het @theseer, how's it going? Any news what will happen with this PR?

ricardoboss avatar Feb 21 '23 13:02 ricardoboss