Skip to content

Conversation

@alestrunda
Copy link
Contributor

@alestrunda alestrunda commented Jun 17, 2021

https://swicloud.atlassian.net/browse/LOG-12482

Summary:
When parsing token from json we were expecting the "tokens" attribute to be at the first place in the json structure. Maybe with python update the json structure changed a bit, now "tokens" attr is not at the first place which causes parsing the token to fail. I changed the parsing to take the first token and not to care about the position of the attributes.

How to test:

  • have Linux environment (I used Loggly container which runs Linux - you will need to install additional packages by: apt-get update & apt-get install iputils-ping & apt-get install rsyslog rsyslog-doc, but it would be great if you could use something else so we'll have it tested in different environments)
  • get the script Linux Scripts/configure-linux.sh
  • before running the script you might need to set its permissions first: chmod +x configure-linux.sh
  • run the script: ./configure-linux.sh -a SUBDOMAIN -u USERNAME (you will be asked for a password) (note: I had to let it go into insecure mode)
    • before the fix, it fails with “Invalid authentication token”
    • the script should set up everything and send some logs to Loggly, you should be able to find them there (for me it said that it cannot find the loggly test message, but I was able to see it there. When running it again it was all ok)
    • if everything went ok, you should be able to send logs to Loggly by logger ”test”

@alestrunda alestrunda requested a review from a team June 17, 2021 08:40
@alestrunda alestrunda merged commit 119cf1a into master Jun 18, 2021
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

Successfully merging this pull request may close these issues.

3 participants