Skip to content

load_roles referencing users and groups: not found users are created, not found groups cause errors - is it wanted behavior? #3622

@consideRatio

Description

@consideRatio

I was surprised that users were automatically created without a warning, but groups not found caused an error. I think it could be okay, but I'm not sure and wanted to raise it for a consideration - is there something we want to change about this?

c.JupyterHub.load_roles = [
    {
        "name": "test-role-1:",
        "description": "Access to users' information and group membership",
        "scopes": ["users", "groups"],
        "users": ["cyclops", "gandalf"],
        "services": ["test"],
        # adding a group not defined would raise an error
        # there is a load_groups function but not a load_users function though
        "groups": [],
    }
]
[I 2021-09-26 01:03:16.454 JupyterHub app:2095] Found unexisting users gandalf in role definition test-role-1
[I 2021-09-26 01:03:16.455 JupyterHub app:1963] Creating user gandalf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions