mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-30 16:47:02 +00:00
auth: Allow users without a domain
Some deployments already have users that authenticate without a domain. Today, we refuse to even consider those, and reject them at parsing time. However, it is a use-case worth supporting, at least with some restrictions that make the complexity manageable. This patch changes the auth package to support authenticating users without an "@domain" part. Those requests will always be directly passed on to the fallback authenticator, if available. The dovecot fallback authenticator can already handle this case just fine.
This commit is contained in:
@@ -5,10 +5,11 @@ ssl = no
|
||||
default_internal_user = $USER
|
||||
default_login_user = $USER
|
||||
|
||||
# Before auth checks, rename "u@d" to "u-AT-d". This exercises that chasquid
|
||||
# Before auth checks, rename "u@d" to "u-x". This exercises that chasquid
|
||||
# handles well the case where the returned user information does not match the
|
||||
# requested user.
|
||||
auth_username_format = "%n-AT-%d"
|
||||
# We drop the domain, to exercise "naked" auth handling.
|
||||
auth_username_format = "%n-x"
|
||||
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
user-AT-srv:{plain}password:1000:1000::/home/user
|
||||
user-x:{plain}password:1000:1000::/home/user
|
||||
naked-x:{plain}gun:1001:1001::/home/naked
|
||||
|
||||
Reference in New Issue
Block a user