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
ipa-replica-install: --setup-ca and *-cert-file are mutually exclusive #4802
Conversation
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
options.pkinit_cert_files]): | ||
raise ScriptError("--setup-ca and *-cert-file options are " | ||
"mutually exclusive") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've move this to the very top of the function. There is no point in doing all the other work without being able to move forward with the installation.
This actually tries to do an installation and fails:
# ipa-replica-install --setup-ca --http-cert-file=/tmp/foo --dirsrv-cert-file=/tmp/foo --no-pkinit
Configuring client side components
This program will set up FreeIPA client.
Version 4.9.0.dev202006101846+git27b2db9dc
One of password / principal / keytab is required.
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
Removing client side components
IPA client is not configured on this system.
The ipa-client-install command failed.
Your system may be partly configured.
Run /usr/sbin/ipa-server-install --uninstall to clean up.
Configuration of client side components failed!
The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, implemented in the new commit.
ipa-replica-install currently accepts both --setup-ca and *-cert-file even though the options should be mutually exclusive (either install CA-less with *-cert-file options or with a CA). Add a check enforcing the options are mutually exclusive. Fixes: https://pagure.io/freeipa/issue/8366
The options *-cert-file are used for a CA-less replica installation and are mutually exclusive with --setup-ca. Add a test for this use case. Related: https://pagure.io/freeipa/issue/8366
Changes look good. Please remove the temp commit. |
ipa-replica-install: --setup-ca and *-cert-file are mutually exclusive
ipa-replica-install currently accepts both --setup-ca and *-cert-file
even though the options should be mutually exclusive (either install
CA-less with *-cert-file options or with a CA).
Add a check enforcing the options are mutually exclusive.
Fixes: https://pagure.io/freeipa/issue/8366
ipatests: add a test for ipa-replica-install --setup-ca --http-cert-file
The options *-cert-file are used for a CA-less replica installation and
are mutually exclusive with --setup-ca.
Add a test for this use case.
Related: https://pagure.io/freeipa/issue/8366