Skip to content

Commit

Permalink
Merge pull request #105 from formancehq/feat/ee
Browse files Browse the repository at this point in the history
feat: move ee audit log to public docs
  • Loading branch information
altitude authored Aug 2, 2024
2 parents fac5b7c + b2b1217 commit cdba2d2
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 0 deletions.
103 changes: 103 additions & 0 deletions docs/stack/ee/audit-log.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
title: Audit Log
---
import Warning from '../../stack/partials/_ee.mdx';

<Warning/>

The Formance Platform ships with an Audit Log feature that allows you to track all activity within the platform, including activity events from API usage, organisation users, or machine-generated events. This feature is available for Enterprise Edition users.

## Initialisation

Contact our support team in order to enable the Audit Log on your deployment. Once set up, logging will start at the current date for all activity on your organization, stacks, and enabled modules.

## Concepts

The audit log system operates at three levels:
* **Organisation**: Providing a detailed overview of all activity tied to the organisation itself, e.g. whenever a user is invited, has their permissions updated, or a new resource is created.
* **Resources**: Providing a detailed event history of the lifecycle of the Formance Platform deployments created within the organisation.
* **Modules**: Providing a detailed event history of the modules activity within a stack.

Each event record consists of the following fields:

| Identifier | Origin | Date | Action | Data |
|------------|---------|------------|--------|------|
| A unique identifier for the event | The user or system that triggered the event | The timestamp when the event occurred in ISO 8601 format | Code for the event triggered | Additional information about the event |

## Usage

### Organisation logs

Organisation logs provide a detailed overview of all activity tied to the organisation itself. You can access these logs by using fctl with the following command:

```
fctl cloud org history <organization-id>
```

The following events are available:

| Scope | Event |
|--------|---------------------------------|
| organizations | organizations.created |
| organizations | organizations.deleted |
| organizations | organizations.updated |
| organizations | organizations.user.deleted |
| organizations | organizations.user.updated |
| invitations | invitations.created |
| invitations | invitations.accepted |
| invitations | invitations.accepted-from-link |
| invitations | invitations.rejected |
| regions | regions.created |
| regions | regions.deleted |
| users | users.created |
| users | users.join-domain |
| stacks | stacks.created |
| stacks | stacks.deleted |
| stacks | stacks.restored |
| stacks | stacks.updated |
| stacks | stacks.enabled |
| stacks | stacks.disabled |
| stacks | stacks.upgraded |

### Resources logs

Resources logs operate at the stack level, and provides a detailed event history of the lifecycle of the stack itself.

You can get an overview of these logs by using fctl with the following command:
```
fctl stack history <stack-id>
```
This event list is availble through the Formance Platform API (contact our support team for API access).

The following events are availble for the stack resource logs:

| Scope | Event |
|--------|---------------------|
| stacks | stacks.disposal |
| stacks | stacks.disposal-reset |
| stacks | stacks.warned |
| stacks | stacks.pruned |
| stacks | stacks.status.updated |
| stacks | stacks.reachness.updated |
| stacks | stacks.module.enabled |
| stacks | stacks.module.disabled |
| stacks | stacks.module.status.updated |

### Modules logs

To access the modules activity logs, navigate to the "manage environments" section or directly access it from [here](https://console.formance.cloud/membership/stacks) of the console interface. From here, select navigate to the stack that you want to view the Audit Log for.

In the stack information panel, under the Audit logs section, navigate through the "Show logs" button to head to the Audit Log page.

Events available for the modules logs are structured as follows:

| Field | Description | Path |
|-------------------|---------------------------------------------|-------------------------------------------|
| Identity | The originating user or machine token | `data.identity` |
| HTTP Method | The method used (e.g., GET, POST) | `data.request.method` |
| Status Code | The response status code (e.g., 200) | `data.response.status_code` |
| Host | The host of the request | `data.request.host` |
| Endpoint | The API endpoint accessed | `data.request.path` |
| Request Headers | Headers included in the request | `data.request.header.*` |
| Response Headers | Headers included in the response | `data.response.headers.*` |
| Response Body | Content of the response body | `data.response.body` |
6 changes: 6 additions & 0 deletions docs/stack/ee/rbac.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Role-Based Access Control (RBAC)
---
import Warning from '../../stack/partials/_ee.mdx';

<Warning/>
6 changes: 6 additions & 0 deletions docs/stack/ee/sso.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Single Sign-On (SSO)
---
import Warning from '../../stack/partials/_ee.mdx';

<Warning/>
3 changes: 3 additions & 0 deletions docs/stack/partials/_ee.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:::info
This feature is available in the Enterprise Edition of The Formance Platform. It is available as a preview on Formance Cloud sandboxes.
:::
18 changes: 18 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,24 @@ const sidebars = {
type: "doc",
id: "stack/versions",
},
{
type: "category",
label: "Enterprise",
items: [
{
type: "doc",
id: "stack/ee/audit-log",
},
// {
// type: "doc",
// id: "stack/ee/sso",
// },
// {
// type: "doc",
// id: "stack/ee/rbac",
// },
],
},
],
},
{
Expand Down

0 comments on commit cdba2d2

Please sign in to comment.