mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
LDAP: Add skip_org_role_sync
configuration option (#56679)
* LDAP: Add skip_org_role_sync option * Document the new config option * Nit on docs * Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> * Docs suggestions Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Jguer <joao.guerreiro@grafana.com> * Add test, Fix disabled user when no role Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Jguer <joao.guerreiro@grafana.com>
This commit is contained in:
@ -28,7 +28,7 @@ This means that you should be able to configure LDAP integration using any compl
|
||||
In order to use LDAP integration you'll first need to enable LDAP in the [main config file]({{< relref "../../configure-grafana/" >}}) as well as specify the path to the LDAP
|
||||
specific configuration file (default: `/etc/grafana/ldap.toml`).
|
||||
|
||||
```bash
|
||||
```ini
|
||||
[auth.ldap]
|
||||
# Set to `true` to enable LDAP integration (default: `false`)
|
||||
enabled = true
|
||||
@ -36,11 +36,32 @@ enabled = true
|
||||
# Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`)
|
||||
config_file = /etc/grafana/ldap.toml
|
||||
|
||||
# Allow sign up should almost always be true (default) to allow new Grafana users to be created (if LDAP authentication is ok). If set to
|
||||
# false only pre-existing Grafana users will be able to login (if LDAP authentication is ok).
|
||||
# Allow sign-up should be `true` (default) to allow Grafana to create users on successful LDAP authentication.
|
||||
# If set to `false` only already existing Grafana users will be able to login.
|
||||
allow_sign_up = true
|
||||
```
|
||||
|
||||
## Disable org role synchronization
|
||||
|
||||
If you use LDAP to authenticate users but don't use role mapping, and prefer to manually assign organizations
|
||||
and roles, you can use the `skip_org_role_sync` configuration option.
|
||||
|
||||
```ini
|
||||
[auth.ldap]
|
||||
# Set to `true` to enable LDAP integration (default: `false`)
|
||||
enabled = true
|
||||
|
||||
# Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`)
|
||||
config_file = /etc/grafana/ldap.toml
|
||||
|
||||
# Allow sign-up should be `true` (default) to allow Grafana to create users on successful LDAP authentication.
|
||||
# If set to `false` only already existing Grafana users will be able to login.
|
||||
allow_sign_up = true
|
||||
|
||||
# Prevent synchronizing ldap users organization roles
|
||||
skip_org_role_sync = true
|
||||
```
|
||||
|
||||
## Grafana LDAP Configuration
|
||||
|
||||
Depending on which LDAP server you're using and how that's configured your Grafana LDAP configuration may vary.
|
||||
|
Reference in New Issue
Block a user