Allow sharing session cookies with another domain
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
**Is your feature request related to a problem? Please describe.**
Cloud customer wants to put an iframe into a dashboard with additional contextual information, and in that iframe pulling the current logged in user. However, since we don't set the Domain attribute for cookies, this is currently not possible.
Their end user's experience is very Metabase-centric so it makes more sense to "extend dashboards with custom content" than to do the inverse (Interactive embed/SDK)
**Describe the solution you'd like**
Allowing sharing Metabase cookies with another trusted domain through setting the Domain attribute on them, e.g. I can share the session cookie from `metabase.mydomain.com`, with `metabase-extension.mydomain.com`, by setting the Domain to `.mydomain.com`
**Describe alternatives you've considered**
Some options:
- Using Metabase SSO into an IdP, and also enabling SSO on your custom site, and pulling the (same) current user from the IdP
- Interactive embedding or SDK-ing Metabase into your own site, managing session in your site and passing it into Metabase with JWT
- Self hosted + modifying cookies with an ELB to set the Domain manually
- Running a fork and setting a Domain attribute for cookies from the code
Contributor guide
Research direction
No files, tests, or entry points are identified in the issue. Start by locating where Metabase session cookies are created and configured, then check how a trusted cookie Domain could be exposed safely. Done means a supported configuration allows sharing cookies with a specified parent domain while preserving current behavior when it is unset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- authentication, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100