netmaker
netmaker copied to clipboard
[Bug]: Update scripts/token-convert.sh as per the new token.
Contact Details
No response
What happened?
scripts/token-convert.sh is outdated as per the new token.
As of 2nd June 2022, the token is a base64 encoded JSON object consisting of configuration data for server and client (APIConnString, Server, Network, Key, LocalRange).
The token-convert.sh script decodes the token and outputs a usable netclient join command without using the --token flag but instead using the appropriate flags to pass the decoded token data.
As of now, it is not possible to do a netclient join without the token since, there is no flag present to pass the Server config data via CLI. Other required files like -k, -n, --apiserver and --localrange are present.
A possible solution would be to also introduce a flag to configure the server value using CLI. Another one would be to mention in the documentation that it is not possible for netclient to join without a token.
https://github.com/gravitl/netmaker-docs/blob/develop/advanced-client-install.rst
"Adding/Removing Networks" section in the above link is also outdated since it says "If a key is provided (-k), then a token is unnecessary, but grpc, server, ports, and network must all be provided via flags."
Version
v0.14.1
What OS are you using?
Mac
Relevant log output
No response
Contributing guidelines
- [X] Yes, I did.