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

forest-cli requires FULLNODE_API_INFO to be explictly set while lotus does not when invoked on the same host of the daemon #4745

Open
hanabi1224 opened this issue Sep 9, 2024 · 1 comment
Assignees

Comments

@hanabi1224
Copy link
Contributor

Issue summary

Lotus daemon saves API token at ~/.lotus/token by default. When lotus client is invoked on the same host, FULLNODE_API_INFO does not need to be explicitly set to invoke RPC methods that require permissions beyond READ.

We should consider matching lotus behaviour to improve ease-of-use

e.g.

lotus auth create-token --perm admin
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.JP_jCnYLecStCn9Eawf0kPLrFlRWv-he7NGLcH44Ouc

while with forest

forest-cli auth create-token --perm admin
Error: ErrorObject { code: ServerError(401), message: "Unauthorized", data: None }

Caused by:
    ErrorObject { code: ServerError(401), message: "Unauthorized", data: None }

Other information and links

@LesnyRumcajs
Copy link
Member

I'm okay with that change. We already have the code for this under --save-token. That said, some documentation would need to be updated both here and in the docs repository.

@hanabi1224 hanabi1224 self-assigned this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

2 participants