Skip to content

Support Arbitrary User IDs for OpenShift #787

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

Merged
merged 1 commit into from
Sep 15, 2018

Conversation

torstenwalter
Copy link
Contributor

To quote from the official OpenShift documentation:

By default, OpenShift Container Platform runs containers using an arbitrarily assigned user ID. This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node.

For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group. Files to be executed should also have group execute permissions.

With this change it should be possible to run the Selenium images on OpenShift without further modifications.

To quote from the official [OpenShift documentation](https://docs.openshift.com/container-platform/3.9/creating_images/guidelines.html):

> By default, OpenShift Container Platform runs containers using an arbitrarily assigned user ID. This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node.

> For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group. Files to be executed should also have group execute permissions.

With this change it should be possible to run the Selenium images on OpenShift without further modifications.
@ddavison
Copy link
Member

@torstenwalter
Copy link
Contributor Author

torstenwalter commented Sep 13, 2018

Compared to #185 it should allow users to change the config at run time.

@torstenwalter
Copy link
Contributor Author

Without the permissions change for $HOME () there will be different kinds of errors when a process tries to write/read from that directory within OpenShift. e.g.:

Couldn't read password file: /home/seluser/.vnc/passwd. Chrome tries to write data there and I suspect Firefox as well.

@diemol
Copy link
Member

diemol commented Sep 14, 2018

I think this makes sense, we had to do something similar to have things working in OpenShift for some users of it.

@diemol
Copy link
Member

diemol commented Sep 15, 2018

Thanks for your contribution @torstenwalter!

@diemol diemol merged commit 0d767d7 into SeleniumHQ:master Sep 15, 2018
diemol added a commit that referenced this pull request Oct 6, 2018
for new directories used by Supervisor. Fixes #802
diemol added a commit that referenced this pull request Oct 6, 2018
* Adding an entry_point.sh, fixes #801, fixes #800 and fixes #797

* Using same commands from #787 (Support Arbitrary User IDs for OpenShift)
for new directories used by Supervisor. Fixes #802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants