Skip to content

Conversation

@omshinde
Copy link
Contributor

@omshinde omshinde commented Jan 8, 2026

Fix https://github.com/NASA-IMPACT/active-maap-sprint/issues/1333

  • Updates the earlier ESA token access method to the new long-term (90 days) -> short-term (notebook/script execution) token access method. See here for details.

@omshinde omshinde self-assigned this Jan 8, 2026
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 8, 2026

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2026-01-08T17:45:30Z
----------------------------------------------------------------

@omshinde does it have to be in the same folder as the script/notebook? Can it not be at the root of the home for a user?

  1. to prevent accidental commit to github
  2. to allow users to only need to update it in once place

wildintellect commented on 2026-01-09T22:24:09Z
----------------------------------------------------------------

make it clear where a user should save the file.

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 8, 2026

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2026-01-08T17:45:31Z
----------------------------------------------------------------

I would use the user's home directory and do path expansion for the storage of the credential as noted above.


@omshinde
Copy link
Contributor Author

omshinde commented Jan 9, 2026

Thanks @wildintellect. That's a valid point. I updated the ESA CCI notebook and the Earthcare notebook to reflect this. The ESA BIOMASS notebook will be changed in its respective PR.

Copy link
Collaborator

make it clear where a user should save the file.


View entire conversation on ReviewNB

@review-notebook-app
Copy link

review-notebook-app bot commented Jan 9, 2026

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2026-01-09T22:42:28Z
----------------------------------------------------------------

remove stackstac, does not appear to be used


@review-notebook-app
Copy link

review-notebook-app bot commented Jan 9, 2026

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2026-01-09T22:42:29Z
----------------------------------------------------------------

Might be nice to overlay the tile boundaries, we did something similar in an older tutorial. https://docs.maap-project.org/en/latest/technical_tutorials/access/accessing_cod.html


@wildintellect
Copy link
Collaborator

Overall the fix is ok, I'm not sure the text is clear where and how to save the token to a text file in their home directory.
Later we should open a second ticket to enhance these code examples with more comments.

Copy link
Contributor

@hrodmn hrodmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are using same ESA token credentials file approach in multiple tutorials (this one and the Biomass notebook) I think we need to consolidate the documentation and create a single guide to managing ESA credentials then reference it as a prerequisite to the science examples.

You could make the new ESA token notebook in this PR but I think it would be fine to merge this PR as-is and the Biomass example PR then handle the consolidation in a follow-up PR after the two ESA data access PRs are merged to the develop branch.

We could do better than a long-lived credentials.txt file. In the longer term (PI 26.2?) I think we should:

  • update the Hub/ADE images to define the ESA_CLIENT_SECRET and ESA_CLIENT_ID constants as environment variables
  • add a maap-py function that can be used to retrieve the access token

@wildintellect
Copy link
Collaborator

We could do better than a long-lived credentials.txt file. In the longer term (PI 26.2?) I think we should:

* update the Hub/ADE images to define the `ESA_CLIENT_SECRET` and `ESA_CLIENT_ID` constants as environment variables

* add a `maap-py` function that can be used to retrieve the access token

You're right that we should move this discussion to future planning. The downside of leveraging maap-py in that way, is that the code becomes less universal ... which might be ok if a MAAP account is required for ESA access.

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.

4 participants