@@ -4,13 +4,6 @@ import { Callout, Tabs } from 'nextra/components'
4
4
5
5
Audit Logging is functionality exclusive to AuthZed products that publishes logs of SpiceDB API operations to a log sink.
6
6
7
- <Callout type = " info" >
8
- ** Info:**
9
- Audit Logging is currently in Early Access.
10
-
11
- Early Access functionality is production-ready, but requires coordination with your success team to set-up.
12
- </Callout >
13
-
14
7
## Log Format
15
8
16
9
Logs contain the full details related to a request including:
@@ -28,7 +21,7 @@ Logs contain the full details related to a request including:
28
21
{
29
22
"specversion" : " 1.0" ,
30
23
"id" : " 35cdd6662882bd387292ef78a650d18b" ,
31
- "source" : " spicedb " ,
24
+ "source" : " /ps/dev-ps/rc/us-east-1/p/dev-ps-abcd1234 " ,
32
25
"type" : " /authzed.api.v1.SchemaService/ReadSchema" ,
33
26
"datacontenttype" : " application/json" ,
34
27
"time" : " 2023-12-18T17:32:47.234247Z" ,
@@ -55,17 +48,81 @@ Logs contain the full details related to a request including:
55
48
## Log Sinks
56
49
57
50
Log Sinks are the targets where logs will be shipped in order to be persisted.
58
- In order to configure a log sink, you must file a request with your AuthZed customer success team.
59
-
60
- The following are the supported log sinks:
61
-
62
- - [ Apache Kafka] ( https://kafka.apache.org )
63
- - [ AWS Kinesis] ( https://aws.amazon.com/kinesis )
64
- - [ AWS Kinesis Firehose] ( https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html )
65
51
66
52
<Callout type = " info" >
67
53
** Info:**
68
54
We're exploring additional Log Sinks.
69
55
70
56
Please reach out to your success team with any requests.
71
57
</Callout >
58
+
59
+ ### AWS Kinesis and Kinesis Firehose
60
+
61
+ As a prerequisite to use [ Kinesis] or [ Kinesis Firehose] as a log sink, an IAM role must exist in the AWS account
62
+ with the necessary permissions to write to the Kinesis stream or Firehose delivery stream.
63
+
64
+ This is an example policy that grants the necessary permissions to write to a Firehose delivery stream:
65
+
66
+ ``` json
67
+ {
68
+ "Version" : " 2012-10-17" ,
69
+ "Statement" : [
70
+ {
71
+ "Sid" : " " ,
72
+ "Effect" : " Allow" ,
73
+ "Action" : [
74
+ " firehose:PutRecord"
75
+ ],
76
+ "Resource" : " EXAMPLE_FIREHOSE_ARN"
77
+ }
78
+ ]
79
+ }
80
+ ```
81
+
82
+ [ Kinesis ] : https://aws.amazon.com/kinesis
83
+ [ Kinesis Firehose ] : https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html
84
+
85
+ #### Dedicated
86
+
87
+ For Dedicated customers, this role will also need a trust policy which allows the role to be assumed by the AuthZed account
88
+ in order to deliver logs to the stream.
89
+
90
+ To find the Dedicated AWS account ID, navigate to the Permission System's settings page, find the Audit Log settings,
91
+ and choose "AWS Kinesis" or "AWS Kinesis Firehose" as the log sink.
92
+ The account ID will be displayed in the configuration.
93
+
94
+ This is an example trust policy that allows the AuthZed account to assume the role:
95
+
96
+ ``` json
97
+ {
98
+ "Version" : " 2012-10-17" ,
99
+ "Statement" : [
100
+ {
101
+ "Effect" : " Allow" ,
102
+ "Principal" : {
103
+ "AWS" : " EXAMPLE_AUTHZED_ACCOUNT_ID"
104
+ },
105
+ "Action" : " sts:AssumeRole" ,
106
+ "Condition" : {
107
+ "StringEquals" : {
108
+ "sts:ExternalId" : " EXAMPLE_EXTERNAL_ID"
109
+ }
110
+ }
111
+ }
112
+ ]
113
+ }
114
+ ```
115
+
116
+ ## Configuration
117
+
118
+ The process for setting up audit logging varies depending on the AuthZed product you're using.
119
+ Find the instructions for your product below.
120
+
121
+ ### Dedicated
122
+
123
+ Using the web dashboard, navigate to the Permission System's settings page to find the Audit Log settings.
124
+
125
+ ### Self-Hosted
126
+
127
+ Audit logging is configured using command-line flags.
128
+ See the full list of flags in the [ Extenders section] ( extenders#flags ) .
0 commit comments