Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
c329e53
Update README.rst
kakwa Feb 7, 2018
1ed654c
Update README.rst
kakwa Feb 7, 2018
6f98076
Protect against XSS vulnerabilities in URL redirection
jthiltges Jan 2, 2019
636400b
Merge pull request #16 from jthiltges/escape
kakwa Jan 2, 2019
1f79648
Update ChangeLog.rst
kakwa Jan 2, 2019
c6cce54
Escape form values with markupsafe
jthiltges Jan 3, 2019
5b0c72a
Merge pull request #17 from jthiltges/escfix
kakwa Jan 3, 2019
2df56d2
fix template over-escaping + python 3 support
kakwa Feb 6, 2019
921a082
switch to using lists in templates
kakwa Feb 6, 2019
6952661
add a small script to generate a local dev config
kakwa Feb 6, 2019
74dc6c5
various changes to support python3
kakwa Feb 6, 2019
3beedc8
add an ignore on the local dev conf file
kakwa Feb 6, 2019
ccc2529
fix another __import__
kakwa Feb 6, 2019
be598b0
slightly cleaner testenv deploy script
kakwa Feb 6, 2019
3d6e24e
pep8
kakwa Feb 7, 2019
c81429a
few tweaks for python3 support
kakwa Feb 7, 2019
5bdcc55
switch to xenial in travis configuration
kakwa Feb 7, 2019
9f6af58
remove env that doesn't exist
kakwa Feb 7, 2019
86fb6c1
adding an update as the first step of the deploy script
kakwa Feb 7, 2019
c3feafd
pep8
kakwa Feb 7, 2019
2a2864a
porting the tests over to python3
kakwa Feb 7, 2019
8bd4afb
remove scripts from pycodestyle
kakwa Feb 7, 2019
70140f9
pep 8
kakwa Feb 7, 2019
13bfbdc
add requirements files for simulating RHEL 7 and Debian 9
kakwa Feb 7, 2019
ab9cd66
fix pip install
kakwa Feb 7, 2019
fc98b1b
fixing the test env deploy script + small fix in unit tests
kakwa Feb 7, 2019
9989f97
remove python3 test env for el7 and stretch (no python3-ldap lib anyway)
kakwa Feb 7, 2019
bc0f3ac
adding another dependency for the samba/ad test
kakwa Feb 7, 2019
7430af5
adding another samba package in test env
kakwa Feb 7, 2019
8b48a1f
cleanup in travis file
kakwa Feb 7, 2019
d25ceef
trying to fix samba/AD setup
kakwa Feb 7, 2019
12c511b
switch to explicit bytearray for checking missing params
kakwa Feb 7, 2019
18fdeb4
better handling of the str/byte mess for python3
kakwa Feb 8, 2019
42759f1
pep8
kakwa Feb 8, 2019
8c0bf94
better log+fix in conf checking + fix in ppolicy handler
kakwa Feb 8, 2019
60d57d8
changelog
kakwa Feb 8, 2019
b9437ab
* support for python-ldap 2 and 3
kakwa Feb 9, 2019
bbfe96d
pep8
kakwa Feb 9, 2019
fb6b0a5
limit cherrypy to < 18.0.0 in setup.py
kakwa Feb 9, 2019
979d4ee
disable ppolicy in samba test deployment
kakwa Feb 9, 2019
10747cf
add some python 3 support in the LDAP and AD backends
kakwa Feb 9, 2019
79983c0
fix behavior of get_attributes()
kakwa Feb 9, 2019
90ff695
remove deprecation warning for html escape
kakwa Feb 9, 2019
baa3430
fix test and exception handling in code
kakwa Feb 9, 2019
05aace0
force the groups in flatten roles to be sorted
kakwa Feb 9, 2019
263e6be
fix html validator test for python 3
kakwa Feb 9, 2019
02357d8
remove debug print
kakwa Feb 9, 2019
a56c491
cleanup in html template + tidylib
kakwa Feb 9, 2019
f139617
adding exception for <nav> tags in html validation
kakwa Feb 9, 2019
98fca30
ignoring another nav error
kakwa Feb 9, 2019
046afbb
html_tidy cleanup
kakwa Feb 9, 2019
abfce48
fix typo
kakwa Feb 9, 2019
c5536bd
adding a fffew other exception in tidylib
kakwa Feb 9, 2019
9d0d321
another ignore for tidylib
kakwa Feb 9, 2019
7a8468f
adding another ignore
kakwa Feb 9, 2019
fba2d32
another exception for todylib
kakwa Feb 9, 2019
e50df5d
wider exception for <input> attribute "type" has invalid value
kakwa Feb 9, 2019
4a8aa1c
another exception
kakwa Feb 9, 2019
7390c93
another exception
kakwa Feb 9, 2019
f824790
another exception
kakwa Feb 9, 2019
0793361
switch to "stable" in setup.py troves
kakwa Feb 9, 2019
abf1454
changelog+version bump
kakwa Feb 9, 2019
932e7a8
adding (mostly) working configuration example
kakwa Feb 9, 2019
b682140
fix error handling when adding user that already exists
kakwa Feb 9, 2019
57bcaae
changelog and version bump
kakwa Feb 9, 2019
e6bcf9d
adding the possibility to log to stdout
kakwa Feb 10, 2019
df2746b
version bump + changelog
kakwa Feb 10, 2019
0cf5483
add warning in documentation for log level 'debug'
kakwa Feb 10, 2019
bbafafa
remove the double escaping.
kakwa Feb 12, 2019
799ca24
fix the urls for modify and delete
kakwa Feb 12, 2019
73c02cc
disable default logger if running in debug mode (-D)
kakwa Feb 12, 2019
d690bbd
passing the correct logger to the backend
kakwa Feb 12, 2019
7ac7118
adding a debug log to help figure out issues with filters.
kakwa Feb 12, 2019
d831b09
improve documentation
kakwa Feb 12, 2019
882a303
fix crash due to encoding in python 2
kakwa Feb 12, 2019
dc60300
version + changelog
kakwa Feb 12, 2019
30c28c5
slightly more robust unit tests
kakwa Feb 12, 2019
96acda7
fix formatting
kakwa Feb 13, 2019
5ee8a74
update documentation
kakwa Feb 13, 2019
245bafb
typo
kakwa Feb 13, 2019
50c6259
Fix email regexp
jqueuniet Mar 20, 2019
3b58f14
Merge pull request #23 from jqueuniet/fix_email_regexp
kakwa Mar 20, 2019
0a96ca6
Fix default handler arguments
jqueuniet Mar 26, 2019
d61c894
Add install command to setup in README
smacz42 Apr 23, 2019
b5e7cb6
Merge pull request #33 from smacz42/install-in-readme
kakwa Apr 23, 2019
856157a
Merge pull request #24 from jqueuniet/fix_default_handler
kakwa May 3, 2019
b9743ef
Add documentation for installing on Debian/Ubuntu and CentOS/RHEL
smacz42 Jul 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ coverage.xml
# Sphinx documentation
docs/_build/

ldapcherry-dev.ini
39 changes: 24 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
sudo: required
dist: trusty
dist: xenial
language: python

#env:
# - TRAVIS="yes"

before_install:
- '[ "$TEST_PEP8" == "1" ] || sudo ./tests/test_env/deploy.sh'

python:
- "2.7"

install:
- pip install -e .
- "if [[ $TEST_PEP8 == '1' ]]; then pip install pep8; fi"
- "pip install -e . -r $REQ_FILE"
- "if [[ $TEST_PEP8 == '1' ]]; then pip install pycodestyle; fi"
- pip install passlib
- pip install coveralls

# command to run tests
#
#script:
# - coverage run --source=ldapcherry setup.py test
script: "if [[ $TEST_PEP8 == '1' ]]; then pep8 --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg,tests,misc,setup.py . scripts/ldapcherryd; else coverage run --source=ldapcherry setup.py test; fi"
script: "if [[ $TEST_PEP8 == '1' ]]; then pycodestyle --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg,tests,misc,setup.py .; else coverage run --source=ldapcherry setup.py test; fi"
matrix:
include:
- python: "2.7"
env: TEST_PEP8=1
env:
TEST_PEP8=1
REQ_FILE=requirements.txt
- python: "2.7"
env:
TEST_PEP8=0
REQ_FILE=requirements-el7.txt
- python: "2.7"
env:
TEST_PEP8=0
REQ_FILE=requirements-stretch.txt
- python: "2.7"
env:
TEST_PEP8=0
REQ_FILE=requirements.txt
- python: "3.6"
env:
TEST_PEP8=0
REQ_FILE=requirements.txt

after_success:
- coveralls
after_failure:
Expand Down
33 changes: 33 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
Dev
***

Version 1.1.1
*************

* [fix ] fix double escaping issues introduced in 1.0.0
* [fix ] fix missing url escaping in links with querystring parameters (delete and modify page mostly)
* [fix ] fix log level not being honored in the backends
* [impr] clarify the role of 'key: True' of attributes.yml in the documentation
* [impr] add a few more comments in the .ini file to explain better the \*_filter_tmpl and group_attr parameters
* [impr] add debug log to help debug ldap search filters

Version 1.1.0
*************

* [feat] add stdout as a valid log method (useful when running with docker)

Version 1.0.1
*************

* [fix ] fix error handling when adding user that already exists

Version 1.0.0
*************

* [sec ] fix XSS injection in the url redirect in the login page (thanks to jthiltges)
* [fix ] fix configuration consistency check for attribute file (error if a given backend is not declared in main .ini file but in attributes)
* [fix ] remove a few deprecation warnings
* [fix ] fix potential issue with group names containing non-ascii characters
* [feat] support for python 3
* [feat] support for python-ldap 3.X.X
* [impr] better log error message if inconsistency between role, attribute and main .ini file for backends
* [impr] more systematic use of html and url escaping in the html rendering to prevent against content injection (thanks to jthiltges)
* [impr] more testing for various versions of python and python-ldap

Version 0.5.2
*************

Expand Down
17 changes: 16 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ Nice and simple application to manage users and groups in multiple directory ser

----

********
Demo
********

A demo is accessible here: https://ldapcherry.kakwalab.ovh

The credentials are:

* as administrator: admin/admin
* as user: user/user

Please take note that it's not possible to modify/delete the 'admin' and 'user' users.

Also take note that the service will be reseted once per day.

****************
Presentation
****************
Expand Down Expand Up @@ -75,7 +90,7 @@ The default backend plugins permit to manage Ldap and Active Directory.
$ export DATAROOTDIR=/usr/share/

# install ldapcherry
$ python setup.py
$ python setup.py install

# edit configuration files
$ vi /etc/ldapcherry/ldapcherry.ini
Expand Down
18 changes: 17 additions & 1 deletion conf/ldapcherry.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ request.show_tracebacks = False
## error and ldapcherry log file
#log.error_file = '/tmp/ldapcherry_error.log'

#####################################
# configuration to log to stdout #
#####################################
## logger stdout for access log
#log.access_handler = 'stdout'
## logger stdout for error and ldapcherry log
#log.error_handler = 'stdout'

#####################################
# configuration to log in syslog #
#####################################
Expand Down Expand Up @@ -98,16 +106,24 @@ ldap.timeout = 1
ldap.groupdn = 'ou=group,dc=example,dc=org'
# users dn
ldap.userdn = 'ou=people,dc=example,dc=org'
# ldapsearch filter to get a user

# ldapsearch filter to get one specific user
# %(username)s is content of the attribute marked 'key: True' in the attributes.file config file
ldap.user_filter_tmpl = '(uid=%(username)s)'
# ldapsearch filter to get groups of a user
# %(username)s is content of the attribute marked 'key: True' in the attributes.file config file
ldap.group_filter_tmpl = '(member=uid=%(username)s,ou=People,dc=example,dc=org)'
# filter to search users
# %(searchstring)s is the content passed through the search box
ldap.search_filter_tmpl = '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))'

# ldap group attributes and how to fill them
# 'member' is the name of the attribute
# for the template, any of the user's ldap attributes can be user
ldap.group_attr.member = "%(dn)s"
# same with memverUid and the uid user's attribute
#ldap.group_attr.memberUid = "%(uid)s"

# object classes of a user entry
ldap.objectclasses = 'top, person, posixAccount, inetOrgPerson'
# dn entry attribute for an ldap user
Expand Down
Loading