-
Notifications
You must be signed in to change notification settings - Fork 45
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
Update Zypper auth check #1270
Update Zypper auth check #1270
Conversation
1b158b0
to
ac56301
Compare
I will add the tests and coverage but it can be reviewed in the meantime |
108e63e
to
6134577
Compare
When a hybrid system runs zypper command, the check needs to take care of the subscription verification Currently, the check lacks paid extension ID, resulting in an unsuccessful verification This change fixes that If system is hybrid, and the path being accessed belongs to a paid extension, we check that the paid extension subscription is active if the repository path belongs to a free repository or no matches with paid extensions, no need to check the subscription if ZypperAuth handle_scc_subscription method gets called without a product id, the method will check _all_ non free products suscriptions to be active, if any This fixes bsc#1230157
Add paid extension to factory Add paid product to headers
if system is either hybrid or byos, we need to check the paid extensions if the system is byos, we need to check any extension update the way we check SCC subscriptions, now we check if the subscription is active and the product matches earlier in the code
For a path to be valid, the path must be in the system products repositories if the product the repository path belongs to is not free, the product must be either included in the base product or activated on SCC, or it belongs to the base product repositories if a non free product that the path belongs to in a hybrid system, is not on SCC, we check the instance metadata to verify it is included Refactor the way path_allowed? is performed Update SCC checks to use product class This fixes LTSS activation, de-activation and keep the cache refreshing for the registry working as expected
f80bd2d
to
08e8da3
Compare
Apologies for the big commit I will add the remaining needed tests (to check cache refresh) |
this needs to be removed in a different commit
Unfortunately I don't have a good way to verify & test this. So when Robert or somebody else from the pubcloud team approved, and tests on your side show it's fixing the hybrid scenarios, it's ok for me. |
I have tested this changes in
|
Call directly to product_class_access, even if the header is empty, i.e. refreshing the cache for the registry request, using the base module is enough to get the SCC state of the subscription
Description
When a hybrid system runs zypper command, the check
needs to take care of the subscription verification
Currently, the check lacks paid extension ID, resulting in
an unsuccessful verification
This change fixes that
If system is hybrid, and the path being accessed belongs to a paid extension,
we check that the paid extension subscription is active
if the repository path belongs to a free repository or no matches with paid extensions,
no need to check the subscription
if ZypperAuth handle_scc_subscription method gets called without a product id,
the method will check all non free products suscriptions to be active, if any
This fixes bsc#1230157
How to test
Start an Azure instance, register LTSS, wait > 20 min for the cache to get expired
run
zypper ref
should workChange Type
Please select the correct option.
Checklist
Please check off each item if the requirement is met.
MANUAL.md
file with any changes to the user experience.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.