Skip to content

Galaxy102/homeassistant-ldap-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homeassistant-ldap-auth

LDAP authentication command for HomeAssistant

HowTo

  1. Add the compiled result to your HomeAssistant install
  2. Configure the command line auth provider in HomeAssistant ( see here) to use this tool.

Example config

homeassistant:
   auth_providers:
      - type: command_line
        command: /opt/hass-ldap-authenticator   # Assuming you copied the binary to this path
        args:
           - "--url"
           - ldaps://auth.foo.bar
           - "--base-dn"
           - dc=auth,dc=foo,dc=bar
           - "--bind"
           - "--bind-user"
           - cn=ldap-bind,ou=service,dc=auth,dc=foo,dc=bar
           - "--bind-password"
           - FooBarTopSecret
           - "--user-filter"
           - "(&(objectClass=user)(uid=%s))"
        meta: true
      - type: homeassistant

Command Line arguments

Name Meaning Required
--url string URL of LDAP server yes
--starttls Use StartTLS no
--base-dn string Base DN to search yes
--bind Use authenticated Bind no
--bind-user string DN of Bind User When authenticated bind is required
--bind-password string Password of Bind User When authenticated bind is required
--user-filter string Filter to apply for search. Put %s where you expect username yes
--displayname-attribute string LDAP attribute that contains the name that should be shown in HomeAssistant defaults to displayName
--authenticate-admin Add users to admin group instead of users defaults to false

Environment variables

Name Meaning Required
username Username to authenticate Set by HomeAssistant
password Password to authenticate Set by HomeAssistant

About

LDAP authentication command for HomeAssistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages