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

Role/group restrictions using OpenID #300

Open
rinshadka opened this issue Nov 28, 2022 · 1 comment
Open

Role/group restrictions using OpenID #300

rinshadka opened this issue Nov 28, 2022 · 1 comment

Comments

@rinshadka
Copy link

rinshadka commented Nov 28, 2022

HI,

I have tried server CE and used the OpenID authentication setup using a Keycloak service and was successfully able to implement authentication for all the users in my keycloak Realm. Actually I wanted to allow login support for users having a particular role or users which comes under a particular group. I couldn't find a configuration for those extra filtering. Used below config options:-

  "auth": {
    "sessionSecret": "",
    "openId": {
      "realm": "https://my-keycloak-url.com/auth/realms/xxxxx",
      "clientId": "my id",
      "clientSecret": "my secret"
    }
  },

Thanks.

@eatonphil
Copy link
Member

Good question! This does not exist yet but I'd be open to a pull request that changes server/auth.ts to do this.

I think what would need to happen is that both the groups you wish to restrict to would need to be a config option, and the scope name to request/key by would need to be configurable too since I don't think there's a standard name for a group scope.

So for example the new auth config might be:

 "auth": {
    "sessionSecret": "",
    "openId": {
      "realm": "https://my-keycloak-url.com/auth/realms/xxxxx",
      "clientId": "my id",
      "clientSecret": "my secret",
      "groups": {
        "scopeName": "roles",
        "names": ["group 1", "group 2"]
      },
    }
  },

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

No branches or pull requests

2 participants