/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/authentication-ring.txt

  • Committer: Vincent Ladeuil
  • Date: 2007-10-12 16:19:31 UTC
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071012161931-2an2ctxh3n5ibw4k
Credentials matching implementation.

* bzrlib/tests/test_config.py:
(TestAuthenticationConfig): Test the matching mechanism of
the authentication.conf file

* bzrlib/config.py:
(AuthenticationConfig): New class.

* doc/developers/authentication-ring.txt: 
Clarify some details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
  * ``host``: can be empty (to act as a default for any host),
107
107
 
108
108
  * ``port`` can be empty (useful when an host provides several servers for the
109
 
    same scheme), only numerical values are allowed,
 
109
    same scheme), only numerical values are allowed, this should be used only
 
110
    when the server use a port different than the scheme standard port,
110
111
 
111
112
  * ``path``: can be empty (FTP or SFTP will never user it),
112
113
 
113
 
  * ``user``: can be empty (and will use the same default as ``bzr``, python's
114
 
    ``getpass.get_user()``),
 
114
  * ``user``: can be empty (``bzr`` will defaults to python's
 
115
    ``getpass.get_user()`` and attempt another matching(see below)),
115
116
 
116
117
  * ``password``: can be empty (for security reasons, a user may use the
117
 
    definitions without storing the passwords but want to be prompted).
 
118
    definitions without storing the passwords but want to be prompted ; or the
 
119
    password will be provided by an external plugin via the
 
120
    ``password_encoding`` mechanism decribed below).
118
121
 
119
122
  * ``password_encoding``: can be empty (default is ``plaintext``).
120
123
 
131
134
 
132
135
 3. ``scheme`` matches even if decorators are used in the requested URL,
133
136
 
134
 
 4. ``host`` matches if included in the requested URL. ``foo.net`` will match a
135
 
    requested ``bzr.foo.net``.
 
137
 4. ``host`` matches exactly or act as a domain if it starts with '.'
 
138
   (``project.bzr.sf.net`` will match ``.bzr.sf.net`` but ``projectbzr.sf.net``
 
139
   will not match ``bzr.sf.net``).
136
140
 
137
141
 5. ``port`` matches if included in the requested URL (exact matches only)
138
142
 
239
243
        bzr branch ftp://foo.net/bzr/branch
240
244
        bzr pull ftp://bzr.foo.net/bzr/product/branch/trunk
241
245
 
242
 
  * all connections are done with the same ``user`` (the local one) and the
 
246
  * all connections are done with the same ``user`` (the remote
 
247
    one for which the default bzr one is not appropriate) and the
243
248
    password is always prompted with some exceptions::
244
249
 
245
250
        # Pet projects on hobby.net
260
265
        [DEFAULT]
261
266
        user=foobar
262
267
        
263
 
  * an HTTP server that also acts as a proxy (weird)::
 
268
  * an HTTP server and a proxy::
264
269
 
265
270
        # development branches on dev server
266
271
        [dev]
278
283
        user=user2
279
284
        password=pass2
280
285
        
281
 
        # Pesky proxy
 
286
        # proxy
282
287
        [proxy]
283
288
        scheme=http
284
 
        host=dev.company.com
 
289
        host=proxy.company.com
 
290
        port=3128
285
291
        user=proxyuser1
286
292
        password=proxypass1
287
293
        
288
 
Note that the proxy should be specified last because it uses no path. An
289
 
alternative is to specify the port used by the proxy.
290
294
 
291
295
UI Changes
292
296
----------