Description of problem: Calling /users/<user_id>/sshpublickeys does not return stored ssh keys for non admin user, but for admin user. Version-Release number of selected component (if applicable): ovirt-engine-restapi-4.2.6-0.1.el7ev.noarch How reproducible: always Steps to Reproduce: 1. add new user to engine, set UserRole permission 2. log into VM portal 3. go to Options dialog and save public ssh key 4. ssh key is loaded in dialog also after logout/login 5. call api: curl -k -u admin@internal:password -H "Prefer: persistent-auth" https://engine/ovirt-engine/api/users/<user_id>/sshpublickeys Actual results: no ssh key returned <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ssh_public_keys/> Expected results: stored ssh key returned, e.g.: <ssh_public_keys> <ssh_public_key href="/ovirt-engine/api/users/49210e66-7c2c-4ce9-87fa-e8c3609dd8dd/sshpublickeys/e52ddd30-f6a2-4d8f-b305-1dde462870b7" id="e52ddd30-f6a2-4d8f-b305-1dde462870b7"> <content>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDN...</content> <user href="/ovirt-engine/api/users/49210e66-7c2c-4ce9-87fa-e8c3609dd8dd" id="49210e66-7c2c-4ce9-87fa-e8c3609dd8dd"/> </ssh_public_key> </ssh_public_keys> 6. log into webadmin portal as admin user 7. go to Options dialog and save public ssh key 8. call again api for the non admin user Actual results: stored ssh key for admin user is returned, instead the one for non admin user Additional info: No error in engine log. I see the ssh key in Options dialog (VM portal) and also in database for the non admin user: select p.user_id, u.username, p.ssh_public_key from user_profiles p join users u on (u.user_id = p.user_id) where u.user_id='49210e66-7c2c-4ce9-87fa-e8c3609dd8dd'; user_id | username | ssh_public_key 49210e66-7c2c-4ce9-87fa-e8c3609dd8dd | test2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYds...
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
API returns appropriate ssh keys for given user verified in ovirt-engine-restapi-4.2.6.4-0.0.master.20180822115635.gitde4f2c3.el7.noarch
QE verification bot: the bug was verified upstream