Skip to content
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

Check for SLE Micro and SUMa headers to grant access #1246

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jesusbv
Copy link
Collaborator

@jesusbv jesusbv commented Nov 12, 2024

Description

SUMA 5.0 is based on SLE Micro, to access older SUMA versions we are using new headers present in the request to grant access to SUMA 4.X repositories

How to test

Activate SUMA 4.3 from SUMA 5.0 UI, it should get access to SUMA 4.3

Change Type

Please select the correct option.

  • Bug Fix (a non-breaking change which fixes an issue)
  • New Feature (a non-breaking change which adds new functionality)
  • Documentation Update (a change which only updates documentation)

Checklist

Please check off each item if the requirement is met.

  • I have reviewed my own code and believe that it's ready for an external review.
  • I have provided comments for any hard-to-understand code.
  • I have documented the MANUAL.md file with any changes to the user experience.
  • If my changes are non-trivial, I have added a changelog entry to notify users at package/obs/rmt-server.changes.

Review

Please check out our review guidelines
and get in touch with the author to get a shared understanding of the change.

@jesusbv jesusbv self-assigned this Nov 12, 2024
SUMA 5.0 is based on SLE Micro, to access older SUMA versions
we are using new headers present in the request to grant access
to SUMA 4.X repositories
# SUMA 5.0 must have access to SUMA 4.3, 4.2 and so on
micro = p.identifier.downcase.include?('sle-micro')
instance_id_header = headers.fetch('X-Instance-Identifier', '').casecmp('suse-manager-server').zero?
instance_version_header = headers.fetch('X-Instance-Version', '') == '5.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjmateus will SUMa always send the 5.0 version identifier even when we move to 5.1, 5.2 etc.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should/will send in future the real suma version. So yes, 5.1, 5.2, ... might be there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Michael said, that is the goal. I even change the version to 5.1 in our upstream project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jesusbv per comment from SUMa team the version check needs to be different, could be a > check.

@rjschwei rjschwei self-requested a review November 14, 2024 11:18
# SUMA 5.0 must have access to SUMA 4.3, 4.2 and so on
micro = p.identifier.downcase.include?('sle-micro')
instance_id_header = headers.fetch('X-Instance-Identifier', '').casecmp('suse-manager-server').zero?
instance_version_header = headers.fetch('X-Instance-Version', '') == '5.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jesusbv per comment from SUMa team the version check needs to be different, could be a > check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants