rusackas opened a new pull request, #41487: URL: https://github.com/apache/superset/pull/41487
### SUMMARY Follow-up to #41397. That PR derives a deterministic async channel id for embedded guest sessions via an HMAC-SHA256 over the guest token claims (since cross-origin cookies can't be relied on inside a third-party iframe). The HMAC message covered `user`, `resources`, `iat`, `exp`, and `aud`, but left out the two optional `GuestToken` scope claims: `datasets` (the dataset allowlist) and `rev` (the revocation version). As a result, two tokens that differ *only* in their dataset allowlist or revocation version would hash to the same channel and collide on the same async stream. This folds both claims into the HMAC message so differently scoped tokens derive distinct channels. ### BEFORE/AFTER Before: channel id ignored `datasets` and `rev`, so tokens differing only in those scopes shared a channel. After: `datasets` and `rev` are part of the HMAC message; such tokens get distinct channels. ### TESTING INSTRUCTIONS `pytest tests/unit_tests/async_events/async_query_manager_tests.py` Added `test_parse_channel_id_from_request_as_guest_user_differs_per_scope` covering tokens that differ only in `datasets` or `rev`. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
