global.allowed_origins is a list of the origins that SigNoz accepts as redirect targets during single sign-on (SSO) login. An origin is the scheme, host, and port of a URL, for example https://signoz.example.com. When you set the list, SigNoz rejects a crafted login link or a forged SAML RelayState that tries to send a signed-in user, and the session token, to another site.
The list is empty by default. With an empty list, SigNoz does not check redirect origins, so nothing changes until you set it.
Configuration
Set the SIGNOZ_GLOBAL_ALLOWED__ORIGINS environment variable on the SigNoz service. Separate the origins with commas:
SIGNOZ_GLOBAL_ALLOWED__ORIGINS=<signoz-ui-origin>,<additional-origin>If you use a SigNoz config file instead, set the same list under global:
global:
allowed_origins:
- <signoz-ui-origin>
- <additional-origin>Verify these values:
<signoz-ui-origin>: The origin that users open SigNoz on, for examplehttps://signoz.example.com. Use the scheme and the port that users type, for examplehttps://signoz.example.com:8080.<additional-origin>(optional): Another hostname that serves the same SigNoz UI, such as a second reverse proxy hostname. Leave it out if users reach SigNoz on one hostname only.
Restart SigNoz after you change the value.
Format rules
- Write each entry as
scheme://host[:port].https://signoz.example.comandhttps://signoz.example.com:8080are valid. A trailing/is accepted. - Do not add a path. SigNoz stops at startup with an
invalid_global_configerror for an entry such ashttps://signoz.example.com/login. - SigNoz compares the scheme, the host, and the port. It ignores letter case.
httpandhttpsare different origins, and so are two different ports. Do not write out a default port:https://signoz.example.com:443does not matchhttps://signoz.example.com.
How validation works
When allowed_origins has entries, SigNoz checks the redirect origin at two points:
- Login start. Before SigNoz creates the OAuth or SAML login URL, it checks the
refredirect parameter. If the origin is not in the list, SigNoz does not offer SSO for that organization. The login page shows a warning with the codeorigin_not_allowedand offers email and password login instead. - Callback. When the identity provider sends the user back, SigNoz checks the redirect URL in the returned state again. If the origin is not in the list, SigNoz does not create a session. It sends the user back to the login page, which shows an error with the code
origin_not_allowed.
IdP-initiated SAML login uses the same callback check. The IDP Initiated SSO URL that you copy from SigNoz into your identity provider as the Relay State includes the SigNoz origin, so make sure that origin is in allowed_origins.
Email and password login does not use these checks.
Validate
- Add the origin of your SigNoz UI to
allowed_originsand restart SigNoz. - Open a private browser window and sign in through your identity provider. Make sure that SigNoz opens after the login.
- Make sure that the SigNoz logs show no
invalid_global_configerror at startup.
Troubleshooting
SSO option is missing and the login page shows origin_not_allowed
The message reads ref "<url>" is not an allowed origin. The origin that the login tries to redirect to is not in allowed_origins. Add the origin that your users open SigNoz on, with the same scheme, host, and port, and restart SigNoz.
SSO login returns to the login page with origin_not_allowed
The message reads state redirect "<url>" is not an allowed origin. The identity provider returned a redirect URL with an origin that is not in the list. If the origin is yours, add it to allowed_origins and restart SigNoz. If you do not recognize the origin, it can be a forged redirect, so look into who started that login.
SigNoz fails to start with invalid_global_config
An allowed_origins entry has the wrong format. Each entry needs a scheme and a host, for example https://signoz.example.com, and no path. Fix the entry and restart SigNoz.