You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "meddhiakassab (via GitHub)" <gi...@apache.org> on 2025/06/29 14:07:14 UTC

[I] [SIP] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

meddhiakassab opened a new issue, #33969:
URL: https://github.com/apache/superset/issues/33969

   ## [SIP] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset
   
   ### Motivation
   
   While attempting to ingest Apache Superset metadata using a third-party tool, I observed that access tokens can only be generated via the Swagger API and not through the Superset UI. Adding a UI component for token generation would significantly improve usability and accessibility.
   
   Additionally, when running Superset using the Docker Compose deployment, I noticed excessive memory usage. This could be investigated and optimized to improve overall performance and reduce resource consumption.
   
   as you can see here, only Superset services are using nearly 3 GB of RAM
   
   ![Image](https://github.com/user-attachments/assets/ca2bb074-cc6b-4610-953a-8f2d176d5c3c)
   
   ### Proposed Change
   
   Propose a UI for managing access tokens, enabling users to easily generate and manage tokens, as well as benefit from the available endpoints that use them. If possible, allow for the creation of multiple tokens with different permissions to support flexible access control.
   
   Regarding the official Superset images, it could be part of a broader plan to improve performance and reduce high system usage. While it may be a significant undertaking, it is a valuable consideration worth pursuing.
   
   Implement a monitoring service to check Superset's performance and enhance the performance of certain images by switching to a lighter Linux base image for example.
   
   ### New or Changed Public Interfaces
   
   As far as I know, no change is needed.
   
   ### New dependencies
   
   cryptography Python library: this is essential for securely encrypting and decrypting OAuth2 access and refresh tokens stored in the new database table, ensuring tokens are protected at rest.
   
   ### Migration Plan and Compatibility
   
   Add new table
   
   table: `database_user_oauth2_tokens`
   
   | Column Name     | Data Type   | Description                                                  |
   |-----------------|-------------|--------------------------------------------------------------|
   | `id`            | INTEGER     | primary key (auto-incrementing)                             |
   | `user_id`       | INTEGER     | foreign key linking to the user                             |
   | `database_id`   | INTEGER     | foreign key linking to the database                         |
   | `access_token`  | TEXT        | encrypted OAuth2 access token                               |
   | `refresh_token` | TEXT        | encrypted OAuth2 refresh token                              |
   | `expires_at`    | TIMESTAMP   | expiry time of the access token                             |
   | `created_at`    | TIMESTAMP   | time when the token entry was created                       |
   | `updated_at`    | TIMESTAMP   | time when the token entry was last updated                  |
   
   **Notes:**
   - both `access_token` and `refresh_token` must be encrypted at rest...
   - the `expires_at` column enables Superset to refresh tokens before they expire.
   - `created_at` and `updated_at` assist with auditing and tracking changes over time.
   
   
   ### Rejected Alternatives
   
   storing tokens only in memory or ephemeral cache: this approach was rejected because it does not persist tokens across Superset restarts causing repeated OAuth2 authorization flows and leading to a poor user experience. persistent storage in a dedicated encrypted database table is necessary to securely manage token lifecycle and enable seamless access.
   
   


-- 
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.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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-4748013580

   Closing as abandoned/discarded.


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-3033520606

   > Add new table
   
   We would also need to store the scopes associated with each token.
   
   I would start by doing a basic OAuth2 provider implementation in Superset, with scopes for each of the permissions. Then later we can build a UI for actually managing the tokens.


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #33969: [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset
URL: https://github.com/apache/superset/issues/33969


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-3607932244

   Anyone still planning to take this on? If so, please start a DISCUSS thread, otherwise it may soon be closed as abandoned. 


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-3029673225

   Deferring to @betodealmeida as he knows much more than I do on everything oauth-related


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "betodealmeida (via GitHub)" <gi...@apache.org>.
betodealmeida commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-3032789413

   > [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset
   
   Those are two very different things, let's write a separate SIP for each one.


-- 
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


Re: [I] [SIP-176] Proposal for Enhanced OAuth2 Access Token Management UI and Performance Optimization in Apache Superset [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33969:
URL: https://github.com/apache/superset/issues/33969#issuecomment-3137140029

   @meddhiakassab curious your thoughts to the above thread. If you want to get more opinions and move this through the process, we'd need to open a DISCUSS thread on the dev@ mailing list. Let me know here or on [Superset Slack](http://bit.ly/join-superset-slack) if you want help doing so. 


-- 
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