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

Allow algorandAlgodToken to be optional in guardiand for Algorand node integration #4005

Open
qedgardo opened this issue Jul 2, 2024 · 1 comment

Comments

@qedgardo
Copy link
Contributor

qedgardo commented Jul 2, 2024

Description and context

By default, Algorand public APIs require an algod_token to be consumed. However, it also allows the option to disable API authentication. When API auth is disabled, the guardiand service cannot check the Algorand node's block. Currently, if the --algorandAlgodToken argument is removed from the guardiand service configuration, the service fails to start.

Steps to reproduce:

  • Disable API authentication on the Algorand node.
  • Remove the --algorandAlgodToken argument from the guardiand service configuration.
  • Attempt to start the guardiand service.

Expected Behavior:

The guardiand service should start and function correctly, regardless of whether the --algorandAlgodToken is provided, when API authentication is disabled on Algorand node.

Actual Behavior:

The guardiand service fails to start if the --algorandAlgodToken argument is removed from the configuration or set to "".

Definition of done

Update the service configuration to allow --algorandAlgodToken to be optional.

@andreclaro
Copy link
Contributor

andreclaro commented Jul 2, 2024

@qedgardo api token is required by the Client in go-algorand-sdk: https://github.com/algorand/go-algorand-sdk/blob/a55d63f27569304696d4e49971e3342e0b6bed21/client/v2/common/common.go#L157

The guardiand uses go-algorand-sdk, consequently, if you are getting HTTP 401: {"message":"Invalid API Token"} when passing empty string ("") for algorandAlgodToken, we will need to update go-algorand-sdk to only set the authentication header when api token is not empty.

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

2 participants