Altinn / altinn-auth-audit-log

Audit log for authentication and authorisation activities
MIT License
0 stars 1 forks source link

Establish a GET endpoint in auditlog api to retreive logs based on a user id, party id, organisation and date #77

Open acn-dgopa opened 4 months ago

acn-dgopa commented 4 months ago

Description

Currently we have some K6 tests in auditlog api app that can be run after deploy in any environment. The auditlog api will have access limited only to function app that processes the authentication and authorization events. So instead of running several independent test suites against auditlog api and function app, it is a good idea to create end-to-end tests f.ex

  1. The test will start at a point where the bruno tests will add a queue message to the Queue storage
  2. The new message in the queue storage will trigger the function app
  3. The function app will process it and store in the database.

Now to verify that the end-to-end test, we have to assert the queue message against data in the database. This can be acheived by either running some db script (needs some access setting) to fetch the data from database or via a get endpoint that can retreive the log based on userid,partyid,organisationid or date. The latter if established can also be used by the service desk team to verify some data in connection to any service desk cases.

Tasks

Acceptance Criteria