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

Indexer should retrieve a new node token after the token is renewed #41

Open
taojing2002 opened this issue Dec 9, 2022 · 3 comments
Open
Assignees
Milestone

Comments

@taojing2002
Copy link
Collaborator

Now the indexer only retrieves the node token during the service initialization. However, the token will be invalid every three months. This means we need to restart the service every three months in order to get the renewed token. This is not convenient.

The token is used to get the system metadata through DataONE api.

My proposed solution is: indexer will try to get the new token (read it from an env variable) again if the API getSystemMetadata call throws an unauthorized exception.

@taojing2002 taojing2002 added this to the 3.0.0 milestone Dec 9, 2022
@taojing2002 taojing2002 self-assigned this Dec 9, 2022
taojing2002 added a commit that referenced this issue Dec 9, 2022
…s during the dataone api getsystemmetadata call.

#41
@mbjones
Copy link
Member

mbjones commented Dec 9, 2022

Sounds like a good change. What would update the env variable so that it is available when it changes? Also, if the env variable is always correct, why not just read it from there from all operations, which would then prevent having to do the repeat operation?

@artntek
Copy link
Collaborator

artntek commented Nov 30, 2023

Once we have started using hashstore, this will no longer be necessary, since metadata can be retrieved without calling the dataone api on metacat

@artntek
Copy link
Collaborator

artntek commented Feb 6, 2024

Notes

  • this will not work for non-DataONE members - need a Node ID to issue a token
  • We are OK with saying this release is not recommended for non-D1 members
  • We have 3 months after this release to fix - eg introduce a way to refresh tokens, or incorporate hashstore
  • For our own deployments, we could upgrade the token generation script so it also pushes to k8s secret

@artntek artntek modified the milestones: 3.0.0, 3.1.0 Feb 6, 2024
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

No branches or pull requests

3 participants