diff options
author | 2023-02-25 17:37:39 +0100 | |
---|---|---|
committer | 2023-02-25 16:37:39 +0000 | |
commit | 9cfb69f75d3eb422e61de14d5090ea96d541bae9 (patch) | |
tree | 7ad1093ddee3d336f6b87ba1f408fdbf3d49d8a6 /example | |
parent | [feature] Client API endpoints + v. basic web view for pinned posts (#1547) (diff) | |
download | gotosocial-9cfb69f75d3eb422e61de14d5090ea96d541bae9.tar.xz |
[feature] Make OIDC admin groups configurable (#1555)
This removes the current default of checking for membership of the admin
or admins group and makes it required to explicitly configure which
groups should grant admin access, if any.
Relying on the implicit default of admin or admins is potentially
dangerous as that group may contain a different subset of people that we
may wish to grant admin access to GtS. This is probably not an issue for
a single-person instance, but for a community instance different admin
groups may exist in an OIDC provider for different applications.
I'm explicitly opting for not defaulting the value of oidc-admin-groups
to admin,admins because I think it's better for those things to be
explicitly configured.
Diffstat (limited to 'example')
-rw-r--r-- | example/config.yaml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/example/config.yaml b/example/config.yaml index 2fab24ab8..2239e0ba6 100644 --- a/example/config.yaml +++ b/example/config.yaml @@ -616,7 +616,7 @@ oidc-client-secret: "" # Array of string. Scopes to request from the OIDC provider. The returned values will be used to # populate users created in GtS as a result of the authentication flow. 'openid' and 'email' are required. # 'profile' is used to extract a username for the newly created user. -# 'groups' is optional and can be used to determine if a user is an admin (if they're in the group 'admin' or 'admins'). +# 'groups' is optional and can be used to determine if a user is an admin based on oidc-admin-groups. # Examples: See eg., https://auth0.com/docs/scopes/openid-connect-scopes # Default: ["openid", "email", "profile", "groups"] oidc-scopes: @@ -632,6 +632,11 @@ oidc-scopes: # Default: false oidc-link-existing: false +# Array of string. If the returned ID token contains a 'groups' claim that matches one of the +# groups in oidc-admin-groups, then this user will be granted admin rights on the GtS instance +# Default: [] +oidc-admin-groups: [] + ####################### ##### SMTP CONFIG ##### ####################### |