-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new: additional oauth2 config for earthscope-sdk support #5390
new: additional oauth2 config for earthscope-sdk support #5390
Conversation
Merging this PR will trigger the following deployment actions. Support deploymentsNo support upgrades will be triggered Staging deployments
Production deployments
|
@@ -90,14 +91,25 @@ basehub: | |||
resp["groups"] = resp["auth_state"]["scope"] | |||
return resp | |||
|
|||
def get_base_url(url): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is used in only one place, let's inline it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@hamilton-earthscope ty for the PR! One comment, and when that's done, i can temporarily deploy this to staging for you to test! |
I just tried this out on staging, and I get:
Digging a little, I realize that:
is almost but not exactly right. But spawners all have an authenticator property, and I think @hamilton-earthscope can you change the |
@hamilton-earthscope deployed to staging (https://staging.geolab.earthscope.cloud) and seems to work for me! If you verify, I can merge this and deploy to prod |
Yep, it looks good to me too. Thanks @yuvipanda! |
🎉🎉🎉🎉 Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/12816577094 |
@hamilton-earthscope great! When the deployment finishes (as ^), you should be able to start a new server on prod and that should have your changes! Can you verify that? |
@yuvipanda I can confirm prod is working as expected. Thanks for your help with this. |
you're most welcome, @hamilton-earthscope! Look forward to more such collaborations! |
Hello,
I would like to add more of our oauth2 configuration into our container environment so that our SDK can automatically configure itself for the appropriate environment (staging vs. prod).
Based on our discussion with @yuvipanda on 2025/1/14, I put together this PR with the understanding that
spawner
is an instance ofCustomGenericOAuthenticator
. If this is not the case, please help me to achieve the following:New environment variables:
ES_OAUTH2__AUDIENCE
: exact value frominfrastructure/config/clusters/earthscope/common.values.yaml
Line 126 in d96a692
ES_OAUTH2__CLIENT_ID
: exact value frominfrastructure/config/clusters/earthscope/enc-staging.secret.values.yaml
Line 6 in d96a692
ES_OAUTH2__DOMAIN
:just the base URL from, (i.e. https://login-dev.earthscope.org)infrastructure/config/clusters/earthscope/staging.values.yaml
Line 21 in d96a692
ES_OAUTH2__SCOPE
: not entirely necessary, but values from this array concatenated as a single, space-delimited stringinfrastructure/config/clusters/earthscope/common.values.yaml
Line 113 in d96a692
Rename env vars:
ES_OAUTH2__ACCESS_TOKEN
: just rename env varinfrastructure/config/clusters/earthscope/common.values.yaml
Line 98 in d96a692
ES_OAUTH2__ID_TOKEN
: just rename envinfrastructure/config/clusters/earthscope/common.values.yaml
Line 99 in d96a692
ES_OAUTH2__REFRESH_TOKEN
: just rename env varinfrastructure/config/clusters/earthscope/common.values.yaml
Line 100 in d96a692