Skip to content
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

Don't use logged user when command creating a project are used #72

Closed
cmoulliard opened this issue May 9, 2018 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cmoulliard
Copy link
Member

When we create by example the infra project, our oc command is executed using the current logged user which has perhaps or not the appropriate role to create a project, configMap, serviceaccount ....

Nevertheless, if the role linked to the user is the one used, that means that he/she will be able to manage the content of the infra project. This is not an use for the admin user which is cluster wised but this is a problem for demo's users (user1, user2, ....)

To secure our platform in that case, the following parameter should be passed to the oc command when a resource is created/deleted or edited

oc --config={{ openshift.common.config_base }}/admin.kubeconfig 

where {{ openshift.common.config_base }} could be : /etc/origin/master

If we create the 'infra' project as such

- name: Create project
  command: oc --config=/etc/origin/master/admin.kubeconfig new-project {{ infra_project }}

then the user can't access content of infra folder

screenshot 2018-05-09 11 49 14

@cmoulliard cmoulliard added the enhancement New feature or request label May 9, 2018
@cmoulliard cmoulliard added this to the 3.9.SP3 milestone May 9, 2018
@cmoulliard cmoulliard assigned geoand and cmoulliard and unassigned geoand May 9, 2018
geoand added a commit that referenced this issue May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants