-
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
Add registry support #1094
Add registry support #1094
Conversation
Add registry engine Add login support: auth based on SCC credentials -> username + password
Currently, allow any access
Same patterns as other engines for gitignore
engines/registry/app/controllers/registry/registry_controller.rb
Outdated
Show resolved
Hide resolved
- Add cert in config/application.rb Must match the cert of the registry
config/application.rb
Outdated
File.read('/etc/rmt/ssl/rmt-server.key') | ||
) | ||
config.registry_public_key = config.registry_private_key.public_key | ||
config.access_policies = '/etc/rmt/access_policies.yml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other option is to add the path to /etc/rmt.conf
Add a check for the requested path, granting pull access if said path is allowed or denying any access it otherwise
0c95bee
to
9ad9503
Compare
engines/registry/app/controllers/registry/registry_controller.rb
Outdated
Show resolved
Hide resolved
- Add nginx redirect for /v2/_catalog - Add catalog check
- Check activated products with the access policy - Add free products (free products were added recently to the yaml file) - Add rake task to refresh cache for repositories from catalog - Return full path from catalog
I think it's fine as long as it's been proven to work with both |
Separate config is preferable, that allows a 3rd party that doesn't want to run the registry to not install the config and then the paths are not available. |
I'm withdrawing my objection here - as |
Well, the problem is around search. Because we want to emulate the behavior of SCC, where the With one config file, the |
OK, thanks for the the details, then we are stuck with one config. But thta also means we should have 1 config, i.e. the existing config file should change rather than adding a new one. |
- Redirect to RMT server on NGINX conf - Update config routes on RMT for Registry engine
3c9d52c
to
e616e17
Compare
- Free repos are not shown for registry-ec2
- Check that the engine is defined
5b18dca
to
73721aa
Compare
Fix Rubocop offenses too
8b67f2b
to
7c96808
Compare
What's missing, I think, is the cache handling. We had agreed that clients that access the registry have a longer TTL than access to the repositories. Anyway, that change should come in a separate PR. This PR is big enough as it is and we have not made the desired timely progress in getting it merged. |
Yes, agreed, this needs to be in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some magic strings in the code, but we can work on moving them out in subsequent PRs. That this is working, has a reliable config, and test coverage is good enough. Let's get rolling.
hash['iss'] = 'RMT' # "matching issuer in registry auth token config" | ||
hash['sub'] = @account | ||
hash['aud'] = @service | ||
hash['exp'] = Time.now.getlocal.to_i + (5 * 60) # expires at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the spec, this needs to default to 8 hours, and be configurable server side. We'll add that in a subsequent PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwh42 sounds like we should implement the 8h default in SCC, too then?
Agree, yes, cache is not on this PR, and it should go on a different PR |
Description
Add registry support to RMT
Change Type
Please select the correct option.
Checklist
Please check off each item if the requirement is met.
rubocop
.MANUAL.md
file with any changes to the user experience.package/obs/rmt-server.changes
.Other Notes
Please use this space to provide notes or thoughts to the team, such as tips on how to review/demo your changes.