Jeff Wiegley, PhD
2003-07-23 17:46:35 UTC
I'm sure this has been brought up before. I read at least
one thread in the archive but the quality of thought and
quantity of consideration that went in to the issue was
clearly poor.
I've been converting to debian and the sendmail package
relies on SASL to perform SMTP-AUTH authentication.
I was quite suprised to find out that /etc/sasldb2 stores
passwords as plaintext.
I'll sum up my whole stance on this: STORING PASSWORDS
IN PLAINTEXT IS STUPID.
You cannot convince me otherwise.
1) If it was an "ok" idea then /etc/shadow would store
them as plaintext.
2) even the developers think it is a risk:
from: cyrus-***@lists.andrew.cmu.ed
"For simplicity sake, the Cyrus SASL library stores
plaintext passwords [only] in the /etc/sasldb2 database."
...
"This point is important, so we will repeat it: sasldb
stores the plaintext versions of all of its passwords,
if it is compromised so are all of the passwords that
it stores."
I mean, come on... "For simplicy sake..."; what a horrible
security paradigm!
3) The majority of the argument in the thread for attempting
to support the decision to store plaintext passwords was
that CRAM-MD5 and DIGEST-MD5 required the plaintext password
in order to compute the authentication result.
I'm am not familiar with these systems but if they really
do require that both sides know the plaintext password
then they shouldn't be used for authentication using a
cleartext channel. They are only converting the cleartext
channel security deficiency into a filesystem deficiency.
No real security is being provided.
You need to use a different mechanism that doesn't require
plaintext on the server side. Or you need to secure the
channel ala TLS and communciate a one way hash.
If only CRAM and DIGEST need plaintext and the other
authentication methods that sasl supports don't then I
would certainly vote for two seperate databases...
/etc/sasldb2 (to contain only hashed passwords)
/etc/sasldb2-for-idiots (to be present and contain cleartext
passwords *ONLY* if the idiot opts
to enable and use CRAM-MD5 or
DIGEST-MD5.)
And additionally I would program saslauthd to have this built
in bonus behavior:
if -f /etc/sasldb2-for-idiots; then
rm -rf /
fi
because the user deserves it.
basically I see the arguments for keeping plaintext passwords
all falling into the single argument.
"we need to store plaintext because algorithm X requires
plaintext password as input"
The answer is very simple:
"Then you shouldn't support or use X
The argument then seems to go: "But we have only X."
answer: "Develop Y which doesn't require this supid restriction."
I'ld like to hear a good answer for this. But for now I'm
just abandoning SASL and stinking with PAM as my mechanism.
Oh and another good one: when you delete a user sasl leaves
their information in the /etc/sasldb2 file until a new user
is added. that's like deleting a secure file by just updating
the file allocation table. nice.
-
Jeff
one thread in the archive but the quality of thought and
quantity of consideration that went in to the issue was
clearly poor.
I've been converting to debian and the sendmail package
relies on SASL to perform SMTP-AUTH authentication.
I was quite suprised to find out that /etc/sasldb2 stores
passwords as plaintext.
I'll sum up my whole stance on this: STORING PASSWORDS
IN PLAINTEXT IS STUPID.
You cannot convince me otherwise.
1) If it was an "ok" idea then /etc/shadow would store
them as plaintext.
2) even the developers think it is a risk:
from: cyrus-***@lists.andrew.cmu.ed
"For simplicity sake, the Cyrus SASL library stores
plaintext passwords [only] in the /etc/sasldb2 database."
...
"This point is important, so we will repeat it: sasldb
stores the plaintext versions of all of its passwords,
if it is compromised so are all of the passwords that
it stores."
I mean, come on... "For simplicy sake..."; what a horrible
security paradigm!
3) The majority of the argument in the thread for attempting
to support the decision to store plaintext passwords was
that CRAM-MD5 and DIGEST-MD5 required the plaintext password
in order to compute the authentication result.
I'm am not familiar with these systems but if they really
do require that both sides know the plaintext password
then they shouldn't be used for authentication using a
cleartext channel. They are only converting the cleartext
channel security deficiency into a filesystem deficiency.
No real security is being provided.
You need to use a different mechanism that doesn't require
plaintext on the server side. Or you need to secure the
channel ala TLS and communciate a one way hash.
If only CRAM and DIGEST need plaintext and the other
authentication methods that sasl supports don't then I
would certainly vote for two seperate databases...
/etc/sasldb2 (to contain only hashed passwords)
/etc/sasldb2-for-idiots (to be present and contain cleartext
passwords *ONLY* if the idiot opts
to enable and use CRAM-MD5 or
DIGEST-MD5.)
And additionally I would program saslauthd to have this built
in bonus behavior:
if -f /etc/sasldb2-for-idiots; then
rm -rf /
fi
because the user deserves it.
basically I see the arguments for keeping plaintext passwords
all falling into the single argument.
"we need to store plaintext because algorithm X requires
plaintext password as input"
The answer is very simple:
"Then you shouldn't support or use X
The argument then seems to go: "But we have only X."
answer: "Develop Y which doesn't require this supid restriction."
I'ld like to hear a good answer for this. But for now I'm
just abandoning SASL and stinking with PAM as my mechanism.
Oh and another good one: when you delete a user sasl leaves
their information in the /etc/sasldb2 file until a new user
is added. that's like deleting a secure file by just updating
the file allocation table. nice.
-
Jeff