Skip to content
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

Draft method for non-interactive authentication #336

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bmaitner
Copy link

@bmaitner bmaitner commented Jun 5, 2023

Per #317 I've modified rgee so that it can work in a non-interactive setting using JSON format Google credentials. This seems to be working, as I've been able to use it in workflows for continuous integration via Github actions (see example here: https://github.com/AdamWilsonLab/emma_envdata ).

This PR is more of a "proof of concept". If you're happy with the general approach, I'll clean it up, fix the merge conflicts, etc. If not, I'm happy to take an alternative approach if you have options you prefer.

@csaybar
Copy link
Collaborator

csaybar commented Jun 6, 2023

Hello @bmaitner, thank you for opening this PR.

I very much appreciate your work on implementing non-interactive authentication using rgee. I have a few suggestions to consider:

  1. To avoid adding more arguments to the ee_Initialize function, I will suggest overloading the existing user, drive, and gcs parameters like this:
ee_Initialize(
    user="/EE_credential_path",
    drive="/JSON_token_path",
    gcs="/service_account_key_path"
)
  1. I recommend handling the authentication process within the ee_Initialize function itself, rather than adding the drive_cred_path argument to ee_as_stars or ee_as_sf. This way, all the necessary authentication steps can be performed in one place. To avoid conflicts and ensure a smooth transition (since the version of ee_Initialize in this PR is not the one currently used by the latest rgee version, and it seems that some arguments are duplicated, i.e. see user and email). I can start a new PR and work together to make this work!

Please let me know what you think about these suggestions. Once again, thank you for addressing this important topic and your contributions to the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants