Liking cljdoc? Tell your friends :D

metabase.integrations.ldap


fetch-or-create-user!clj

(fetch-or-create-user! {:keys [first-name last-name email groups]} password)

Using the user-info (from find-user) get the corresponding Metabase user, creating it if necessary.

Using the `user-info` (from `find-user`) get the corresponding Metabase user, creating it if necessary.
sourceraw docstring

find-userclj

(find-user username)
(find-user conn username)

Gets user information for the supplied username.

Gets user information for the supplied username.
sourceraw docstring

ldap-attribute-emailclj

(ldap-attribute-email)
(ldap-attribute-email new-value)

Attribute to use for the users email. (usually 'mail', 'email' or 'userPrincipalName')

ldap-attribute-email is a string Setting. You can get its value by calling:

(ldap-attribute-email)

and set its value by calling:

(ldap-attribute-email <new-value>)

You can also set its value with the env var MB_LDAP_ATTRIBUTE_EMAIL.

Clear its value by calling:

(ldap-attribute-email nil)

Its default value is mail.

Attribute to use for the users email. (usually 'mail', 'email' or 'userPrincipalName')

`ldap-attribute-email` is a string Setting. You can get its value by calling:

    (ldap-attribute-email)

and set its value by calling:

    (ldap-attribute-email <new-value>)

You can also set its value with the env var `MB_LDAP_ATTRIBUTE_EMAIL`.

Clear its value by calling:

    (ldap-attribute-email nil)

Its default value is `mail`.
sourceraw docstring

ldap-attribute-firstnameclj

(ldap-attribute-firstname)
(ldap-attribute-firstname new-value)

Attribute to use for the user's first name. (usually 'givenName')

ldap-attribute-firstname is a string Setting. You can get its value by calling:

(ldap-attribute-firstname)

and set its value by calling:

(ldap-attribute-firstname <new-value>)

You can also set its value with the env var MB_LDAP_ATTRIBUTE_FIRSTNAME.

Clear its value by calling:

(ldap-attribute-firstname nil)

Its default value is givenName.

Attribute to use for the user's first name. (usually 'givenName')

`ldap-attribute-firstname` is a string Setting. You can get its value by calling:

    (ldap-attribute-firstname)

and set its value by calling:

    (ldap-attribute-firstname <new-value>)

You can also set its value with the env var `MB_LDAP_ATTRIBUTE_FIRSTNAME`.

Clear its value by calling:

    (ldap-attribute-firstname nil)

Its default value is `givenName`.
sourceraw docstring

ldap-attribute-lastnameclj

(ldap-attribute-lastname)
(ldap-attribute-lastname new-value)

Attribute to use for the user's last name. (usually 'sn')

ldap-attribute-lastname is a string Setting. You can get its value by calling:

(ldap-attribute-lastname)

and set its value by calling:

(ldap-attribute-lastname <new-value>)

You can also set its value with the env var MB_LDAP_ATTRIBUTE_LASTNAME.

Clear its value by calling:

(ldap-attribute-lastname nil)

Its default value is sn.

Attribute to use for the user's last name. (usually 'sn')

`ldap-attribute-lastname` is a string Setting. You can get its value by calling:

    (ldap-attribute-lastname)

and set its value by calling:

    (ldap-attribute-lastname <new-value>)

You can also set its value with the env var `MB_LDAP_ATTRIBUTE_LASTNAME`.

Clear its value by calling:

    (ldap-attribute-lastname nil)

Its default value is `sn`.
sourceraw docstring

ldap-bind-dnclj

(ldap-bind-dn)
(ldap-bind-dn new-value)

The Distinguished Name to bind as (if any), this user will be used to lookup information about other users.

ldap-bind-dn is a string Setting. You can get its value by calling:

(ldap-bind-dn)

and set its value by calling:

(ldap-bind-dn <new-value>)

You can also set its value with the env var MB_LDAP_BIND_DN.

Clear its value by calling:

(ldap-bind-dn nil)

Its default value is nil.

The Distinguished Name to bind as (if any), this user will be used to lookup information about other users.

`ldap-bind-dn` is a string Setting. You can get its value by calling:

    (ldap-bind-dn)

and set its value by calling:

    (ldap-bind-dn <new-value>)

You can also set its value with the env var `MB_LDAP_BIND_DN`.

Clear its value by calling:

    (ldap-bind-dn nil)

Its default value is `nil`.
sourceraw docstring

ldap-configured?clj

(ldap-configured?)

Check if LDAP is enabled and that the mandatory settings are configured.

Check if LDAP is enabled and that the mandatory settings are configured.
sourceraw docstring

ldap-enabledclj

(ldap-enabled)
(ldap-enabled new-value)

Enable LDAP authentication.

ldap-enabled is a boolean Setting. You can get its value by calling:

(ldap-enabled)

and set its value by calling:

(ldap-enabled <new-value>)

You can also set its value with the env var MB_LDAP_ENABLED.

Clear its value by calling:

(ldap-enabled nil)

Its default value is false.

Enable LDAP authentication.

`ldap-enabled` is a boolean Setting. You can get its value by calling:

    (ldap-enabled)

and set its value by calling:

    (ldap-enabled <new-value>)

You can also set its value with the env var `MB_LDAP_ENABLED`.

Clear its value by calling:

    (ldap-enabled nil)

Its default value is `false`.
sourceraw docstring

ldap-group-baseclj

(ldap-group-base)
(ldap-group-base new-value)

Search base for groups, not required if your LDAP directory provides a 'memberOf' overlay. (Will be searched recursively)

ldap-group-base is a string Setting. You can get its value by calling:

(ldap-group-base)

and set its value by calling:

(ldap-group-base <new-value>)

You can also set its value with the env var MB_LDAP_GROUP_BASE.

Clear its value by calling:

(ldap-group-base nil)

Its default value is nil.

Search base for groups, not required if your LDAP directory provides a 'memberOf' overlay. (Will be searched recursively)

`ldap-group-base` is a string Setting. You can get its value by calling:

    (ldap-group-base)

and set its value by calling:

    (ldap-group-base <new-value>)

You can also set its value with the env var `MB_LDAP_GROUP_BASE`.

Clear its value by calling:

    (ldap-group-base nil)

Its default value is `nil`.
sourceraw docstring

ldap-group-mappingsclj

(ldap-group-mappings)
(ldap-group-mappings new-value)

JSON containing LDAP to Metabase group mappings.

ldap-group-mappings is a json Setting. You can get its value by calling:

(ldap-group-mappings)

and set its value by calling:

(ldap-group-mappings <new-value>)

You can also set its value with the env var MB_LDAP_GROUP_MAPPINGS.

Clear its value by calling:

(ldap-group-mappings nil)

Its default value is {}.

JSON containing LDAP to Metabase group mappings.

`ldap-group-mappings` is a json Setting. You can get its value by calling:

    (ldap-group-mappings)

and set its value by calling:

    (ldap-group-mappings <new-value>)

You can also set its value with the env var `MB_LDAP_GROUP_MAPPINGS`.

Clear its value by calling:

    (ldap-group-mappings nil)

Its default value is `{}`.
sourceraw docstring

ldap-group-syncclj

(ldap-group-sync)
(ldap-group-sync new-value)

Enable group membership synchronization with LDAP.

ldap-group-sync is a boolean Setting. You can get its value by calling:

(ldap-group-sync)

and set its value by calling:

(ldap-group-sync <new-value>)

You can also set its value with the env var MB_LDAP_GROUP_SYNC.

Clear its value by calling:

(ldap-group-sync nil)

Its default value is false.

Enable group membership synchronization with LDAP.

`ldap-group-sync` is a boolean Setting. You can get its value by calling:

    (ldap-group-sync)

and set its value by calling:

    (ldap-group-sync <new-value>)

You can also set its value with the env var `MB_LDAP_GROUP_SYNC`.

Clear its value by calling:

    (ldap-group-sync nil)

Its default value is `false`.
sourceraw docstring

ldap-hostclj

(ldap-host)
(ldap-host new-value)

Server hostname.

ldap-host is a string Setting. You can get its value by calling:

(ldap-host)

and set its value by calling:

(ldap-host <new-value>)

You can also set its value with the env var MB_LDAP_HOST.

Clear its value by calling:

(ldap-host nil)

Its default value is nil.

Server hostname.

`ldap-host` is a string Setting. You can get its value by calling:

    (ldap-host)

and set its value by calling:

    (ldap-host <new-value>)

You can also set its value with the env var `MB_LDAP_HOST`.

Clear its value by calling:

    (ldap-host nil)

Its default value is `nil`.
sourceraw docstring

ldap-passwordclj

(ldap-password)
(ldap-password new-value)

The password to bind with for the lookup user.

ldap-password is a string Setting. You can get its value by calling:

(ldap-password)

and set its value by calling:

(ldap-password <new-value>)

You can also set its value with the env var MB_LDAP_PASSWORD.

Clear its value by calling:

(ldap-password nil)

Its default value is nil.

The password to bind with for the lookup user.

`ldap-password` is a string Setting. You can get its value by calling:

    (ldap-password)

and set its value by calling:

    (ldap-password <new-value>)

You can also set its value with the env var `MB_LDAP_PASSWORD`.

Clear its value by calling:

    (ldap-password nil)

Its default value is `nil`.
sourceraw docstring

ldap-portclj

(ldap-port)
(ldap-port new-value)

Server port, usually 389 or 636 if SSL is used.

ldap-port is a string Setting. You can get its value by calling:

(ldap-port)

and set its value by calling:

(ldap-port <new-value>)

You can also set its value with the env var MB_LDAP_PORT.

Clear its value by calling:

(ldap-port nil)

Its default value is 389.

Server port, usually 389 or 636 if SSL is used.

`ldap-port` is a string Setting. You can get its value by calling:

    (ldap-port)

and set its value by calling:

    (ldap-port <new-value>)

You can also set its value with the env var `MB_LDAP_PORT`.

Clear its value by calling:

    (ldap-port nil)

Its default value is `389`.
sourceraw docstring

ldap-securityclj

(ldap-security)
(ldap-security new-value)

Use SSL, TLS or plain text.

ldap-security is a string Setting. You can get its value by calling:

(ldap-security)

and set its value by calling:

(ldap-security <new-value>)

You can also set its value with the env var MB_LDAP_SECURITY.

Clear its value by calling:

(ldap-security nil)

Its default value is none.

Use SSL, TLS or plain text.

`ldap-security` is a string Setting. You can get its value by calling:

    (ldap-security)

and set its value by calling:

    (ldap-security <new-value>)

You can also set its value with the env var `MB_LDAP_SECURITY`.

Clear its value by calling:

    (ldap-security nil)

Its default value is `none`.
sourceraw docstring

ldap-user-baseclj

(ldap-user-base)
(ldap-user-base new-value)

Search base for users. (Will be searched recursively)

ldap-user-base is a string Setting. You can get its value by calling:

(ldap-user-base)

and set its value by calling:

(ldap-user-base <new-value>)

You can also set its value with the env var MB_LDAP_USER_BASE.

Clear its value by calling:

(ldap-user-base nil)

Its default value is nil.

Search base for users. (Will be searched recursively)

`ldap-user-base` is a string Setting. You can get its value by calling:

    (ldap-user-base)

and set its value by calling:

    (ldap-user-base <new-value>)

You can also set its value with the env var `MB_LDAP_USER_BASE`.

Clear its value by calling:

    (ldap-user-base nil)

Its default value is `nil`.
sourceraw docstring

ldap-user-filterclj

(ldap-user-filter)
(ldap-user-filter new-value)

User lookup filter, the placeholder {login} will be replaced by the user supplied login.

ldap-user-filter is a string Setting. You can get its value by calling:

(ldap-user-filter)

and set its value by calling:

(ldap-user-filter <new-value>)

You can also set its value with the env var MB_LDAP_USER_FILTER.

Clear its value by calling:

(ldap-user-filter nil)

Its default value is (&(objectClass=inetOrgPerson)(|(uid={login})(mail={login}))).

User lookup filter, the placeholder {login} will be replaced by the user supplied login.

`ldap-user-filter` is a string Setting. You can get its value by calling:

    (ldap-user-filter)

and set its value by calling:

    (ldap-user-filter <new-value>)

You can also set its value with the env var `MB_LDAP_USER_FILTER`.

Clear its value by calling:

    (ldap-user-filter nil)

Its default value is `(&(objectClass=inetOrgPerson)(|(uid={login})(mail={login})))`.
sourceraw docstring

test-ldap-connectionclj

(test-ldap-connection {:keys [user-base group-base] :as details})

Test the connection to an LDAP server to determine if we can find the search base.

Takes in a dictionary of properties such as: {:host "localhost" :port 389 :bind-dn "cn=Directory Manager" :password "password" :security "none" :user-base "ou=Birds,dc=metabase,dc=com" :group-base "ou=Groups,dc=metabase,dc=com"}

Test the connection to an LDAP server to determine if we can find the search base.

Takes in a dictionary of properties such as:
    {:host       "localhost"
     :port       389
     :bind-dn    "cn=Directory Manager"
     :password   "password"
     :security   "none"
     :user-base  "ou=Birds,dc=metabase,dc=com"
     :group-base "ou=Groups,dc=metabase,dc=com"}
sourceraw docstring

verify-passwordclj

(verify-password user-info password)
(verify-password conn user-info password)

Verifies if the supplied password is valid for the user-info (from find-user) or DN.

Verifies if the supplied password is valid for the `user-info` (from `find-user`) or DN.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close