Okta Auth0 Log Events - Streaming
Sync Type: Push (Webhook)
Overview
This input complements the existing Auth0 Input by providing an alternative real-time log streaming approach instead of polling the Auth0 Management API.
Key Differences from Auth0 Input
| Auth0 Input (Existing) | Auth0 Log Stream Input (This) |
|---|---|
| 🔄 Polls Management API | 📡 Receives real-time HTTP posts |
| 📚 Historical log retrieval | ⚡ Live log events as they occur |
| 🚫 Subject to API rate limits | ✅ No API rate limit concerns |
Prerequisites
- An account Auth0 portal.
- A Machine-to-Machine type application created on Auth0 portal. Click here to see the steps required to create one.
Permissions
- On the left navigation bar click on Applications under Applications menu, it will open up the Application's page.
- Click on APIs tab. Expand the Auth0 Management API option by clicking arrow icon located on extreme right.
- In the permissions section, search and select the following permissions -
- read
- create
- delete
- read
Input Mode
This input operates in one of the below two modes -
- Manual - In this mode you will be configuring everything, from creating Auth0 Log Stream to Monad's Platform API Key. This Input will just read the data that will be posted to Monad's HTTP Input.
- Automatic - Just provide all the credentials listed in the configuration table, input will handle everything and provide the data.
Automatic mode behaviour
- The first time the pipeline starts, Monad creates an HTTP log stream in your Auth0 tenant named
Monad Auth0 Log Stream - <pipeline ID>that posts events to your pipeline. Later starts reuse that log stream. - Test Connection creates a temporary log stream in Auth0 and then deletes it, to confirm the credentials can manage log streams.
- Deleting or disabling the pipeline does not delete the Auth0 log stream. Remove it in the Auth0 Dashboard (or with the Management API) when you no longer need it.
- If the Auth0 log stream created by Monad is deleted in Auth0, delete and recreate the Monad input.
- Use Client ID and Client Secret authentication in this mode. Monad never refreshes an OAuth2 access token, so once the token expires (24 hours by default) the input fails the next time it starts.
Authentication
The following authentication options are supported by this input:
| Authentication Method | Documentation |
|---|---|
| Client ID and Client Secret (confidential applications) | Client secret authentication |
| OAuth2 access tokens | Access tokens |
Get the credentials
- On the left navigation bar click on Applications under Applications menu, it will open up the Application's page.
- Copy the Client ID.
- Head over to Settings tab and copy the Domain value.
- Head over to Credentials tab and copy the Client Secret value.
Generate Management API Access Token (If using OAuth2 Access Token Authentication)
- To ask Auth0 for a Management API v2 token, perform a POST operation to the
https://{yourDomain}/oauth/tokenendpoint, using the credentials of the Machine-to-Machine Application you created in the prerequisite step. - The payload should be in the following format -
Replace yourDomain, yourClientId and yourClientSecret with the credentials collected inCodeGet the Credentialssection. - The response will contain a signed JWT, an expiration time, the scopes granted, and the token type.
Code
- Provide this access token to the Access Token field in the Configuration of this input.
Extra configuration - Manual Mode
Create Monad API Key
- On the left navigation bar in Settings sections, click on API keys.
- On API keys page, click on Create new API key button on right.
- Fill out the required fields, Name is required. Click on Create.
- After clicking on create the API Key value will be visible, copy and store this value immediately as this won't be visible after closing the window.
Create Auth0 Log Stream
You can create the log stream in the Auth0 Dashboard or with the Auth0 Management API.
Whichever you use, configure it with the endpoint, content format and x-api-key header shown in the API example below.
Option 1: Auth0 Dashboard
- On the left navigation bar click on Log Streams under Monitoring menu, it will open up a Log Streams page.
- Click on the "Create Log Stream" button on right.
- There will be a page having different options to choose from, select "Custom Webhook".
- Enter the name of the Log Stream and click "Create", then configure it with the values from the API example below.
Option 2: Auth0 Management API
-
Copy and paste the below command in your terminal, replacing
<pipeline-id>,<api-key>and<management-api-token>(a Management API access token with thecreate:log_streamspermission) with their respective values -Code -
Expected response -
Code
Dedicated deployments
The hostnames on this page are for Monad Cloud, which you sign in to at app.monad.com. If your organization signs in to Monad at its own address instead, such as acme.az.monad.com, replace monad.com in the ingest hostname with that address: <pipeline-id>.data.acme.az.monad.com. Nothing else changes.
Self-hosted deployments
A per-pipeline ingest host needs the *.data.<your Monad domain> wildcard in place: a DNS record plus a matching certificate SAN. Monad Cloud has this. A self-hosted deployment has it only if whoever installed Monad set it up, so check with them if you are not sure. See Per-pipeline ingest host for the setup.
Without it, send exactly the same request to your own Monad hostname, with the pipeline ID in the path:
https://<your-monad-host>/api/v2/http/send/<pipeline-id>
Authentication, request body, and responses are the same either way.
Configuration
Settings
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | No | - | Base URL for the Auth0 management console |
auth_type | string | No | client_credentials | Authentication Type used by the input Allowed values: client_credentials (Client ID and Client Secret (Confidential Applications)), oauth2_access_token (OAuth2 Access Token). |
audience | string | No | - | Example - https://demo-dev.us.auth0.com/api/v2/ |
input_mode | string | Yes | manual | Mode in which this input will operate, Manual if you want to do full configuration and Automatic if you want input to handle everything Allowed values: manual (Manual), automatic (Automatic). |
use_synthetic_data | bool | No | false | Generate synthetic data for testing, instead of connecting to a real data source. Defaults to an hourly cron schedule for cron-based inputs. |
Secrets
| Secret | Type | Required | Description |
|---|---|---|---|
client_id | secret | No | Auth0 application's Client ID |
client_secret | secret | No | Auth0 application's Client secret |
access_token | secret | No | Auth0 Management API Access Token |
monad_api_key | secret | No | API key to access the platform API |
Sample Audit Log
Code
Related Articles
Sync frequency
This input does not poll. Auth0 pushes log events to Monad as they occur, so there is no cron schedule or polling interval to configure.