<@U04S8PLJWMT> We have deployed Airbyte 1.7.2 usin...
# ask-ai
c
@kapa.ai We have deployed Airbyte 1.7.2 using helm on EKS. We have set below on values.
Copy code
auth:
    enabled: true
    cookieSecureSetting: "false"
    cookieSameSiteSetting: "None"
When we try to log in we get the error "Failed to get user after login". The API call
api/v1/users/get
fails with 401. We have checked the users table and workspace table. They have default values set properly.
k
Based on your description and the provided configuration, here are some key points and troubleshooting steps drawn from the knowledge sources: ### 1. Cookie Security Settings Your configuration for
cookieSecureSetting: "false"
and
cookieSameSiteSetting: "None"
is correct for deployments without HTTPS or when cross-site cookies are needed. This matches the documented approach for disabling secure cookies and relaxing SameSite restrictions, which is sometimes necessary behind reverse proxies or in non-HTTPS environments. However, this does reduce security and should only be used if HTTPS is not available or for specific integration needs [Cookie Security Settings](https://docs.airbyte.com/platform/1.7/deploying-airbyte/integrations/authentication#cookie-security-settings). ### 2. 401 Unauthorized on
/api/v1/users/get
A 401 error on this endpoint, especially after login, is a common symptom when: - The frontend cannot send or receive the authentication cookie properly. - The reverse proxy (e.g., nginx) is not forwarding cookies or headers correctly. - The Airbyte instance is not aware of the correct public URL or host. There are several related reports: - Users behind nginx reverse proxies have encountered similar issues. One workaround was to set the
Origin
header in the proxy to
http://127.0.0.1:8000
to make requests appear local, which allowed the frontend to work [Github Issue 45197](https://github.com/airbytehq/airbyte/issues/45197). - Another common issue is that the frontend pod tries to reach the API using the public domain, but network/firewall rules or proxy misconfiguration block this. Whitelisting the cluster egress IP for the Airbyte domain resolved the issue for some users [Github Issue 45197](https://github.com/airbytehq/airbyte/issues/45197). ### 3. Helm Values and Public URL Ensure that your
values.yaml
includes the correct public-facing URL for Airbyte under
global.airbyteUrl
. This is required for proper authentication and callback handling, especially with SSO or when running behind a proxy [Enterprise Setup Guide](https://docs.airbyte.com/platform/1.7/enterprise-setup/implementation-guide#installation-steps). ### 4. Additional Troubleshooting Steps - Double-check your reverse proxy configuration to ensure it is forwarding all headers and cookies correctly. - If you are using nginx, consider adding:
Copy code
proxy_set_header Origin "http://127.0.0.1:8000";
as a temporary workaround, but review security implications before using in production. - Make sure the Airbyte server logs do not show errors related to authentication or cookie handling. - If you have recently upgraded, try clearing your browser cookies or using a private/incognito window to rule out stale cookies. ### 5. Known Issues There are ongoing issues with authentication and cookie handling in recent Airbyte and abctl versions, especially when not using HTTPS or when behind certain proxies. Some users have reported that downgrading abctl or adjusting cookie settings in both
global.auth
and
global.auth.security
sections helped [Github Issue 61586](https://github.com/airbytehq/airbyte/issues/61586). --- Summary: Your configuration appears correct, but the 401 error is likely due to cookie or proxy handling issues. Review your reverse proxy settings, ensure the public URL is set in
values.yaml
, and consider the documented workarounds for nginx. If the issue persists, check for related open issues or try adjusting cookie settings in both
global.auth
and
global.auth.security
as some users have found this necessary. If you need more specific help, please provide your reverse proxy configuration and confirm if you are using any custom domains or SSO integrations.
c
@kapa.ai The API call
/login
works. But why does the
api/v1/users/get
fail?
k
A message from kapa.ai
The knowledge sources indicate that a successful
/login
API call followed by a failing
/api/v1/users/get
(with a 401 error) is typically due to issues with authentication cookies not being set or sent correctly between the frontend and backend. This is often related to cookie security settings, reverse proxy configuration, or how cookies are handled in non-HTTPS environments. Key points from the sources: - If Airbyte is deployed over HTTP (not HTTPS), secure cookies cannot be set by default. If
cookieSecureSetting
is not set to
"false"
, the authentication cookie will not be transmitted, causing authenticated endpoints like
/api/v1/users/get
to fail with 401, even if
/login
succeeds ([source](https://docs.airbyte.com/platform/1.7/deploying-airbyte/integrations/authentication#cookie-security-settings)). - Reverse proxies (like nginx or ALB) can interfere with cookie or header forwarding. If the proxy is not configured to forward cookies or headers correctly, the backend will not recognize the session, resulting in 401 errors on authenticated endpoints ([source](https://github.com/airbytehq/airbyte/issues/45197)). - Some users have found that setting the
Origin
header in the proxy to a local address (e.g., `http://127.0.0.1:8000`) can resolve this issue, as it makes the request appear local and allows the frontend to communicate with the backend as expected ([source](https://github.com/airbytehq/airbyte/issues/45197)). In summary: The
/login
endpoint works because it does not require an existing session cookie, but
/api/v1/users/get
requires the authentication cookie to be present and valid. If the cookie is not set or not sent (due to cookie security settings or proxy misconfiguration), you will see a 401 error on
/api/v1/users/get
even after a successful login. If you have already set
cookieSecureSetting: "false"
and are still seeing this issue, review your reverse proxy configuration to ensure cookies are being forwarded correctly, and consider the workaround of setting the
Origin
header if you are using nginx.
c
You need to set auth.cookieSecureSetting to True for EKS + ALB setup to pass the JWT token properly.