You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sha174n (via GitHub)" <gi...@apache.org> on 2026/07/01 17:15:32 UTC

Re: [PR] feat(security): add guest user attributes and get_guest_user_attribute() macro [superset]

sha174n commented on PR #33924:
URL: https://github.com/apache/superset/pull/33924#issuecomment-4858207328

   Thanks for this — the mechanism is sound: attributes are set by the embedding app at token issuance and carried in the signed guest token (same trust level as the existing `username`/RLS clause), and the macro is guarded by `is_guest_user()`. Two doc suggestions before it lands:
   
   1. The SQL-templating example interpolates the attribute value directly into a `WHERE` clause string. Since the value is returned as-is, it'd be safer to show it quoted/parameterized and to note that attribute values are trusted (issuer-set). Consider adding an `escape_result` option mirroring `url_param()` for the string case.
   2. The `is_admin` example (using an attribute to gate access inside a query) encourages building authorization on a raw templated value — I'd drop or reframe that one.
   
   Also worth documenting how attributes get set (per @mistercrunch's note), since that issuer-trust boundary is what makes the feature safe. Nice addition otherwise.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org