-
Notifications
You must be signed in to change notification settings - Fork 115
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
effective user with non-ascii password #13840
effective user with non-ascii password #13840
Conversation
trigger: test-robottelo |
local result against patched stream
|
trigger: test-robottelo |
moving to draft until the tested changes appear in stream |
""" | ||
client = rex_contenthost | ||
# create a user on client via remote job | ||
username = gen_string('alpha') | ||
password = gen_string('cjk') |
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.
password = gen_string('cjk') | |
password = gen_string('alpha') |
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 covered bz 2258968 asks for using something nonASCII as a password...
@@ -187,6 +190,7 @@ def test_positive_run_job_effective_user(self, rex_contenthost, module_target_sa | |||
'inputs': f"command=touch /home/{username}/{filename}", | |||
'search-query': f"name ~ {client.hostname}", | |||
'effective-user': f'{username}', | |||
'effective-user-password': f'{password}', |
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.
Here, rex_contenthost is already registered with GR method which configures REX as default for root user with ssh-key based auth, so just wondering if we could add some assertions here to verify if the file is created by an effective user only, like file owner or group owner, wdyt?
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.
Hi, I believe I'm doing that few lines bellow for user, I added a check for group as well.
filename = gen_string('alpha') | ||
make_user_job = module_target_sat.cli_factory.job_invocation( | ||
{ | ||
'job-template': 'Run Command - Script Default', | ||
'inputs': f"command=useradd -m {username}", | ||
'inputs': f"command=useradd -m {username} -p {password} -G wheel", |
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.
Given running a job worked previously without the password specified (Using sudo?), are we positive that the password is really being used in this new version?
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 made some changes to reduce the possibility of secret sudo, but the only way I could find to be 100% sure is a negative assert -- running rex without pwd specified, so I added that as well
72c118d
to
291b7ec
Compare
trigger: test-robottelo |
291b7ec
to
c07ff59
Compare
Awaiting stream snap 51, at theat point we should get passing prt |
trigger: test-robottelo |
PRT Result
|
c07ff59
to
571ac93
Compare
571ac93
to
7645dc8
Compare
trigger: test-robottelo |
PRT Result
|
@lhellebr @Gauravtalreja1 prt now passing, re-review welcome |
7645dc8
to
5fe8212
Compare
trigger: test-robottelo |
PRT Result
|
prt passed but some urelated problem made robotelo-runner status red, discusedd in automation channel. Retriggering prt in hope that all will be well again |
trigger: test-robottelo |
PRT Result
|
5fe8212
to
b5a3fca
Compare
(cherry picked from commit 1e68738)
Problem Statement
covers bz# 2258968
Solution
testing rex with effective user with non-ascii password