diff --git a/docs/actions/_static/live-events/event-stream-https-dialog.png b/docs/actions/_static/live-events/event-stream-https-dialog.png new file mode 100644 index 000000000..b7abd5e7b Binary files /dev/null and b/docs/actions/_static/live-events/event-stream-https-dialog.png differ diff --git a/docs/actions/_static/live-events/event-stream-sns-dialog.png b/docs/actions/_static/live-events/event-stream-sns-dialog.png new file mode 100644 index 000000000..4fe83a854 Binary files /dev/null and b/docs/actions/_static/live-events/event-stream-sns-dialog.png differ diff --git a/docs/actions/_static/live-events/event-streams-empty.png b/docs/actions/_static/live-events/event-streams-empty.png new file mode 100644 index 000000000..d7835ab01 Binary files /dev/null and b/docs/actions/_static/live-events/event-streams-empty.png differ diff --git a/docs/actions/live-events.mdx b/docs/actions/live-events.mdx index 687b279fc..5250c68a7 100644 --- a/docs/actions/live-events.mdx +++ b/docs/actions/live-events.mdx @@ -6,6 +6,12 @@ sidebar_label: Event streams # Live event streams +```mdx-code-block +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import BrowserWindow from "@site/src/theme/BrowserWindow" +``` + You can stream events (sign-ups, logins, machine-to-machine tokens issued, and many more) in real-time, live as they happen in your Ory Network project, to your own infrastructure. Pipe those events into your own data warehouse, data lake, or flavor of choice, and use them to power your own analytics, dashboards, data science, and more. @@ -179,6 +185,49 @@ requirements! Event streams can be implemented for any data warehouse, data lake To stream events to an HTTPS endpoint, provide the URL of the endpoint when configuring the event stream: +```mdx-code-block + + +``` + +1. Go to your project in the [Ory Console](https://console.ory.sh). + +2. Click **Project settings** in the top navigation bar. + +3. Click **Event streams** in the left sidebar. + +4. Click **Create new Event Stream**. + +```mdx-code-block + + ![Event streams page with the Create new Event Stream button](./_static/live-events/event-streams-empty.png) + +``` + +5. In the **Create new Event Stream** dialog: + + - **Event Stream Type** — Select **HTTPS**. + + - **HTTPS endpoint** — Enter the URL of your endpoint, for example `https://example.com/my-event-endpoint`. + +6. Click **Create**. The new stream appears in the event streams table. + +```mdx-code-block + + ![Create new Event Stream dialog with HTTPS type selected](./_static/live-events/event-stream-https-dialog.png) + +``` + +```mdx-code-block + + +``` + ```shell ory create event-stream --project "$YOUR_PROJECT_ID" \ @@ -186,6 +235,11 @@ ory create event-stream --https-endpoint https://example.com/my-event-endpoint ``` +```mdx-code-block + + +``` + Unencrypted HTTP endpoints are not supported. Your endpoint must be able to handle POST requests with a JSON body, and respond with a 2xx status code to acknowledge successful processing of the event. HTTP redirects are _not_ followed and are treated as delivery failures. @@ -250,17 +304,61 @@ arn:aws:iam::123456789012:role/ory-network-event-streamer This allows Ory Network to assume the role in your AWS account, and publish to your SNS topic. -4. Use the Ory CLI to configure the event stream, replacing the ARNs with those recorded in steps 1 and 2: +4. Configure the event stream, replacing the ARNs with those recorded in steps 1 and 2: -```shell -ory create event-stream - --project "$YOUR_PROJECT_ID" \ - --type sns \ - --aws-sns-topic-arn "$YOUR_TOPIC_ARN" \ - --aws-iam-role-arn "$YOUR_IAM_ROLE_ARN" -``` + ```mdx-code-block + + + ``` + + a. Go to your project in the [Ory Console](https://console.ory.sh). + + b. Click **Project settings** in the top navigation bar. + + c. Click **Event streams** in the left sidebar. + + d. Click **Create new Event Stream**. + + e. In the **Create new Event Stream** dialog: + + - **Event Stream Type** — Select **AWS SNS**. + + - **Role ARN** — Paste the IAM role ARN from step 2. + + - **Topic ARN** — Paste the SNS topic ARN from step 1. + + f. Click **Create**. The new stream appears in the event streams table. + + ```mdx-code-block + + ![Create new Event Stream dialog with AWS SNS type selected](./_static/live-events/event-stream-sns-dialog.png) + + ``` + + ```mdx-code-block + + + ``` + + ```shell + ory create event-stream + --project "$YOUR_PROJECT_ID" \ + --type sns \ + --aws-sns-topic-arn "$YOUR_TOPIC_ARN" \ + --aws-iam-role-arn "$YOUR_IAM_ROLE_ARN" + ``` + + ```mdx-code-block + + + ``` -5. You are now ready to receive events in your AWS SNS topic! +5. You are now ready to receive events in your AWS SNS topic! :::tip