Bug 1318629 - GET/POST/PUT /api/v2/auth_source_ldaps/ do not return 'groups_base' attribute
Summary: GET/POST/PUT /api/v2/auth_source_ldaps/ do not return 'groups_base' attribute
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning
Version: 6.2.0
Hardware: x86_64
OS: Linux
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 12:06 UTC by Andrii Balakhtar
Modified: 2019-04-01 20:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1318325
Environment:
Last Closed: 2016-07-27 09:07:19 UTC
Target Upstream Version:


Attachments (Terms of Use)
Nailgun output of GET/POST/PUT requests to /api/v2/auth_source_ldaps/ (2.65 KB, text/plain)
2016-03-17 12:06 UTC, Andrii Balakhtar
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 14286 None None None 2016-04-22 15:54:07 UTC
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Andrii Balakhtar 2016-03-17 12:06:39 UTC
Created attachment 1137362 [details]
Nailgun output of GET/POST/PUT requests to /api/v2/auth_source_ldaps/

+++ This bug was initially created as a clone of Bug #1318325 +++

Description of problem:
auth_source_ldaps have 'groups_base' attribute, value of which is not returned by any of POST/GET/PUT request in sat6.2.

Version-Release number of selected component (if applicable):
Satellite 6.2.0 Compose 3

How reproducible:
100%

Steps to Reproduce:
1. Issue HTTP POST request to https://sat.example.com/api/v2/auth_source_ldaps with 'groups_base' attribute set to some value (e.g. 'CN=foobargroup,DC=fortellolabs,DC=org').
2. Capture the response. Examine the JSON payload and discover that the "groups_base" attribute is not mentioned.
3. Issue HTTP GET and HTTP PUT requests to previously created auth_source_ldap. Check the "groups_base" attribute presence.

Actual results:
'groups_base' attribute is absent in GET/POST/PUT responses.

Expected results:
'groups_base' attribute is present and has correct value.

Additional info:
Similar to #1318325

Comment 3 Shimon Shtein 2016-03-20 12:56:13 UTC
Created redmine issue http://projects.theforeman.org/issues/14286 from this bug

Comment 4 Bryan Kearney 2016-03-20 14:04:46 UTC
Upstream bug component is Provisioning

Comment 5 Bryan Kearney 2016-03-21 10:04:53 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14286 has been closed
-------------
Shimon Shtein
Applied in changeset commit:6aa12560df8df0246b1a93801655bad0954e880d.

Comment 9 Roman Plevka 2016-04-03 20:05:42 UTC
VERIFIED
with Sat6.2 Snap6.1

## POST
# curl -ku 'admin:changeme' 'https://<sat6_server>/api/v2/auth_source_ldaps' -H 'Content-Type: application/json' -d '{"name":"foo","host":"bar", "groups_base":"CN=foobargroup,DC=fortellolabs,DC=org"}'
{"host":"bar","port":389,"account":null,"base_dn":null,"ldap_filter":null,"attr_login":null,"attr_firstname":null,"attr_lastname":null,"attr_mail":null,"attr_photo":null,"onthefly_register":false,"usergroup_sync":true,"tls":false,"server_type":"posix","groups_base":"CN=foobargroup,DC=fortellolabs,DC=org","created_at":"2016-04-03 19:56:47 UTC","updated_at":"2016-04-03 19:56:47 UTC","id":3,"type":"AuthSourceLdap","name":"foo","external_usergroups":[]}
## GET
# curl -ku 'admin:changeme' 'https://<sat6_server>/api/v2/auth_source_ldaps/3'
{"host":"bar","port":389,"account":null,"base_dn":null,"ldap_filter":null,"attr_login":null,"attr_firstname":null,"attr_lastname":null,"attr_mail":null,"attr_photo":null,"onthefly_register":false,"usergroup_sync":true,"tls":false,"server_type":"posix","groups_base":"CN=foobargroup,DC=fortellolabs,DC=org","created_at":"2016-04-03 19:56:47 UTC","updated_at":"2016-04-03 19:56:47 UTC","id":3,"type":"AuthSourceLdap","name":"foo","external_usergroups":[]}
## PUT
# curl -ku 'admin:changeme' 'https://<sat6_server>/api/v2/auth_source_ldaps/3' -H 'Content-Type: application/json' -d '{"id":3, "name":"foo_modified"}' -X PUT
{"host":"bar","port":389,"account":null,"base_dn":null,"ldap_filter":null,"attr_login":null,"attr_firstname":null,"attr_lastname":null,"attr_mail":null,"attr_photo":null,"onthefly_register":false,"usergroup_sync":true,"tls":false,"server_type":"posix","groups_base":"CN=foobargroup,DC=fortellolabs,DC=org","created_at":"2016-04-03 19:56:47 UTC","updated_at":"2016-04-03 20:00:31 UTC","id":3,"type":"AuthSourceLdap","name":"foo_modified","external_usergroups":[]}

Comment 11 errata-xmlrpc 2016-07-27 09:07:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1500


Note You need to log in before you can comment on or make changes to this bug.