Add README on how to add auth for Haproxy
Related-Prod: PROD-23434
Change-Id: If68180e0e4c35a520018cc0447fcb707a2c0741e
diff --git a/README.rst b/README.rst
index 503c2ca..3d3d21d 100644
--- a/README.rst
+++ b/README.rst
@@ -745,6 +745,68 @@
tune_sndbuf_client: ''
tune_sndbuf_server: ''
+It is possible to setup basic Auth through Haproxy:
+
+.. code-block:: yaml
+
+ haproxy:
+ proxy:
+ userlist:
+ sample_userlist:
+ name: sample_users
+ groups:
+ - name: 'g1'
+ users:
+ - name: user1
+ password: r00tme
+ groups: [ 'g1' ]
+
+You can add users and passwords following three different ways:
+
+ #. Put to model insecure password and Haproxy will shadow
+ it in config file:
+
+ .. code-block:: yaml
+
+ users:
+ - name: user1
+ password: r00tme
+
+ #. Put to model insecure password and Haproxy will put it as
+ insecured in config file:
+
+ .. code-block:: yaml
+
+ users:
+ - name: user2
+ password: r00tme
+ insecure_password: True
+
+ #. Put to model shadowed password and Haproxy will put it in
+ config file:
+
+ .. code-block:: yaml
+
+ users:
+ - name: user3
+ password: '$6$wf0xxoXj$VqoqozsTPpeKZtw6c7gl2CYyEXfOccdif1ZmJwDT1AMKYp/.JUTZcDiZthai3xN9CzDQex9ZUOf3nFMbCm/Oe.'
+ shadow_password: False
+
+To enable Auth rules you need to add following data for your
+backend/frontend/listen setup, for example for ``listen``:
+
+.. code-block:: yaml
+
+ haproxy:
+ proxy:
+ listen:
+ sample_api:
+ acl:
+ auth_reg: "http_auth(sample_users)"
+ http_request:
+ - action: auth
+ condition: 'if !auth_reg'
+
Read more
=========