# Audit & Traceability

## State Information

You automatically gain insights into the state of your applications and APIs secured with LeZa.

### User sessions

At any point in time administrators can check active sessions for users with very detailed information like the location of the session, the machine, operating system and more.

```
{
    "_id": "60e47b84c38ed482gg780f87",
    "browser": {
        "type": "browser",
        "name": "Chrome",
        "version": "91.0",
        "engine": "Blink",
        "engineVersion": ""
    },
    "os": {
        "name": "GNU/Linux",
        "version": "",
        "platform": "x64"
    },
    "device": {
        "type": "desktop",
        "brand": "",
        "model": ""
    },
    "bot": null,
    "ip": "161.35.614.165",
    "geoLocationInfoOfIp": {
        "ip": "161.35.214.167",
        "country_code": "DE",
        "country_name": "Germany",
        "region_code": "HE",
        "region_name": "Hesse",
        "city": "Frankfurt am Main",
        "zip_code": "60313",
        "time_zone": "Europe/Berlin",
        "latitude": 50.1188,
        "longitude": 8.6843,
        "metro_code": 0
    },
    "machine_identifier": "-spwGnVaPEJyYHi6-V5RqfoTJ8ZA.wdPS7sH_GkKeTwU1rZp6rehY",
    "performer": {
        "id": "422129df-6611-45e9-adf1-83a",
        "name": "John Doe",
        "email": "doe@deer.com",
        "picture_url": "https://res.cloudinary.com/dfprwegge/image/upload/v1580297552/2ba96261-94e1-41e1-8c9d3bb.png",
        "organization_id": "fb1cf8e-1a90aa6f1d58",
        "organization_name": "Umbrella Academy",
        "role_name": "Super Natural",
        "redirect_uris": "https://app.yourcloud.com/auth/callback",
        "clientid": "6e851a76-cfc-410-b49-4f171b9",
        "organization_unit_id": null,
        "organization_unit_name": null,
        "organization_unit_labels": null,
        "organizations": [
            {
                "id": "fb1cf80-4e25-4c-ab8e-1f1d58",
                "name": "Umbrella Academy",
                "type": "Rocket Dep",
                "labels": []
            }
        ]
    },
    "session_start": "2025-07-06T15:49:24.062Z",
    "__v": 0
}
```

### Service Availability

If you configured your applications and services with ping methods you will be able to see if your services are accessible and set up alarm notifications in case of failure.

## Logs

Logging is a common useful requirement in all applications and with LeZa you won't have to redo an implementation for this. We are certain that you already have enough work on your hands by coding and logging your business logic, that's why we take care of this for you.

### Access Logs

LeZa provides a very detailed view of all API accesses in your application or organization. This allows users to track all kinds of usage activities. (*see tabs below*)

### Audit Logs

LeZa automatically logs all changes made inside the [administration platform](https://docs.leza.glasc.io/master#the-platform). This enables full end-2end traceability. You will automatically understand who and what type of changes were performed each step of the way. For example, you can see who changed the permissions for a certain role, and the whole history of changes for that role. (*see tabs below*)

{% tabs %}
{% tab title="Access Logs" %}
**AUDIT ACCESS ADVISORY SESSION LOG** FROM: 2025-06-08  TO: 2025-07-08

| Time         | Action Type | Endpoint                                                   | Endpoint Type | Reason                                                                                                                | Details      |
| ------------ | ----------- | ---------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- | ------------ |
| 4 HOURS AGO  | logout      | /logout                                                    | GET           | User has the permission to logout                                                                                     | MORE DETAILS |
| 4 HOURS AGO  | access      | /api/v2/ti-api/geofence?organizationId=5e-32c7-41a5-8a5d-c | GET           | User has the permission **Live Tracking Page Permission** to access this resource of this application **Insight App** | MORE DETAILS |
| {% endtab %} |             |                                                            |               |                                                                                                                       |              |

{% tab title="Audit Logs" %}
**AUDIT  LOG** FROM: 2025-06-08  TO: 2025-07-08

| Time          | Action                                       | Details      |
| ------------- | -------------------------------------------- | ------------ |
| 2 MONTHS AGO  | John Doe   update\_application  LeZa Account | MORE DETAILS |
| 2 MONTHS AGO  | Jenny Admin  add\_application  LeZa Account  | MORE DETAILS |
| {% endtab %}  |                                              |              |
| {% endtabs %} |                                              |              |
