{"action":"closed","issue":{"url":"https://api.github.com/repos/calpolydatascience/k8s-cluster-deploy/issues/8","repository_url":"https://api.github.com/repos/calpolydatascience/k8s-cluster-deploy","labels_url":"https://api.github.com/repos/calpolydatascience/k8s-cluster-deploy/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/calpolydatascience/k8s-cluster-deploy/issues/8/comments","events_url":"https://api.github.com/repos/calpolydatascience/k8s-cluster-deploy/issues/8/events","html_url":"https://github.com/calpolydatascience/k8s-cluster-deploy/issues/8","id":310611526,"node_id":"MDU6SXNzdWUzMTA2MTE1MjY=","number":8,"title":"Handle `root` privileges in JH instances for admins","user":{"login":"townsenddw","id":379227,"node_id":"MDQ6VXNlcjM3OTIyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/379227?v=4","gravatar_id":"","url":"https://api.github.com/users/townsenddw","html_url":"https://github.com/townsenddw","followers_url":"https://api.github.com/users/townsenddw/followers","following_url":"https://api.github.com/users/townsenddw/following{/other_user}","gists_url":"https://api.github.com/users/townsenddw/gists{/gist_id}","starred_url":"https://api.github.com/users/townsenddw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/townsenddw/subscriptions","organizations_url":"https://api.github.com/users/townsenddw/orgs","repos_url":"https://api.github.com/users/townsenddw/repos","events_url":"https://api.github.com/users/townsenddw/events{/privacy}","received_events_url":"https://api.github.com/users/townsenddw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-02T21:06:00Z","updated_at":"2018-06-11T16:37:38Z","closed_at":"2018-06-11T16:37:38Z","author_association":"MEMBER","body":"Need to figure out a better way to handle `root` privileges in JH instances:\r\n## Now:\r\n```python\r\n    from z2jh import get_config\r\n    def is_admin(spawner):\r\n      admins = get_config('auth.admin.users', [])\r\n      if spawner.user.name in admins:\r\n        return 'yes'\r\n      else:\r\n        return 'no'\r\n    c.KubeSpawner.environment.update({\r\n      \"GRANT_SUDO\": is_admin,\r\n      \"CHOWN_HOME\": 'yes'\r\n    })\r\n```\r\n## Problem:\r\nThe above does NOT use the internal users database. i.e. when you mark someone as an admin in the JH admin page, this does function does not respect that. Instead `root` users need to be defined in the namespaces `config.yaml` file. One might think that's the more appropriate way to do things."}}
{"actor":{"display_login":"townsenddw"}}