Hi,
Further to the other thread about password guessing activities against our dovecot, I would like to implement application specific passwords on our dovecot.
Googling results in some documents, but they are all a bit older:
https://www.happyassassin.net/2014/08/26/adding-application-specific-passwor...
https://www.dgsiegel.net/news/2013_05_21-application_specific_passwords_for_...
http://www.justinbuchanan.com/blog/post/2012/12/02/Application-Specific-Pass...
Those articles are interesting, but also rather old. (I realse that this does not neccesarily mean: irrelevant or bad)
Is there anone here with some additional notes, ideas, tips, trics on setting up application specific passwords with dovecot with virtual users? We are using samba AD as an authentication backend.
MJ
Quoting mj <lists@merit.unu.edu>:
I'm working on PrivacyIdea (PI) integration for 2FA. The reason I
mention this for app passwords is because PI allows multiple 'tokens'
that aren't just for 2FA.
This would allow you give your users a web portal to create 'password'
(SPASS) tokens - using their AD pass to auth to the portal. Then using
PAM Radius, Dovecot can auth against the multiple password tokens.
Personally - I'm not too thrilled about having users have multiple
passwords for IMAP - BUT if you're trying to protect the AD password,
this would be a method of isolating AD away. You can set PI to fall
back to the AD password if the user doesn't have a token, so
integration is pretty seamless.
You can also do some fancy policy-based token matching to require 2FA
for say - webmail - and allow SPASS for POP/IMAP. This is what I'm
aiming for, but I've had issues with the webmail client portion (user
using 2FA, and IMAP being hardcoded) and haven't gotten back to it to
truely guide anyone else through it.
Rick
Hi, mj
- mj [2017-07-20 13:29]:
I'm not familiar with samba AD and with it's features and limitation. For my simple system I'm using plain files for passdb and userdb (aka. passwd-file). Application (or rather device) specific passwords are implementing by using having an additional "username" with a specific password for a particular application or device. E.g. some entries for myself:
bbmutt:*:10001:10001::/krot/mail/km::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:bytes=10240M
kmozilla:*:10001:10001::/krot/mail/km::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:bytes=10240M
sailpad:*:10001:10001::/krot/mail/km::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:bytes=10240M
workphone:*:10001:10001::/krot/mail/km::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:bytes=10240M
The files are generated automatically from a Single Source of Truth.
In my case I'm selecting the username myself, but there's nothing preventing you from generating a username/password combination for your users.
Note that in my setup users will have application specific username and password, not only application specific password. It was easier to implement it quickly this way.
Greetz Kirill
-- -- Kirill Miazine <km@krot.org>
Hi,
Let me ask a more specific question.
What I would like to configure, is:
- for our internal users to use their regular AD usernam/passwords, just as everybody can currently do.
but, new:
- for external users, to ONLY be allowed to use an application specific password. (or username and password, fine as well)
Step one: making ldap password authentication valid only from our internal network. I though: using allow_nets=192.168.1.0/24 for that passdb
But I can't get that to work. :-( Unsure where exactly to define the allow_nets, tried many variations on the theme already.
Perhaps someone can help with the step one, and also tell me if the approach outlined above is smart, valid and do-able in dovecot.
Here are our sanitised configs:
and our dovecot-ldap.conf.ext:
MJ
Hi Kirill,
Thanks for your reply. Such a simple flat file approach would be perfect, and I don't mind at all to require app specific usernames *and* passwords.
However, I am unsure how to combine your recipe below with our regular AD userdb/passdb.
Perhaps someone can give me some pointers in that direction?
MJ
On 07/20/2017 06:50 PM, Kirill Miazine wrote:
- mj [2017-07-20 21:46]:
In my case it's flat file, but this is easily doable with SQL as well, using a separate table for login/password and a key to a table with appropriate user data.
However, I am unsure how to combine your recipe below with our regular AD userdb/passdb.
Unfortunately, I'm not familiar with AD....
-- -- Kirill Miazine <km@krot.org>
participants (3)
-
Kirill Miazine
-
mj
-
Rick Romero