easy-rsa
easy-rsa copied to clipboard
'init-pki' should be mutually exclusive to '--vars'
The Classical way to use easyrsa, is to have all the necessary supporting data to be present in the current working directory.
Necessary supporting data [NSD]:
easyrsascript file.openssl-easyrsa.cnffile. [NSD]vars.examplefile. [NSD]x509-typesfolder. [NSD]
This setup means running ./easyrsa directly and not a system binary in PATH. Combine that with the default PKI of ./pki and many of the configuration variables (eg. $EASYRSA_PKI) are rendered to be completely pointless .. although, this way has served its purpose very well, to date.
The Modern way, is to run easyrsa from a system location found by PATH.
easyrsa now searches common data locations for the NSD and ensures that the NSD is found and usable; And copied/promoted to the PKI, when suitable. eg. openssl-easyrsa.cnf.
The challenge then, is to find a suitable medium between the Classical way and the Modern way.
Making init-pki mutually exclusive to --vars, means that only --pki-dir can be used with init-pki. This means that initialising a new, non-default PKI must be explicitly requested.
Valid points:
-
varsreally belongs in the PKI folder because it is pertinent only to this PKI. -
$EASYRSAand$EASYRSA_PKIdo not belong invars. How canvars$EASYRSA_PKIpoint anywhere else but the same folder asvars.. ? -
$EASYRSA_OPENSSLis a little more tricky. Luckily,easyrsasourcesvarsbefore any use ofopenssl, so can remain. It is also a well documented use ofvars. -
With the preferred location of
varsbeing in the PKI, runninginit-pkiwill, by default, destroy the currentvars.. Seems to be more than a little "chicken vs egg" .. thus, this discussion. -
A global
vars, for all PKIs to be found on this system, is absurd!varsis for customising not standardising.
Feedback is welcome.
This issue aims to undo #562 (Above) and clarify how to use --vars=FILE and --pki-dir=DIR in combination with init-pki.
With the release of version 3.1.0, using --vars=file with init-pki is prohibited. (Version 3.0.9 still allows it, however)
Barring a total user disaster, this issue can be closed (soon).
#640 Has reverted back to standard behavior, --vars=file can be used with init-pki
Closed as resolved.