You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2008/04/27 15:46:39 UTC
dont-save-plaintext-passwords-by-default branch done (2nd try)
I think the branch is ready for review, again. I've fixed and changed
quite a few things since last time around that I claimed it was done:
- Now prompts users once per authentication realm, and not
once per RA session.
- Authentication parameter configuration has been moved to the
RA layer completely. For users, this means that parameters
which used to be configured in the [auth] section in the 'config'
file are now configured in the 'servers' file, and can be specified
in both the [global] section and per server group. The [auth]
section in 'config' is still being evaluated, but is overridden
by anything specified in 'servers'.
- The prompt now shows the authentication realm for the password
being cached
$ svn --config-dir /tmp/svncfg ls svn://localhost \
http://ankhsvn.open.collab.net/svn/ankhsvn/trunk
Authentication realm: <svn://localhost:3690> 2f914fcb-3f14-dd11-9d49-000b6ad51eb1
Password for 'harry':
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm
'<svn://localhost:3690> 2f914fcb-3f14-dd11-9d49-000b6ad51eb1'
can only be stored to disk unencrypted! It is recommended to configure
your system so that Subversion can store passwords encrypted, if possible.
See the documentation for details. You can get rid of this warning by
editing '/tmp/svncfg/servers'
and setting 'store-plaintext-passwords' to either 'yes' or 'no'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? no
Authentication realm: <http://ankhsvn.open.collab.net:80> CollabNet Subversion Repository
Password for 'guest':
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm
'<http://ankhsvn.open.collab.net:80> CollabNet Subversion Repository'
can only be stored to disk unencrypted! It is recommended to configure
your system so that Subversion can store passwords encrypted, if possible.
See the documentation for details. You can get rid of this warning by
editing '/tmp/svncfg/servers'
and setting 'store-plaintext-passwords' to either 'yes' or 'no'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
README.txt
contrib/
doc/
src/
testing/
tools/
www/
$
I hope this time there aren't any huge flaws left, and that everyone
will be at least slightly happy with this solution to what is probably
one of the most controversial problems in Subversion's history (apart
from obliterate and possibly others. No, I'm not running for an award :)
To get the diff, run:
svn diff https://svn.collab.net/repos/svn/trunk@30801 \
https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default
Thanks,
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by David Glasser <gl...@davidglasser.net>.
On Mon, Apr 28, 2008 at 5:54 AM, Stefan Sperling <st...@elego.de> wrote:
> On Sun, Apr 27, 2008 at 04:24:57PM -0700, David Glasser wrote:
> > On Sun, Apr 27, 2008 at 2:50 PM, Stefan Sperling <st...@elego.de> wrote:
> > > On Sun, Apr 27, 2008 at 06:00:34PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > > > $ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
> > > > TODOS in this branch:
> > >
> > > Hey Arfrever,
> > >
> > > See http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=137804
> > > I'm just waiting for an OK by glasser.
> >
> > Sure, seems like it would be something useful for other
> > implementors... though you could perhaps pass it as an argument to the
> > callback instead.
>
> Hmm. I don't know which is better. I guess this depends on whether
> we really want to hide the configuration directory path from clients.
>
> I think read-only access to the directory path isn't harmful, and
> it helps clients to point users to the proper configuration file,
> instead of taking a wild guess.
>
> I don't know if this use case already exists in the wild, but I can
> imagine that clients trying to be helpful may want to print the path.
>
> But to be consistent, we may also want to provide
> svn_config_get_registry_config_path() or something like that on win32,
> i.e. expose the constant SVN_REGISTRY_USR_CONFIG_PATH.
>
>
> > Did you ever figure out about the Windows registry thing (ie, the fact
> > that in some setups, a non-file mechanism takes precedence)?
>
> It looks like this should be handled correctly since the registry vs.
> files thing is abstracted away in libsvn_subr/config.c:get_category_config(),
> which is called by svn_config_get_config().
>
> The read_all() routine called by get_category_config() reads from the
> registry if applicable. Its docstring contains:
>
> /* Read various configuration sources into *CFGP, in this order, with
> * later reads overriding the results of earlier ones:
> *
> * 1. SYS_REGISTRY_PATH (only on Win32, but ignored if NULL)
> *
> * 2. SYS_FILE_PATH (everywhere, but ignored if NULL)
> *
> * 3. USR_REGISTRY_PATH (only on Win32, but ignored if NULL)
> *
> * 4. USR_FILE_PATH (everywhere, but ignored if NULL)
>
> On Windows, svn_config_get_user_config_path() will return whatever
> svn_config__win_config_path() returns. This will never be a registry
> key, but pointing the user to the file isn't wrong, because whatever
> they specify in the file will override what's in the registry. The
> file is the last item listed in read_all's docstring, so it takes
> precedence.
>
> People who prefer using the registry will hopefully be able to guess
> that they can also configure the behaviour there, right? ;)
Ah, cool. So maybe you could (with the proper ifdefs) add "or the
registry", but even without that, it'll be accurate. Sounds good.
--dave
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Apr 27, 2008 at 04:24:57PM -0700, David Glasser wrote:
> On Sun, Apr 27, 2008 at 2:50 PM, Stefan Sperling <st...@elego.de> wrote:
> > On Sun, Apr 27, 2008 at 06:00:34PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > > $ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
> > > TODOS in this branch:
> >
> > Hey Arfrever,
> >
> > See http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=137804
> > I'm just waiting for an OK by glasser.
>
> Sure, seems like it would be something useful for other
> implementors... though you could perhaps pass it as an argument to the
> callback instead.
Hmm. I don't know which is better. I guess this depends on whether
we really want to hide the configuration directory path from clients.
I think read-only access to the directory path isn't harmful, and
it helps clients to point users to the proper configuration file,
instead of taking a wild guess.
I don't know if this use case already exists in the wild, but I can
imagine that clients trying to be helpful may want to print the path.
But to be consistent, we may also want to provide
svn_config_get_registry_config_path() or something like that on win32,
i.e. expose the constant SVN_REGISTRY_USR_CONFIG_PATH.
> Did you ever figure out about the Windows registry thing (ie, the fact
> that in some setups, a non-file mechanism takes precedence)?
It looks like this should be handled correctly since the registry vs.
files thing is abstracted away in libsvn_subr/config.c:get_category_config(),
which is called by svn_config_get_config().
The read_all() routine called by get_category_config() reads from the
registry if applicable. Its docstring contains:
/* Read various configuration sources into *CFGP, in this order, with
* later reads overriding the results of earlier ones:
*
* 1. SYS_REGISTRY_PATH (only on Win32, but ignored if NULL)
*
* 2. SYS_FILE_PATH (everywhere, but ignored if NULL)
*
* 3. USR_REGISTRY_PATH (only on Win32, but ignored if NULL)
*
* 4. USR_FILE_PATH (everywhere, but ignored if NULL)
On Windows, svn_config_get_user_config_path() will return whatever
svn_config__win_config_path() returns. This will never be a registry
key, but pointing the user to the file isn't wrong, because whatever
they specify in the file will override what's in the registry. The
file is the last item listed in read_all's docstring, so it takes
precedence.
People who prefer using the registry will hopefully be able to guess
that they can also configure the behaviour there, right? ;)
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by David Glasser <gl...@davidglasser.net>.
On Sun, Apr 27, 2008 at 2:50 PM, Stefan Sperling <st...@elego.de> wrote:
> On Sun, Apr 27, 2008 at 06:00:34PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > $ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
> > TODOS in this branch:
>
> Hey Arfrever,
>
> See http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=137804
> I'm just waiting for an OK by glasser.
Sure, seems like it would be something useful for other
implementors... though you could perhaps pass it as an argument to the
callback instead.
Did you ever figure out about the Windows registry thing (ie, the fact
that in some setups, a non-file mechanism takes precedence)?
--dave
>
> > - glasser says:
> >
> > > * subversion/include/svn_config.h
> > > (svn_config_get_user_config_path): Declare and document.
> >
> > Does this need to be public (eg, because other implementors of the
> > prompt need to use it or something)? You don't use it outside of
> > libsvn_subr.
> > $
> >
> > --
> > Arfrever Frehtes Taifersar Arahesis
>
>
>
>
> Thanks,
> --
> Stefan Sperling <st...@elego.de> Software Monkey
>
> German law requires the following banner :(
> elego Software Solutions GmbH HRB 77719
> Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
> 13355 Berlin Fax: +49 30 23 45 86 95
> http://www.elego.de CEO: Olaf Wagner
>
> Store password unencrypted (yes/no)? No
>
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Apr 27, 2008 at 06:00:34PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> $ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
> TODOS in this branch:
Hey Arfrever,
See http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=137804
I'm just waiting for an OK by glasser.
> - glasser says:
>
> > * subversion/include/svn_config.h
> > (svn_config_get_user_config_path): Declare and document.
>
> Does this need to be public (eg, because other implementors of the
> prompt need to use it or something)? You don't use it outside of
> libsvn_subr.
> $
>
> --
> Arfrever Frehtes Taifersar Arahesis
Thanks,
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
$ svn cat https://svn.collab.net/repos/svn/branches/dont-save-plaintext-passwords-by-default/TODO.branch
TODOS in this branch:
- glasser says:
> * subversion/include/svn_config.h
> (svn_config_get_user_config_path): Declare and document.
Does this need to be public (eg, because other implementors of the
prompt need to use it or something)? You don't use it outside of
libsvn_subr.
$
--
Arfrever Frehtes Taifersar Arahesis
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
2008-05-01 18:47:38 Stefan Sperling napisał(a):
> On Thu, May 01, 2008 at 05:35:50PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > 2008-05-01 14:19:38 Stefan Sperling napisał(a):
> > > On Wed, Apr 30, 2008 at 08:52:21PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > > > What is the behavior wrt empty passwords?
> > > > IMHO they should be stored plaintextly without prompting.
> > >
> > > Why?
> > >
> > > We want to make people aware when Subversion can only store
> > > passwords in plaintext in their setup, regardless of the strength
> > > of their password. Having a special case like this does not help
> > > us achieve that goal.
> >
> > I think that empty passwords aren't worth prompting user.
>
> Well, it may depend on the use case. We're prompting exactly because
> we cannot be sure that saving by default will be OK in all cases
> where people might end up using an empty password.
>
> > I suggest this behavior only for 'store-plaintext-passwords = (yes|ask)'.
>
> I think we should not be using 'yes' when the user wants 'ask',
> no matter what the password is.
>
> > > Also, an "empty" password arguably means the password is
> > > 'hit the enter key', so it can still be considered a password,
> > > albeit a ridiculously weak one.
> >
> > I mean that empty passwords are sometimes used for anonymous users
> > with read-only access
>
> Yes, I guessed this was what you meant.
>
> > , so there's no security risk here.
>
> Keep in mind that we're not handling the security risk of storing
> plaintext passwords in any way. We're just trying to make sure people
> know what will happen when their password gets saved. Judging
> the security issues involved is up to the user, not us.
>
> I understand that you mean to be helpful to users in a very
> common use case (anonymous checkout), but I don't think we
> should make any exceptions like this right now. There may be
> other cases where silently saving an empty password (which
> is easily recognisable as such in the plaintext auth cache) may
> make someone really, really unhappy.
>
> That said, if many users (or many developers) say they want this,
> no problem, we can do it. But I would like to see our users' reactions
> to the prompt and get some feedback before deciding whether we should
> make an exception for empty passwords.
OK. It can be changed later on trunk.
> Because what we want to achieve
> here is giving our users a choice, and we don't want to be deciding
> things about the delicate 'plaintext password storing' issue for them,
> like we used to.
>
> (Since we probably can't make everyone happy either way, we could
> also add yet another option: "store-empty-passwords-in-plaintext" ;)
Additional option isn't necessary.
--
Arfrever Frehtes Taifersar Arahesis
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Stefan Sperling <st...@elego.de>.
On Thu, May 01, 2008 at 05:35:50PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> 2008-05-01 14:19:38 Stefan Sperling napisał(a):
> > On Wed, Apr 30, 2008 at 08:52:21PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > > What is the behavior wrt empty passwords?
> > > IMHO they should be stored plaintextly without prompting.
> >
> > Why?
> >
> > We want to make people aware when Subversion can only store
> > passwords in plaintext in their setup, regardless of the strength
> > of their password. Having a special case like this does not help
> > us achieve that goal.
>
> I think that empty passwords aren't worth prompting user.
Well, it may depend on the use case. We're prompting exactly because
we cannot be sure that saving by default will be OK in all cases
where people might end up using an empty password.
> I suggest this behavior only for 'store-plaintext-passwords = (yes|ask)'.
I think we should not be using 'yes' when the user wants 'ask',
no matter what the password is.
> > Also, an "empty" password arguably means the password is
> > 'hit the enter key', so it can still be considered a password,
> > albeit a ridiculously weak one.
>
> I mean that empty passwords are sometimes used for anonymous users
> with read-only access
Yes, I guessed this was what you meant.
> , so there's no security risk here.
Keep in mind that we're not handling the security risk of storing
plaintext passwords in any way. We're just trying to make sure people
know what will happen when their password gets saved. Judging
the security issues involved is up to the user, not us.
I understand that you mean to be helpful to users in a very
common use case (anonymous checkout), but I don't think we
should make any exceptions like this right now. There may be
other cases where silently saving an empty password (which
is easily recognisable as such in the plaintext auth cache) may
make someone really, really unhappy.
That said, if many users (or many developers) say they want this,
no problem, we can do it. But I would like to see our users' reactions
to the prompt and get some feedback before deciding whether we should
make an exception for empty passwords. Because what we want to achieve
here is giving our users a choice, and we don't want to be deciding
things about the delicate 'plaintext password storing' issue for them,
like we used to.
(Since we probably can't make everyone happy either way, we could
also add yet another option: "store-empty-passwords-in-plaintext" ;)
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
2008-05-01 14:19:38 Stefan Sperling napisał(a):
> On Wed, Apr 30, 2008 at 08:52:21PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > What is the behavior wrt empty passwords?
> > IMHO they should be stored plaintextly without prompting.
>
> Why?
>
> We want to make people aware when Subversion can only store
> passwords in plaintext in their setup, regardless of the strength
> of their password. Having a special case like this does not help
> us achieve that goal.
I think that empty passwords aren't worth prompting user.
I suggest this behavior only for 'store-plaintext-passwords = (yes|ask)'.
> Also, an "empty" password arguably means the password is
> 'hit the enter key', so it can still be considered a password,
> albeit a ridiculously weak one.
I mean that empty passwords are sometimes used for anonymous users
with read-only access, so there's no security risk here.
E.g.: http://viewvc.org/download.html
--
Arfrever Frehtes Taifersar Arahesis
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 30, 2008 at 08:52:21PM +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> What is the behavior wrt empty passwords?
> IMHO they should be stored plaintextly without prompting.
Why?
We want to make people aware when Subversion can only store
passwords in plaintext in their setup, regardless of the strength
of their password. Having a special case like this does not help
us achieve that goal.
Also, an "empty" password arguably means the password is
'hit the enter key', so it can still be considered a password,
albeit a ridiculously weak one. Why should we assume that all
people always want Subversion to store this password in plaintext?
--
Stefan Sperling <st...@elego.de> Software Monkey
German law requires the following banner :(
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de CEO: Olaf Wagner
Store password unencrypted (yes/no)? No
Re: dont-save-plaintext-passwords-by-default branch done (2nd try)
Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
What is the behavior wrt empty passwords?
IMHO they should be stored plaintextly without prompting.
--
Arfrever Frehtes Taifersar Arahesis
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org