Bug 1385843 - apache denies to serve repodata: "Got a GET call, but auth_client declined" on /GET-REQ/<channel>/repodata/repomd.xml
Summary: apache denies to serve repodata: "Got a GET call, but auth_client declined" o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Patrik Segedy
URL:
Whiteboard:
Depends On:
Blocks: 1340444
TreeView+ depends on / blocked
 
Reported: 2016-10-17 19:19 UTC by Jan Hutař
Modified: 2017-06-21 12:16 UTC (History)
6 users (show)

Fixed In Version: spacewalk-backend-2.5.3-22-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:16:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Hutař 2016-10-17 19:19:24 UTC
Description of problem:
I have clean installation of latest 5.8.0 compose and RHEL 7 client and Apache denies to serve repodata: "Got a GET call, but auth_client declined" on /GET-REQ/<channel>/repodata/repomd.xml


Version-Release number of selected component (if applicable):
Server: spacewalk-backend-2.5.3-15.el6sat.noarch
Client: yum-rhn-plugin-2.0.1-5.el7.noarch


How reproducible:
probably always (seen on more independent installs)


Steps to Reproduce:
1. Install 5.8.0 with embedded PostgreSQL
2. Sync some channels, let taskomatic generate repodata, verify they exists in
   /var/cache/rhn/repodata/<channel>/
3. Register client and attempt to get repodata


Actual results:
Client reports 0 packages in channel, this is in the error log multiple times:

[Mon Oct 17 15:11:12 2016] [error] Spacewalk 24181 2016/10/17 15:11:12 -04:00: ('Got a GET call, but auth_client declined', '/GET-REQ/rhel-x86_64-server-7/repodata/repomd.xml')


Expected results:
Client should show correct number of packages in channel.

Comment 1 Jan Hutař 2016-10-17 19:24:06 UTC
I have altered (added that "print") auth_client function code to get more info on whats wrong and authentication process fails here:

    token = rhnFlags.get("AUTH_SESSION_TOKEN")
    print ">>>>>>>>>", token
    # Check to see if everything we need to compute the signature is there
    for k in ('X-RHN-Server-Id',
              'X-RHN-Auth',
              'X-RHN-Auth-Server-Time',
              'X-RHN-Auth-Expire-Offset'):
        if k not in token:
            # No auth information; decline any action
            log_debug(4, "Declined auth of client for GET requests; "
                         "incomplete header info.")
            return 0

After `service httpd reload` on server and `yum clean all; yum repolist` on client I got this:

[Mon Oct 17 15:23:08 2016] [error] >>>>>>>>> {'x-rhn-auth-user-id': '', 'x-rhn-auth-server-time': '1476732187.59', 'x-rhn-auth': 'CXmIzThGTr83gkAlh9jRBoDVzvlIJuIB5X4B+aP1hY0=', 'x-rhn-auth-expire-offset': '3600.0', 'x-rhn-server-id': '1000010000'}
[Mon Oct 17 15:23:08 2016] [error] Spacewalk 24375 2016/10/17 15:23:08 -04:00: ('Got a GET call, but auth_client declined', '/GET-REQ/rhel-x86_64-server-7/repodata/repomd.xml')

Looks like headers gets to the function in lower-case only :-/

Comment 3 Tomáš Kašpárek 2016-10-19 11:45:56 UTC
spacewalk.git(master):
aeb9a3a5f4ab5c1d6946d920d29704781046aa87
1f6e9cfb5bdd0cc53f25520a422c864ea7f0e795

Comment 8 Tomáš Kašpárek 2016-10-25 14:13:38 UTC
spacewalk.git(master): ec87f006acd3e6f62f6e7663a641093dbdc588a8


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