Skip to content

Commit 22db926

Browse files
committed
Fix config references
1 parent ea3ddd7 commit 22db926

9 files changed

+251
-149
lines changed

auth/auditing.rst

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _audit log:
2+
3+
Audit Log
4+
=========
5+
6+
An audit trail can be enabled to keep track of changes to Alerta.
7+
8+
Every audit event will have an audit ``id``, ``@timestamp``, ``event``,
9+
``category``, ``message``, ``user``, ``resource``, ``request`` and
10+
``extra`` elements. The ``extra`` element may include relevant data
11+
depending on the type of event.
12+
13+
**Example Audit Event**
14+
15+
.. code:: json
16+
17+
{
18+
"id": "c87210da-3cfb-4cbd-b8ec-4fe9ed39aeef",
19+
"@timestamp": "2018-11-10T21:36:23.946Z",
20+
"event": "apikey-deleted",
21+
"category": "admin",
22+
"message": "",
23+
"user": {
24+
"id": "satterly",
25+
"customers": [],
26+
"scopes": [
27+
"admin",
28+
"read",
29+
"write"
30+
]
31+
},
32+
"resource": {
33+
"id": "dc0b5a62-015b-4ba3-965e-012ca2e4db9b",
34+
"type": "apikey"
35+
},
36+
"request": {
37+
"endpoint": "api.delete_key",
38+
"method": "DELETE",
39+
"url": "http://localhost:8080/key/dc0b5a62-015b-4ba3-965e-012ca2e4db9b",
40+
"args": {},
41+
"data": "",
42+
"ipAddress": "127.0.0.1"
43+
},
44+
"extra": {}
45+
}
46+
47+
Audit events can be logged locally to the standard application log
48+
(which could also help with general debugging) or forwarded to a
49+
HTTP endpoint using a POST.
50+
51+
**Example Loggly configuration**
52+
53+
The following example configuration can be used to log all ``admin``,
54+
``write`` and ``auth`` requests to the Flask application log file and
55+
forward the events to the Loggly_ "logging-as-a-service" endpoint,
56+
replacing ``TOKEN`` in the Loggly URL with your customer token.
57+
58+
.. _Loggly: https://www.loggly.com/docs/http-endpoint/
59+
60+
.. code:: python
61+
62+
AUDIT_TRAIL = ['admin', 'write', 'auth']
63+
AUDIT_LOG = True # log to Flask application logger
64+
AUDIT_URL='http://logs-01.loggly.com/inputs/TOKEN/tag/http/'
65+
66+
.. image:: ../_static/images/loggly-screen-shot-2.png

auth/auth-proxy.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
Remote User & Auth Proxy
4+
========================
5+

auth/customers.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
Customer Lookups and Groups
4+
===========================
5+

auth/introduction.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Getting Started
3+
===============
4+
5+
6+
Scenarios
7+
---------
8+
9+
* :ref:`LDAP Authentication <ldap auth>`
10+
* :ref:`Using Custom Scopes <ldap auth>`
11+
* :ref:`Default Roles <ldap auth>`
12+
* :ref:`Guest Roles <ldap auth>`
13+
* :ref:`Readonly Logins <ldap auth>`
14+
* :ref:`Role Mapping <ldap auth>`
15+
* :ref:`Customer Lookups <ldap auth>`
16+
* :ref:`Delete Scopes <ldap auth>`
17+
18+
19+
AUTH_PROXY = False
20+
AUTH_PROXY_USER_HEADER = 'X-Proxy-User' # header field containing the authenticated username
21+
AUTH_PROXY_ROLES_HEADER = 'X-Proxy-Roles' # comma-separated list of authenticated role names
22+
AUTH_PROXY_ROLES_SEPARATOR = ','

auth/roles.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
Permissions & Role Mapping
3+
==========================

authorization.rst

-65
Original file line numberDiff line numberDiff line change
@@ -151,68 +151,3 @@ Use these scopes to request access to API resources.
151151
includes ``read`` and ``write``.
152152

153153
``delete:alerts`` only required to delete alerts if the `DELETE_SCOPES` setting is enabled.
154-
155-
Audit Log
156-
---------
157-
158-
An audit trail can be enabled to keep track of changes to Alerta.
159-
160-
Every audit event will have an audit ``id``, ``@timestamp``, ``event``,
161-
``category``, ``message``, ``user``, ``resource``, ``request`` and
162-
``extra`` elements. The ``extra`` element may include relevant data
163-
depending on the type of event.
164-
165-
**Example Audit Event**
166-
167-
.. code:: json
168-
169-
{
170-
"id": "c87210da-3cfb-4cbd-b8ec-4fe9ed39aeef",
171-
"@timestamp": "2018-11-10T21:36:23.946Z",
172-
"event": "apikey-deleted",
173-
"category": "admin",
174-
"message": "",
175-
"user": {
176-
"id": "satterly",
177-
"customers": [],
178-
"scopes": [
179-
"admin",
180-
"read",
181-
"write"
182-
]
183-
},
184-
"resource": {
185-
"id": "dc0b5a62-015b-4ba3-965e-012ca2e4db9b",
186-
"type": "apikey"
187-
},
188-
"request": {
189-
"endpoint": "api.delete_key",
190-
"method": "DELETE",
191-
"url": "http://localhost:8080/key/dc0b5a62-015b-4ba3-965e-012ca2e4db9b",
192-
"args": {},
193-
"data": "",
194-
"ipAddress": "127.0.0.1"
195-
},
196-
"extra": {}
197-
}
198-
199-
Audit events can be logged locally to the standard application log
200-
(which could also help with general debugging) or forwarded to a
201-
HTTP endpoint using a POST.
202-
203-
**Example Loggly configuration**
204-
205-
The following example configuration can be used to log all ``admin``,
206-
``write`` and ``auth`` requests to the Flask application log file and
207-
forward the events to the Loggly_ "logging-as-a-service" endpoint,
208-
replacing ``TOKEN`` in the Loggly URL with your customer token.
209-
210-
.. _Loggly: https://www.loggly.com/docs/http-endpoint/
211-
212-
.. code:: python
213-
214-
AUDIT_TRAIL = ['admin', 'write', 'auth']
215-
AUDIT_LOG = True # log to Flask application logger
216-
AUDIT_URL='http://logs-01.loggly.com/inputs/TOKEN/tag/http/'
217-
218-
.. image:: _static/images/loggly-screen-shot-2.png

0 commit comments

Comments
 (0)