diff --git a/docs/my-website/docs/proxy/enterprise.md b/docs/my-website/docs/proxy/enterprise.md index 6789fb6ef2..8ea8e748e9 100644 --- a/docs/my-website/docs/proxy/enterprise.md +++ b/docs/my-website/docs/proxy/enterprise.md @@ -43,59 +43,6 @@ Features: - ✅ [Public Model Hub](#public-model-hub) - ✅ [Custom Email Branding](./email.md#customizing-email-branding) -## Security - -### Audit Logs - -Store Audit logs for **Create, Update Delete Operations** done on `Teams` and `Virtual Keys` - -**Step 1** Switch on audit Logs -```shell -litellm_settings: - store_audit_logs: true -``` - -Start the litellm proxy with this config - -**Step 2** Test it - Create a Team - -```shell -curl --location 'http://0.0.0.0:4000/team/new' \ - --header 'Authorization: Bearer sk-1234' \ - --header 'Content-Type: application/json' \ - --data '{ - "max_budget": 2 - }' -``` - -**Step 3** Expected Log - -```json -{ - "id": "e1760e10-4264-4499-82cd-c08c86c8d05b", - "updated_at": "2024-06-06T02:10:40.836420+00:00", - "changed_by": "109010464461339474872", - "action": "created", - "table_name": "LiteLLM_TeamTable", - "object_id": "82e725b5-053f-459d-9a52-867191635446", - "before_value": null, - "updated_values": { - "team_id": "82e725b5-053f-459d-9a52-867191635446", - "admins": [], - "members": [], - "members_with_roles": [ - { - "role": "admin", - "user_id": "109010464461339474872" - } - ], - "max_budget": 2.0, - "models": [], - "blocked": false - } -} -``` - ### Blocking web crawlers diff --git a/docs/my-website/docs/proxy/multiple_admins.md b/docs/my-website/docs/proxy/multiple_admins.md index e43b1e13bd..479b9323ad 100644 --- a/docs/my-website/docs/proxy/multiple_admins.md +++ b/docs/my-website/docs/proxy/multiple_admins.md @@ -1,7 +1,22 @@ -# Attribute Management changes to Users +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import Image from '@theme/IdealImage'; -Call management endpoints on behalf of a user. (Useful when connecting proxy to your development platform). +# ✨ Audit Logs + + + + +As a Proxy Admin, you can check if and when a entity (key, team, user, model) was created, updated, deleted, or regenerated, along with who performed the action. This is useful for auditing and compliance. + +LiteLLM tracks changes to the following entities and actions: + +- **Entities:** Keys, Teams, Users, Models +- **Actions:** Create, Update, Delete, Regenerate :::tip @@ -9,14 +24,45 @@ Requires Enterprise License, Get in touch with us [here](https://calendly.com/d/ ::: -## 1. Switch on audit Logs +## Usage + +### 1. Switch on audit Logs Add `store_audit_logs` to your litellm config.yaml and then start the proxy ```shell litellm_settings: store_audit_logs: true ``` -## 2. Set `LiteLLM-Changed-By` in request headers +### 2. Make a change to an entity + +In this example, we will delete a key. + +```shell +curl -X POST 'http://0.0.0.0:4000/key/delete' \ + -H 'Authorization: Bearer sk-1234' \ + -H 'Content-Type: application/json' \ + -d '{ + "key": "d5265fc73296c8fea819b4525590c99beab8c707e465afdf60dab57e1fa145e4" + }' +``` + +### 3. View the audit log on LiteLLM UI + +On the LiteLLM UI, navigate to Logs -> Audit Logs. You should see the audit log for the key deletion. + + + + +## Advanced + +### Attribute Management changes to Users + +Call management endpoints on behalf of a user. (Useful when connecting proxy to your development platform). + +## 1. Set `LiteLLM-Changed-By` in request headers Set the 'user_id' in request headers, when calling a management endpoint. [View Full List](https://litellm-api.up.railway.app/#/team%20management). @@ -36,7 +82,7 @@ curl -X POST 'http://0.0.0.0:4000/team/update' \ }' ``` -## 3. Emitted Audit Log +## 2. Emitted Audit Log ```bash { diff --git a/docs/my-website/img/key_delete.png b/docs/my-website/img/key_delete.png new file mode 100644 index 0000000000..f555af6585 Binary files /dev/null and b/docs/my-website/img/key_delete.png differ diff --git a/docs/my-website/img/release_notes/ui_audit_log.png b/docs/my-website/img/release_notes/ui_audit_log.png new file mode 100644 index 0000000000..2ce594507b Binary files /dev/null and b/docs/my-website/img/release_notes/ui_audit_log.png differ diff --git a/docs/my-website/release_notes/v1.72.2/index.md b/docs/my-website/release_notes/v1.72.2/index.md index eb49001781..0f7da53b8b 100644 --- a/docs/my-website/release_notes/v1.72.2/index.md +++ b/docs/my-website/release_notes/v1.72.2/index.md @@ -75,6 +75,21 @@ This release brings significant performance improvements to the `/v1/messages` A style={{width: '100%', display: 'block', margin: '2rem auto'}} /> +## Audit Logs on UI + +This release introduces support for viewing audit logs in the UI. As a Proxy Admin, you can now check if and when a key was deleted, along with who performed the action. + +LiteLLM tracks changes to the following entities and actions: + +- **Entities:** Keys, Teams, Users, Models +- **Actions:** Create, Update, Delete, Regenerate + + + + ## New Models / Updated Models