Skip to content

Commit d9de5d4

Browse files
authored
mapcache: document authorization use (#872)
1 parent e3a8180 commit d9de5d4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

en/mapcache/http.txt

+34
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,37 @@ request:
5454
</headers>
5555
</http>
5656

57+
Authorization
58+
-------------
59+
60+
To access resources protected by a username and password, provide the `<auth>` element.
61+
Currently, only basic authentication is supported. Given that usernames and
62+
passwords are stored in unencrypted form, exercise caution when handling
63+
the configuration file (e.g., avoid committing it to a public repository and
64+
set restrictive file access permissions). The same precautions should be taken
65+
with the memory of the mapcache process (e.g., core files).
66+
67+
.. code-block:: xml
68+
69+
<http>
70+
<url>http://example.com/path?key=value</url>
71+
<auth scheme="basic">
72+
<user>alice</user>
73+
<pass>attackatdawn</pass>
74+
</auth>
75+
</http>
76+
77+
Both the username and password are processed verbatim. Ensure not to include
78+
any extra symbols (e.g., space, newline). If there is no username or no password,
79+
simply leave the respective element empty.
80+
81+
.. code-block:: xml
82+
83+
<http>
84+
<url>http://example.com/path?key=value</url>
85+
<auth scheme="basic">
86+
<user>bob</user>
87+
<pass></pass> <!-- user "bob" has no password -->
88+
</auth>
89+
</http>
90+

0 commit comments

Comments
 (0)