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

Fixes #36463 - Authenticate to custom cdn using product certs #10597

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

ianballou
Copy link
Member

What are the changes introduced in this pull request?

Adds a custom_cdn_auth_enabled flag to the organizations API so that a custom cdn configuration can optionally apply product certs + keys for authentication.

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Change the org's CDN configuration to be:
  1. Using hammer or the API: hammer organization configure-cdn --custom-cdn-auth-enabled=true --id 1 --type custom_cdn

  2. Try to enable and sync a red hat repository

@theforeman-bot
Copy link

Issues: #36463

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Code looks fine, I was able to enable a repo after setting the custom cdn to the URL and using the cert katello/ca/redhat-uep.pem:

Screenshot 2023-06-16 at 14-37-28 Subscriptions

I am getting a sync error though:

403, message='Forbidden', url=URL('https://ru-by-exceptions.cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-client/6/os')

Pulled a fresh 6.13 manifest from the customer portal that someone made so it should be current, changing back to the RH CDN I was able to enable and sync a repo like normal.

@ianballou
Copy link
Member Author

@chris1984 I cannot sync content either, I wonder if it's because we do not have access by default to ru-by-exceptions (since we need an exception I guess). I'll have to ask around about how to test it.

@ianballou
Copy link
Member Author

@chris1984 can you try syncing a more "mainstream" repo like RHEL 8 BaseOS? That I can sync. I wonder if there are a very limited set of repositories that can be synced using that CDN URL.

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

That worked, was able to sync.

@ianballou ianballou merged commit 3cb9f1a into Katello:master Jun 20, 2023
5 checks passed
@ianballou ianballou deleted the 36463-custom-cdn-auth branch June 20, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants