]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Audit REST API calls
authorVolker Theile <vtheile@suse.com>
Mon, 8 Oct 2018 07:28:57 +0000 (09:28 +0200)
committerVolker Theile <vtheile@suse.com>
Mon, 5 Nov 2018 09:56:28 +0000 (10:56 +0100)
commit22e07ff1a4f4bef7ae0e315ea8ef99e78cc05581
treeb66f6f90a48ad8b341b5c764b8ed043946e96874
parent8931f8cd1443719a04fcf2d76f654f8e606222e4
mgr/dashboard: Audit REST API calls

Fixes: https://tracker.ceph.com/issues/36193
Enable API auditing with 'ceph dashboard set-audit-api-enabled true' (default is false). If you do not want to log the request payload, then disable it via 'set-audit-api-log-payload false' (default is true).

Example output:
2018-10-08 10:25:21.850994 mgr.x [INF] [DASHBOARD] from='https://[::1]:44410' path='/api/auth' method='POST' user='None' params='{"username": "admin", "password": "***", "stay_signed_in": false}'

Signed-off-by: Volker Theile <vtheile@suse.com>
doc/mgr/dashboard.rst
src/pybind/mgr/dashboard/controllers/__init__.py
src/pybind/mgr/dashboard/module.py
src/pybind/mgr/dashboard/settings.py
src/pybind/mgr/dashboard/tests/helper.py
src/pybind/mgr/dashboard/tests/test_api_auditing.py [new file with mode: 0644]
src/pybind/mgr/dashboard/tests/test_tools.py
src/pybind/mgr/dashboard/tools.py