etl icon indicating copy to clipboard operation
etl copied to clipboard

Staging servers with real users instead of Admin

Open Marigold opened this issue 9 months ago • 6 comments

All our staging servers use admin as a user, which means that all charts would have "Created by Admin" on them. This would happen even after syncing charts to production.

I'm not sure if this would be technically feasible, but it'd involve:

  • Get logged user in Wizard (can we get it from cookies or from sessions table in MySQL?)
  • AdminAPI object artificially creates sessions to call API for creating charts, this would have change too to use real user
  • Getting production users to staging servers (by calling make refresh there)

Alternatives

After merging PR, chart-sync could get author name from the git branch, map it to user in production and use it for creating charts.

Marigold avatar Apr 30 '24 08:04 Marigold

Maybe useful for Wizard running on staging / production environments: https://discuss.streamlit.io/t/new-component-google-authentification-and-sign-in-with-google-button/65745

lucasrodes avatar Apr 30 '24 09:04 lucasrodes

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 18 '24 01:07 stale[bot]

This would be still useful, though it's not clear how important it is (with respect to technical feasibility).

Marigold avatar Jul 22 '24 07:07 Marigold

There's a new st.context in streamlit that can access cookies to detect user id.

Marigold avatar Aug 01 '24 06:08 Marigold

Tailscale provides info about logged-in users in requests. Check out the discussion.

image

Marigold avatar Aug 09 '24 15:08 Marigold

@lucasrodes this is among "nice to haves" which makes me reluctant to start it. Do you think it could be important enough to start working on it?

Marigold avatar Aug 09 '24 15:08 Marigold