Project

General

Profile

Bug #33618

Satellite doesn't forward the "If-Modified-Since" header for /accessible_content endpoint to Candlepin

Added by Hao Yu 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Subscriptions
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from Bug 2010138

Description of problem:
Subscription manager will send the following request to the Candlepin. This request has a "If-Modified-Since" header which is used to query if any certificate has been updated since the specified time. If no certificate has been updated, Candlepin will respond with 304 Not Modified status and empty data.

Satellite doesn't forward the header to the Candlepin causing Candlepin to return the certificate every time.
-------------------------------------
xx.xx.xx.xx - - [01/Oct/2021:17:07:39 +1000] "GET /rhsm/consumers/82b2ddaa-70ae-4ca8-9576-d8f31750caba/accessible_content HTTP/1.1" 200 6606 "-" "RHSM/1.0 (cmd=yum)"
-------------------------------------

This is causing subscription-manager to think that content access certificate has been updated on the server and then it will performs certificate and repos update locally. Because of this, subscription-manager sends a few redundant '/content-overrides' and '/release' calls to the Satellite.

Steps to Reproduce:
1. Register client to the Satellite with SCA enabled
2. Tail the foreman ssl access log

tail -f /var/log/httpd/foreman-ssl_access_ssl.log | grep "/rhsm"

3. Run yum repolist multiple times

Actual results:
Notice that '/accessible_content' api always return 200 status

Expected results:
'/accessible_content' api should return 304 Not Modified status

Associated revisions

Revision 0bbdcf78 (diff)
Added by Hao Yu 7 months ago

Fixes #33618 - Forward the 'If-Modified-Since' header to Candlepin

Revision 438351af (diff)
Added by Jonathon Turel 7 months ago

Refs #33618 - move DEFAULT_REQUEST_HEADERS into a method

History

#1 Updated by The Foreman Bot 8 months ago

  • Assignee set to Hao Yu
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9688 added

#2 Updated by Jonathon Turel 8 months ago

  • Bugzilla link set to 2010138
  • Category set to Subscriptions

#3 Updated by Ian Ballou 8 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.3.0

#4 Updated by The Foreman Bot 7 months ago

  • Fixed in Releases Katello 4.3.0 added

#5 Updated by Hao Yu 7 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/Katello/katello/pull/9737 added

Also available in: Atom PDF