-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add support to automate external auth config for ldap #19228
Conversation
@miq-bot add_label enhancement |
I've addressed most all of the rubocop warnings They are also not easily avoidable. |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1745775 Add config spec test
Update the main entry point Fix one missed update from u to user Dry PROGRAM_NAME == __FILE__ Move action assignment
877701b
to
522dcab
Compare
@abellotti During our code walkthrough, you pointed out that the To address this I added the new element, I also realized that I needed to update Thank you again for reviewing this! |
Some comments on commits jvlcek/manageiq@6e05a3d~...4efc07e spec/tools/miq_config_sssd_ldap/configure_appliance_settings_spec.rb
tools/miq_config_sssd_ldap/auth_template_files.rb
|
Checked commits jvlcek/manageiq@6e05a3d~...4efc07e with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 tools/miq_config_sssd_ldap.rb
tools/miq_config_sssd_ldap/cli_config.rb
|
@gtanzillo or @abellotti All changes discussed have been made. Please merge. |
Thanks @jvlcek for updating this. LGTM!! 👍 |
Currently the process of configuring an appliance for external authentication with
LDAP is a manual one.
This document describes the process: http://manageiq.org/docs/reference/latest/auth/ldap
This pull request will automate the manual steps outlined in that document for
a fresh ManageIQ appliance that has never been configured for authentication.
This pull request leverages the existing miqldap_to_sssd code that can be used to
convert a ManageIQ appliance that had been configured to use the MiqLdap client
for authentication and authorization, i.e. Mode: LDAP(S). The usage for the
existing MiqLdap To SSSD conversion tool is documented here:
http://manageiq.org/blog/2017/09/miqldap-to-sssd/
Similar documentation will be coming to describe the new fresh configuration functionality
introduced in the pull request.
Two major changes are being made to the existing miqldap_to_sssd code base to
support the new functionality introduced by this PR.
The current miqldap_to_sssd code base relies on much of the needed LDAP configuration
already being available in the ManageIQ database Settings.authentication table.
This needed data will not be available there for a ManageIQ appliance that has not
yet been configured for authentication. So this data must be passed on the command line.
To enable this new command line functionality the current Cli#parse method is being
moved into a new subclass CliConvert, with a second new subclass CliConfig being
added.
With this new functionality being introduced the name miqldap_to_sssd is no longer
accurate, as that is only half of what this code base is being used for. To address
this miqldap_to_sssd is being renamed to miq_config_sssd_ldap
One other pull request in the manageiq-appliance repo will accompany this pull request. It will update the associated executables
used to invoke this code base from the command line.
PR number will be published once available
Links [Optional]
Steps for Testing/QA
Two separate tests should be performed.
Test 1 Confirm existing functionality using the miqldap_to_sssd command
documentation to:
Test 2 Exercise the new functionality using the new miq_config_sssd command
For example: