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

Accept \n line ending in token file #72

Open
fkjensen opened this issue Mar 24, 2021 · 0 comments
Open

Accept \n line ending in token file #72

fkjensen opened this issue Mar 24, 2021 · 0 comments

Comments

@fkjensen
Copy link

fkjensen commented Mar 24, 2021

Using humioctl 0.28.2 I see that '\n' is not accepted as a line ending for the token file. For usability reasons it can be a nice idea.

Works

bin/humioctl -u darkstar.evilcorp.com groups list
...

End of line feature for \n

echo "********************************************" > ~/.humio/darkstar.token
bin/humioctl -u darkstar.evilcorp.com groups list
bin/humioctl --token-file ~/.humio/darkstar.token -u darkstar.evilcorp.com groups list
error listing groups: Post "https://darkstar.evilcorp.com/graphql": net/http: invalid header field value "Bearer ********************************************\n" for key Authorization

Fix by removing '\n' at the end of the token file

truncate -s -1 ~/.humio/darkstar.token

Works with truncated token file

bin/humioctl --token-file ~/.humio/darkstar.token -u darkstar.evilcorp.com groups list
...
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

1 participant