Sonuç
Araştırmalar sonucunda verien karar, NoSql DB ( Amazon DynamoDB ) kullanılarak oluşturularak bir audit log sistemi yapılacaktır.
Akışımız
Her istek atıldığında api tarafında HttpServletRequest
e requestTime setlenecek , gerçekleştirilen kayıtların ardından gelen cevaplar ve hatalara göre http filter ile veri tabanımıza kayıt atılacaktır.
Not: HttpServletRequest
e requestTime setlenen requestTime Burada get edilip db ye yazılacaktır.
Request veya response’daki hassas bilgiler için maskeleme işlemi uygulanacaktır.
Saklanacak Veriler
IP : İstek atan ip adresi
192.168.0.1
User ID : Eğer kullanıcımız var ise kullanıcı id’sini tutmak
1c911d7d-dd0c-4b11-a067-d49c963e3a5e
Origin: isteğin geldiği origin
https://example-ui.com
Path : Path’i tutacak alandır
/user/login
Http Method : Http method’u tutacak alandır
GET | POST | PUT | PATCH | DELETE
User Agent : İstek atan cihaz/tarayıcı bilgileri
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Request Header : İstekle ilgili başlık bilgilerini tutan bir alandır
{ "host": "localhost:8080", "user-agent": "PostmanRuntime/7.26.10", "accept": "/", "cache-control": "no-cache", "postman-token": "1234abcd", "accept-encoding": "gzip, deflate, br", "connection": "keep-alive" }
Request Body : İstekle ilgili başlık bilgilerini tutan bir alandır
{ "name": "John", "age": 30, "email": "john@example.com" }
Response Status Code : HTTP durum kodu
200, 500
Response Code : Her isteğin döndürdüğü unique code
123e4567-e89b-12d3-a456-426614174000
Response Body : API'nin döndüğü yanıt eğer varsa
{ "time": "2024-07-01T21:21:21.879518571", "isSuccess": true, "response": { "createdUser": "agitrubard", "createdAt": "2024-06-24T13:32:49", "updatedUser": "AYS", "updatedAt": "2024-07-01T21:20:41", "id": "4eb44207-b6a8-4d9c-82c2-292840e4f897", "reason": "Mo Alam için oluşturuldu.", "rejectReason": null, "status": "COMPLETED", "institution": { "id": "d95b59c7-9ac1-4be3-a981-33af1d3f8386", "name": "Disaster Foundation" }, "user": { "id": "828198fd-70b7-4037-9ece-b94274e72524", "firstName": "Buğra", "lastName": "Ercan", "city": "İstanbul", "emailAddress": "bugra.ercan@afetyonetimsistemi.org", "phoneNumber": { "countryCode": "90", "lineNumber": "5051237891" } } } }
Created At : Verinin oluşturulma tarihi
2024-10-06T12:30:45
Updated At : Verinin güncellenme tarihi
2024-10-06T12:30:45
Burdan ilgili veri modeli analizine gidebilirsiniz.