]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: auth: Change the internal authentication system.
authorThierry FOURNIER <tfournier@exceliance.fr>
Wed, 22 Jan 2014 17:38:02 +0000 (18:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Mar 2014 17:06:06 +0000 (18:06 +0100)
commit9eec0a646bc25d169ce27c27bf16cae6451b0eee
tree4f9d0b6b2b1739d8ffaa7ae60209ac4d9ad573a7
parent2049092f26efd83508b7d775f948e04ec0e1c532
MAJOR: auth: Change the internal authentication system.

This patch remove the limit of 32 groups. It also permit to use standard
"pat_parse_str()" function in place of "pat_parse_strcat()". The
"pat_parse_strcat()" is no longer used and its removed. Before this
patch, the groups are stored in a bitfield, now they are stored in a
list of strings. The matching is slower, but the number of groups is
low and generally the list of allowed groups is short.

The fetch function "smp_fetch_http_auth_grp()" used with the name
"http_auth_group" return valid username. It can be used as string for
displaying the username or with the acl "http_auth_group" for checking
the group of the user.

Maybe the names of the ACL and fetch methods are no longer suitable, but
I keep the current names for conserving the compatibility with existing
configurations.

The function "userlist_postinit()" is created from verification code
stored in the big function "check_config_validity()". The code is
adapted to the new authentication storage system and it is moved in the
"src/auth.c" file. This function is used to check the validity of the
users declared in groups and to check the validity of groups declared
on the "user" entries.

This resolve function is executed before the check of all proxy because
many acl needs solved users and groups.
doc/configuration.txt
include/proto/auth.h
include/types/auth.h
include/types/pattern.h
src/acl.c
src/auth.c
src/cfgparse.c
src/pattern.c
src/proto_http.c