• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

dnknth/ldap-ui: Minimalistic web frontend for OpenLDAP

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dnknth/ldap-ui

开源软件地址:

https://github.com/dnknth/ldap-ui

开源编程语言:

Vue 67.1%

开源软件介绍:

Simple LDAP editor

This is a minimal web interface for LDAP directories.

Screenshot

Features:

  • Directory tree view
  • Entry creation / modification / deletion
  • LDIF import / export
  • JPEG support for inetOrgPerson
  • Schema aware
  • Simple search (configurable)
  • Asynchronous LDAP backend with decent scalability
  • Available as Docker image

The app always requires authentication, even if the directory permits anonymous access. User credentials are validated through a simple bind on the directory (SASL is not supported). What a particular user can see (and edit) is governed entirely by directory access rules. The app shows the directory contents, nothing less and nothing more.

Manual installation and configuration

Prerequisites:

  • GNU make
  • node.js with NPM
  • Python3 >= 3.7
  • pip3
  • python-ldap; To compile the Python module:
    • Debian / Ubuntu: apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
    • RedHat / CentOS: yum install python-devel openldap-devel

Check the configuration in settings.py. It is very short and mostly self-explaining. Most settings can (and should) be overridden by environment variables or settings in a .env file; see docker-demo/env.demo or env.example.

Authentication methods

The UI always uses a simple bind operation to authenticate with the LDAP directory. How the bind DN is obtained from a given user name depends on a combination of OS environment variables.

  1. Search by some attribute. By default, this is the uid, which can be overridden by the environment variable LOGIN_ATTR, e.g. LOGIN_ATTR=cn.
  2. If the environment variable BIND_PATTERN is set, then no search is performed. Login with a full DN can be configured with BIND_PATTERN=%s, which for example allows to login as user cn=admin,dc=example,dc=org. If a partial DN like BIND_PATTERN=%s,dc=example,dc=org is configured, the corresponding login would be cn=admin. If a specific pattern like BIND_PATTERN=cn=%s,dc=example,dc=org is configured, the login name is just admin.
  3. If security is no concern, then a fixed BIND_DN and BIND_PASSWORD can be set in the environment. This is for demo purposes only, and probably a very bad idea if access to the UI is not restricted by any other means.

Usage

Standalone

Copy env.example to .env, run the app with

make run

and head over to http://localhost:5000/.

Docker

A Dockerfile is included. The container exposes port 5000. LDAP access is controlled by these environment variables:

  • LDAP_URL: connection URL (optional), defaults to ldap:///).
  • BASE_DN: search base (required), e.g. dc=example,dc=org.
  • LOGIN_ATTR: User name attribute (optional), defaults to uid.

For finer-grained control, check the variables in settings.py.

For the impatient: Run it with

docker run -e LDAP_URL=ldap://your.ldap.server/ -e BASE_DN=dc=example,dc=org dnknth/ldap-ui

For the even more impatient: A demo is provided in docker-demo. Run it with

docker-demo/start.sh

and go to http://localhost:5000/. You are automatically logged in as Fred Flintstone.

Notes

Searching

Search uses a fixed set of criteria (cn, gn, sn, and uid) if the query does not contain =. Wildcards are supported, e.g. f* will match all cn, gn, sn, and uid starting with f. Additionally, arbitrary attributes can be searched with an LDAP filter specification, for example sn=F* or uidNumber>=100.

Caveats

  • The software is fairly new. I use it on production directories, but you should probably test-drive it first.
  • It works with OpenLdap using simple bind. Other directories have not been tested, and SASL authentication schemes are presently not supported.
  • Passwords are transmitted as plain text. The LDAP server is expected to hash them (OpenLdap 2.4 does). I strongly recommend to expose the app through a TLS-enabled web server.
  • HTTP Basic Authentication is triggered unless the AUTHORIZATION request variable is already set by some upstream HTTP server.

Q&A

  • Q: Why are some fields not editable?
    • A: The RDN of an entry is read-only. To change it, rename the entry with a different RDN, then change the old RDN and rename back. To change passwords, click on the question mark icon on the right side. Binary fields (as per schema) are read-only. You do not want to modify them accidentally.
  • Q: Why did you write this?
    • A: PHPLdapAdmin has not seen updates for ages. I needed a replacement, and wanted to try Vue.

Acknowledgements

The Python backend uses Quart which is an asynchronous Flask. Kudos for the authors of these elegant frameworks!

The UI uses Vue.js with the excellent Bootstrap Vue components. Thanks to the authors for making frontend work much more enjoyable.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
michelbernardods/programming-challenges: Algorithmic, Data Structures, Frontend ...发布时间:2022-06-08
下一篇:
spectrumprotocol/frontend发布时间:2022-06-08
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap