annotate conf/httpclient-auth.xml @ 0:3b37d71af924 default tip

iniitial
author dwinter
date Tue, 26 Feb 2013 15:50:30 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b37d71af924 iniitial
dwinter
parents:
diff changeset
1 <?xml version="1.0"?>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
2 <!--
3b37d71af924 iniitial
dwinter
parents:
diff changeset
3 This is the authentication configuration file for protocol-httpclient.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
4 Different credentials for different authentication scopes can be
3b37d71af924 iniitial
dwinter
parents:
diff changeset
5 configured in this file. If a set of credentials is configured for a
3b37d71af924 iniitial
dwinter
parents:
diff changeset
6 particular authentication scope (i.e. particular host, port number,
3b37d71af924 iniitial
dwinter
parents:
diff changeset
7 scheme and realm), then that set of credentials would be sent only to
3b37d71af924 iniitial
dwinter
parents:
diff changeset
8 servers falling under the specified authentication scope. Apart from
3b37d71af924 iniitial
dwinter
parents:
diff changeset
9 this at most one set of credentials can be configured as 'default'.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
10
3b37d71af924 iniitial
dwinter
parents:
diff changeset
11 When authentication is required to fetch a resource from a web-server,
3b37d71af924 iniitial
dwinter
parents:
diff changeset
12 the authentication-scope is determined from the host, port, scheme and
3b37d71af924 iniitial
dwinter
parents:
diff changeset
13 realm (if present) obtained from the URL of the page and the
3b37d71af924 iniitial
dwinter
parents:
diff changeset
14 authentication headers in the HTTP response. If it matches any
3b37d71af924 iniitial
dwinter
parents:
diff changeset
15 'authscope' in this configuration file, then the 'credentials' for
3b37d71af924 iniitial
dwinter
parents:
diff changeset
16 that 'authscope' is used for authentication. Otherwise, it would use
3b37d71af924 iniitial
dwinter
parents:
diff changeset
17 the 'default' set of credentials (with an exception which is described
3b37d71af924 iniitial
dwinter
parents:
diff changeset
18 in the next paragraph), if present. If any attribute is missing, it
3b37d71af924 iniitial
dwinter
parents:
diff changeset
19 would match all values for that attribute.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
20
3b37d71af924 iniitial
dwinter
parents:
diff changeset
21 If there are several pages having different authentication realms and
3b37d71af924 iniitial
dwinter
parents:
diff changeset
22 schemes on the same web-server (same host and port, but different
3b37d71af924 iniitial
dwinter
parents:
diff changeset
23 realms and schemes), and credentials for one or more of the realms and
3b37d71af924 iniitial
dwinter
parents:
diff changeset
24 schemes for that web-server is specified, then the 'default'
3b37d71af924 iniitial
dwinter
parents:
diff changeset
25 credentials would be ignored completely for that web-server (for that
3b37d71af924 iniitial
dwinter
parents:
diff changeset
26 host and port). So, credentials to handle all realms and schemes for
3b37d71af924 iniitial
dwinter
parents:
diff changeset
27 that server may be specified explicitly by adding an extra 'authscope'
3b37d71af924 iniitial
dwinter
parents:
diff changeset
28 tag with the 'realm' and 'scheme' attributes missing for that server.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
29 This is demonstrated by the last 'authscope' tag for 'example:8080' in
3b37d71af924 iniitial
dwinter
parents:
diff changeset
30 the following example.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
31
3b37d71af924 iniitial
dwinter
parents:
diff changeset
32 Example:-
3b37d71af924 iniitial
dwinter
parents:
diff changeset
33 <credentials username="susam" password="masus">
3b37d71af924 iniitial
dwinter
parents:
diff changeset
34 <default realm="sso"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
35 <authscope host="192.168.101.33" port="80" realm="login"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
36 <authscope host="example" port="8080" realm="blogs"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
37 <authscope host="example" port="8080" realm="wiki"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
38 <authscope host="example" port="80" realm="quiz" scheme="NTLM"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
39 </credentials>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
40 <credentials username="admin" password="nimda">
3b37d71af924 iniitial
dwinter
parents:
diff changeset
41 <authscope host="example" port="8080"/>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
42 </credentials>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
43
3b37d71af924 iniitial
dwinter
parents:
diff changeset
44 In the above example, 'example:8080' server has pages with multiple
3b37d71af924 iniitial
dwinter
parents:
diff changeset
45 authentication realms. The first set of credentials would be used for
3b37d71af924 iniitial
dwinter
parents:
diff changeset
46 'blogs' and 'wiki' authentication realms. The second set of
3b37d71af924 iniitial
dwinter
parents:
diff changeset
47 credentials would be used for all other realms. For 'login' realm of
3b37d71af924 iniitial
dwinter
parents:
diff changeset
48 '192.168.101.33', the first set of credentials would be used. For any
3b37d71af924 iniitial
dwinter
parents:
diff changeset
49 other realm of '192.168.101.33' authentication would not be done. For
3b37d71af924 iniitial
dwinter
parents:
diff changeset
50 the NTLM authentication required by 'example:80', the first set of
3b37d71af924 iniitial
dwinter
parents:
diff changeset
51 credentials would be used. For 'sso' realms of all other servers, the
3b37d71af924 iniitial
dwinter
parents:
diff changeset
52 first set of credentials would be used, since it is configured as
3b37d71af924 iniitial
dwinter
parents:
diff changeset
53 'default'.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
54
3b37d71af924 iniitial
dwinter
parents:
diff changeset
55 NTLM does not use the notion of realms. The domain name may be
3b37d71af924 iniitial
dwinter
parents:
diff changeset
56 specified as the value for 'realm' attribute in case of NTLM.
3b37d71af924 iniitial
dwinter
parents:
diff changeset
57 -->
3b37d71af924 iniitial
dwinter
parents:
diff changeset
58
3b37d71af924 iniitial
dwinter
parents:
diff changeset
59 <auth-configuration>
3b37d71af924 iniitial
dwinter
parents:
diff changeset
60
3b37d71af924 iniitial
dwinter
parents:
diff changeset
61 </auth-configuration>