iris-api-audit-mediator
This is a ObjectScript Application to audit API methods requests.
Can be developed with Docker and VSCode,
can be deployed as ZPM module.
Installation for development
Clone/git pull the repo into any local directory e.g. like it is shown below (here I show all the examples related to this repository, but I assume you have your own derived from the template):
$ git clone git@github.com:yurimarx/iris-api-audit-mediator.git
Open the terminal in this directory and run:
$ docker-compose up -d --build
Installation with ZPM
zpm:USER>install iris-api-audit-mediator
How it Works
- Clone the project
$ git clone git@github.com:yurimarx/iris-api-audit-mediator.git
- Build and up the project source code
$ docker-compose up -d --build
- My project create the User Defined Audit Event on build into iris.script file, with the command:
Do ##class(Security.Events).Create("RESTAPI","Request","RESTAPI","REST API Requests")
- Go to Management Portal -> System Administration -> Security -> Auditing -> Configure User Events
- See my event created, with:
- Set Event Source: RESTAPI
- Set Event Type: Request
- Set Event Name: RESTAPI
- In this case is not necessary, but if you need create other audit events with other types and names, use the button Create New Event
- Populate your Person app with data, call the endpoint http://localhost:52773/crud/persons/populate
- Now, call http://localhost:52773/crud/persons/all, or any other endpoint
- This request will be registered into Audit database
- Now Go to Management Portal -> System Administration -> Security -> Auditing -> View Auditing Database
- Looking for rows with Event Source RESTAPI and Event Type Request and click Detail to see audit record details.
- Enjoy!
Future features
- Config custom audit messages
Thanks to:
- Robert Cemper: beta tester
- Evgeny Shvarov: iris-rest-api-template was the base to this app