-
Notifications
You must be signed in to change notification settings - Fork 51
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 users keys as authorized keys for yumrepostage #1948
Conversation
a8437e3
to
02abd04
Compare
02abd04
to
3c29491
Compare
Based upon the design for pushing locally generated stage repository from Copr to the staging repository -- theforeman/theforeman-rel-eng#280 |
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.
Argh, I forgot to submit the review yesterday.
3c29491
to
16033b2
Compare
Switched to using keys as the naming instead of users |
0441175
to
2046338
Compare
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.
I still question about the bigger picture. This allows a user to call a script, but they're still not allowed to upload their own content. How do you plan to address this?
Explain? The goal is to allow users to rsync RPMs as the yumrepostage user to the staging repository location. |
2046338
to
87584b3
Compare
You can see it forces a command to run, which is
My reading is that it only allows the command to start with Am I missing anything? |
I do not follow where you are getting that from, but this is what Jenkins does which has no
You can see what Jenkins does here, which is what a user would be doing: Which is my goal here: https://github.com/theforeman/theforeman-rel-eng/pull/280/files#diff-75ffb578a1aa224516bbb4130ba24c902b62748edddd6c77fc637648471bb3e6 |
Perhaps internally
Which makes me think it would be good to use |
For the stage repository, we are not generating the repository and metadata on the webserver. Production and staging are handled differently and this is only targeting staging. The workflow for staging:
And a reminder stage to production is handled:
|
@evgeni @ekohl I'm blocked on any further Copr work until this and theforeman/theforeman-rel-eng#280 are merged |
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.
For the sake of my own sanity, here is how I read this:
Today, there is a set of systems (identified by the foreman_search
in stagingyum.pp
who are allowed to push to this repo. These pushes happen to a "special" rsync_cache
folder from where then the receiver script is moving them to the "correct place" after the push happened. There is no post-processing of the repo happening (contrary to, e.g. when we push to yum.tfm.o
).
This change adds a set of additional keys that are allowed to perform the same action as above (push to cache, get the cached content copied over to the real destination), without the IP address restriction. Those additional keys are taken from the users
module that is already handling our normal SSH logins.
While I think the way we configure the set of users whose keys are added could be better configurable, I wouldn't block on this to get the copr integration further.
@@ -6,6 +6,7 @@ | |||
String $user = 'yumrepostage', | |||
Stdlib::Absolutepath $home = "/home/${user}", | |||
Integer[0] $rsync_max_connections = 5, | |||
Array[String[1]] $usernames = ['ehelms', 'evgeni', 'ekohl'], |
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.
Something tells me this list should be configured somewhere else, but I guess it's good enough here for starting and testing?
No description provided.