-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix for domain sharding results in failed requests with "Missing Authorization Header" #24481
docs: fix for domain sharding results in failed requests with "Missing Authorization Header" #24481
Conversation
domain sharding authorization issue fix
@graceguo-supercat @michellethomas @john-bodley @timifasubaa @kristw @williaster Please check this issue of |
ROOT CAUSE ANALYSIS - Actually session in superset is managed using cookies. So, session cookie must be sent automatically in any API request through request headers. Also, cookies are automatically sent to subdomains on a domain(TLD). So, following are two solutions. You can choose either.
Note: Please delete all the session cookies for your superset top level domain and subdomains intially so that previously session cookies don't change the desired behaviour. |
Can anyone please review this. |
@rusackas Can you please review this PR. |
Co-authored-by: Evan Rusackas <[email protected]>
@rusackas All checks have passed for this PR. Can you please review again. |
@rusackas For reminder as I see no updates on this PR for long time. Can you please check once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ved-kashyap-samsung apologies for missing the previous pings. Thanks for improving the documentation. I've made a couple of suggestions based on how we (Airbnb) have it configured.
added meaningful sub domain names as example Co-authored-by: John Bodley <[email protected]>
updated session cookie domain example Co-authored-by: John Bodley <[email protected]>
fixing additional spaces Co-authored-by: John Bodley <[email protected]>
No problem and thanks for your valubale suggestions. I have incorporated suggested changes and looking forward for this PR to be merged. Thanks again! |
…g Authorization Header" (apache#24481) Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: John Bodley <[email protected]>
…g Authorization Header" (apache#24481) Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: John Bodley <[email protected]>
SUMMARY
Fixes #23295
Same issue discussion on domain sharding feature implementation PR - #5039
After enabling the domain sharding as follows
All 4 webserver domains are set via DNS A record to the same IP address.
When navigating to a dashboard, I can see in the Edge devtools, that the /api/v1/chart/data requests are sent to all webserver domains. However, they all fail with "401" (unauthenticated). I can also see, that some of the requests have a response set to {"msg":"Missing Authorization Header"}.
EXPECTED RESULT
Domain sharding uses the 4 configured webserver domains for requesting data - and uses the session cookie of original domain for authentication.
ACTUAL RESULT
The authentication of the non-original webserver domains does not work and the requests are not authenticated.
TESTING INSTRUCTIONS
Please verify changes from my fork.
After setting the
SESSION_COOKIE_DOMAIN
to main domain insuperset_config.py
authrization should work on all the domain shards.ADDITIONAL INFORMATION