Kubesense

Auth0 Logs

Stream your Auth0 tenant logs (logins, signups, token exchanges, MFA, Management API calls) into KubeSense with an Auth0 Custom Webhook log stream.

Auth0 records every authentication event in your tenant: successful and failed logins, signups, token exchanges, password resets, MFA, blocked accounts and Management API calls. With an Auth0 Custom Webhook log stream, Auth0 pushes these events to KubeSense within seconds. They are stored with your other logs, so you can search them on the Logs page, alert on failed logins and put them next to your application logs.

Auth0 posts straight to your KubeSense endpoint. You don't need to run any relay function or extra service.


How it flows

Auth0 tenant (Monitoring > Streams > Custom Webhook)
   │  POST https://<KUBESENSE_INGEST_HOST>/auth0logs   (JSON Array, batched every few seconds)
   │  Authorization: Basic <token>
   ▼
KubeSense
   │  checks the token, turns each Auth0 event into a log
   ▼
Logs page

Events usually show up in KubeSense a few seconds after they happen in Auth0.


Before you start

You need:

  • An Auth0 plan that includes log streaming. Not every Auth0 plan does. If creating the stream fails with Your current subscription plan does not support log streams, the tenant's plan has to be upgraded first.
  • A dashboard admin on the Auth0 tenant, to create the stream.
  • Two values from KubeSense. Ask your KubeSense contact for them. KubeSense sets up the endpoint on its side.
ValueExample
Endpoint URLhttps://<KUBESENSE_INGEST_HOST>/auth0logs
Authorization tokenBasic YXV0aDA6...

warning: Treat the authorization token like a password. Anyone who has it can send logs to your KubeSense.


1. Create the log stream in Auth0

Auth0 Dashboard

  1. Go to Monitoring → Streams and click Create Stream.
  2. Choose Custom Webhook and give the stream a name, for example KubeSense.
  3. Fill in the settings:
SettingValue
Payload URLThe endpoint URL from KubeSense. Optionally add the parameters from section 2
Authorization TokenThe authorization token from KubeSense, including the Basic prefix
Content Typeapplication/json
Content FormatJSON Array
Filter by Event CategoryLeave empty to send all events, or pick only the categories you want
  1. Click Save. Auth0 starts sending with the next log events in the tenant.

warning: Choose JSON Array as the Content Format. With JSON Lines or JSON Object, the events are not read correctly.

Auth0 CLI (alternative)

auth0 logs streams create http \
  --name "KubeSense" \
  --endpoint "https://<KUBESENSE_INGEST_HOST>/auth0logs" \
  --type "application/json" \
  --format JSONARRAY \
  --authorization "Basic <token>"

If you already have a Custom Webhook stream that sends to another destination, you can repoint it instead of creating a new one. Change its Payload URL, Authorization Token and Content Format to the values above.

Check that logs arrive

Sign in to one of your Auth0 applications, or trigger a failed login. Within a minute, the event shows up on the KubeSense Logs page with Source = auth0.


2. Name the cluster and add tags (optional)

On the Logs page, every log belongs to a cluster. Auth0 logs use your Auth0 tenant name as their cluster unless you set one. To set the cluster, the environment type or extra tags, add them to the stream's Payload URL as query parameters. Each one is optional. Each stream can use its own values, so several tenants or environments can send to the same endpoint and still be told apart.

https://<KUBESENSE_INGEST_HOST>/auth0logs?kubesense.cluster=auth0-prod&kubesense.env_type=auth0&kubesense.tags=team:iam,region:us-east-1
ParameterSetsWhen omitted
kubesense.clusterThe log's ClusterYour Auth0 tenant name
kubesense.env_typeThe log's Environment typeauth0
kubesense.tagsTags, as comma-separated key:value pairs. Add as many as you needNo tags

URL-encode values that contain spaces or &, for example %20 for a space. A change takes effect from the next batch Auth0 sends. Nothing needs to be restarted.

info: For example, with one stream for each tenant, kubesense.cluster=auth0-prod on the production tenant's stream and kubesense.cluster=auth0-dev on the development tenant's stream keep the two apart on the Logs page.


3. Where the logs show up

Auth0 logs appear on the Logs page next to your other logs. Filter on Source = auth0 to see only them.

Logs page fieldComes from
TimestampThe time of the event in Auth0, not the time it arrived
SourceAlways auth0
Clusterkubesense.cluster, otherwise your Auth0 tenant name
Environment typekubesense.env_type, otherwise auth0
WorkloadYour Auth0 tenant name
NamespaceThe Auth0 environment, for example prod-us-5
InstanceThe Auth0 application (client_name), otherwise the tenant hostname
HostThe tenant hostname, for example your-tenant.us.auth0.com
LevelSet from the event type, see Levels
Body<type>: <description>, for example fp: Wrong email or password.
Tagskubesense.tags

Attributes

Each log carries these attributes, so you can filter, group and alert on them:

AttributeExample
typefp (the Auth0 event type code)
event_namefailed_login_incorrect_password
levelERROR
tenantyour-tenant
client_name, client_idCustomer Portal, ntBz...
connectionUsername-Password-Authentication
user_name, user_idjane@example.com, auth0|64f...
ip, country, city203.0.113.10, IN, Mumbai
log_idThe Auth0 log ID, for finding the same event in Auth0

The complete Auth0 event, including details, user_agent and location_info, is kept with the log too.

Levels

LevelEvent types
ERRORFailures: every type that starts with f (f, fp, fu, fs, fepft, feccft, fertft, fapi, ...). Also blocked accounts, IPs and users (limit_wc, limit_mu, limit_ui), leaked passwords (pwd_leak) and failed or rejected MFA (gd_auth_failed, gd_auth_rejected, gd_recovery_failed, gd_otp_rate_limit)
WARNw (warning), depnote (deprecation notice), mfar (MFA required)
INFOEverything else: successes (s, ss, sepft, seccft, scp, ...), Management API calls (sapi, mgmt_api_read) and other informational events

Common event types

Typeevent_name
ssuccess_login
ffailed_login
fpfailed_login_incorrect_password
fufailed_login_invalid_email
ss / fssuccess_signup / failed_signup
slo / flosuccess_logout / failed_logout
sepft / fepftsuccess_exchange_password_for_token / failed_exchange_password_for_token
seccft / feccftsuccess_exchange_client_credentials_for_token / failed_exchange_client_credentials_for_token
seacft / feacftsuccess_exchange_auth_code_for_token / failed_exchange_auth_code_for_token
sertft / fertftsuccess_exchange_refresh_token / failed_exchange_refresh_token
scprsuccess_change_password_request
limit_wc / limit_mublocked_account / blocked_ip
sapisuccess_api_operation
mgmt_api_readmanagement_api_read

An event type that isn't in this list keeps its Auth0 code as its event_name. New Auth0 event types are still stored and searchable.

Things to try

  • All failed logins: filter Source = auth0 and Level = ERROR.
  • One user's activity: filter on the user_name attribute.
  • Logins from an unexpected country: group by the country attribute.
  • Brute-force alerts: alert when event_name = failed_login_incorrect_password exceeds a threshold for one user_name or ip. See Alerts.

4. Troubleshooting

SymptomCheck
Creating the stream fails with subscription plan does not support log streamsYour Auth0 plan does not include log streaming
The stream reports 401 Unauthorized errorsThe Authorization Token does not match the one from KubeSense. Paste it again, including the Basic prefix
The stream reports 404 errorsThe Payload URL is wrong. It must end in /auth0logs
Auth0 shows the stream as DisabledAuth0 disables a stream after repeated delivery failures. Fix the cause above, then click Restart Stream in Auth0
The stream is active but no logs appearCheck that the Content Format is JSON Array, then contact KubeSense support
Only some events arriveFilter by Event Category is set on the stream
Logs appear under an unexpected clusterThe Payload URL has no kubesense.cluster, so the tenant name is used (section 2)

To see Auth0's side of delivery, go to Monitoring → Streams, open the more options menu (…) of the stream and click Health. It lists the last ten delivery errors from the past five days.


Changing the token

If the token has to be changed, for example after it was shared by mistake:

  1. Ask your KubeSense contact for a new token.
  2. Paste the new token into the stream's Authorization Token in Auth0 and save.

Auth0 retries deliveries that fail, so events sent while the token is being changed are delivered once the new token is in place.