Bug #21175

Unable to add AD LDAP Auth Source

Added by Tomáš Strachota 7 months ago. Updated 6 months ago.

Status:Closed
Priority:High
Assigned To:Tomáš Strachota
Category:Authentication
Target version:-
Difficulty: Bugzilla link:1496950
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4885
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1496950

Description of problem:
Unable to add AD LDAP Authentication Source

WEBUI:
Trying to add "AD LDAP Authentication Source" results in "no error".

CLI:

hammer -u admin -p changeme auth-source ldap create --account foobar --account-password Xyz@123 --attr-firstname givenName --attr-login sAMAccountName --attr-lastname sn --attr-mail mail --base-dn "cn=Users,dc=satqe,dc=redhat,dc=com" --groups-base "cn=foobargroup,dc=satqe,dc=redhat,dc=com" --onthefly-register true --name win10452 --organization-ids 1 --location-ids 2 --port 389 --server-type active_directory --tls false --usergroup-sync true --host 10.xx.yy.zz .
Could not create the Auth Source:
  resource have no errors

How reproducible:

When try to create only "AD LDAP Auth Source".
Creating "IPA LDAP Auth Source" works fine.
Trying to create "AD LDAP Auth Source" via the same hammer-cli command on a sat6.2 setup works.

Actual results:

Fails to save the "AD LDAP Auth Source".

production.log throws the below output, when run via WEBUI:

2017-09-28 14:11:00 4c241c2b [app] [I] Current user: admin (administrator)
2017-09-28 14:11:00 4c241c2b [app] [I] Failed to save: 
2017-09-28 14:11:00 4c241c2b [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb (9.7ms)
2017-09-28 14:11:00 4c241c2b [app] [I]   Rendered auth_source_ldaps/_form.html.erb (28.2ms)
2017-09-28 14:11:00 4c241c2b [app] [I]   Rendered auth_source_ldaps/new.html.erb (29.0ms)
2017-09-28 14:11:00 4c241c2b [app] [I] Completed 200 OK in 66ms (Views: 28.4ms | ActiveRecord: 5.9ms)

production.log throws the below output, when run via CLI:

2017-09-28 15:27:14 e2915bdb [app] [I] Current user: foreman_admin (administrator)
2017-09-28 15:27:14 e2915bdb [app] [I] Authorized user admin(Admin User)
2017-09-28 15:27:14 e2915bdb [app] [I] Current user: admin (administrator)
2017-09-28 15:27:14 e2915bdb [app] [W] Action failed
 | RuntimeError: resource have no errors
 | /usr/share/foreman/app/controllers/api/base_controller.rb:124:in `process_resource_error'
 | /usr/share/foreman/app/controllers/api/base_controller.rb:144:in `process_response'
 | /usr/share/foreman/app/controllers/api/v2/auth_source_ldaps_controller.rb:60:in `create'

Expected results:

We should be able to save the "AD LDAP Auth Source".


Related issues

Related to Foreman - Feature #16112: Netgroup LDAP Authentication in ldap_fluff Closed 08/15/2016
Related to Foreman - Bug #21300: LDAP Authentication doesn't work for Foreman 1.16 RC1 Duplicate 10/11/2017

Associated revisions

Revision 6583c13f
Added by Tomas Strachota 7 months ago

Fixes #21175 - Unable to add AD LDAP Auth Source

History

#1 Updated by Tomáš Strachota 7 months ago

  • Subject changed from Unable to add AD LDAP Auth Source to Unable to add AD LDAP Auth Source
  • Category set to Authentication
  • Status changed from New to Assigned
  • Assigned To set to Tomáš Strachota
  • Priority changed from Normal to High

#2 Updated by The Foreman Bot 7 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4885 added

#3 Updated by Anonymous 7 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Marek Hulán 6 months ago

  • Related to Feature #16112: Netgroup LDAP Authentication in ldap_fluff added

#5 Updated by Marek Hulán 6 months ago

  • Release set to 1.16.0

#6 Updated by Marek Hulán 6 months ago

  • Related to Bug #21300: LDAP Authentication doesn't work for Foreman 1.16 RC1 added

Also available in: Atom PDF