Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
16 stars 4 forks source link

add missing `manage_projects` scope to auth code #449

Closed OwenPriceSkelly closed 3 months ago

OwenPriceSkelly commented 3 months ago

fixes #448

Overview

The login bug came back because (as of bumping globus compute from 2.11->2.16) we were no longer requesting a superset of the scopes that the globus compute client does. They now also need the AuthLoginClient.scopes.manage_projects scope, so they would trigger another login flow without it.

Adding the same scope to our list fixed it 🎉

Discussion

I cleaned up the hardcoded COMPUTE_RESOURCE_SERVER_NAME = "funcx_service" to reference the sdk's ComputeScopes constant instead, because a comment I found in their sdk indicated they might rebrand that soon too. I also noticed that we're not even requesting our own action_all scope (we've just been using the test_scope) so I added that to the list, too.

Testing

Tested by removing my tokens and logging in again exactly once. Also need to update a unit test.

Documentation

no docs


📚 Documentation preview 📚: https://garden-ai--449.org.readthedocs.build/en/449/

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.36%. Comparing base (33f671e) to head (7cc37da).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #449 +/- ## ======================================= Coverage 75.36% 75.36% ======================================= Files 50 50 Lines 3183 3183 ======================================= Hits 2399 2399 Misses 784 784 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.