Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi! I Have Problem With Login To Trains. We Have Created Users That Until Yesterday Have No Problem To Access App, But Now It Throws Invalid User/Password Combination For Everyone. I Have Checked Apiserver Configuration And Everything Looks Ok. Do You Kno

Hi! I have problem with login to trains. We have created users that until yesterday have no problem to access app, but now it throws Invalid User/Password combination for everyone. I have checked apiserver configuration and everything looks ok. Do You know what can be a problem here?

  
  
Posted 3 years ago
Votes Newest

Answers 30


Easiest thing would be to connect to the mongodb and query the collections. Do:
sudo docker exec -it trains-mongo /bin/bash
than in the docker console do:
mongo
Than in the mongo console do:
use auth show collectionsThis should show the list of collections (you should have several)
To see the users registered there, do:
db.user.find()and see how many entries you get

  
  
Posted 3 years ago

Did you try restarting the docker compose since the problem start happening?

  
  
Posted 3 years ago

Can you try deleting the application cookie? While being on the trains page in the browser devtools you navigate to Application->Cookies and under it delete any trains cookies that are there. I believe that you will need to login after that

  
  
Posted 3 years ago

{"meta":{"id":"43485f72a46b456dbbeff095fdbff775","trx":"43485f72a46b456dbbeff095fdbff775","endpoint":{"name":"auth.fixed_users_mode","requested_version":"2.9","actual_version":"1.0"},"result_code":200,"result_subcode":0,"result_msg":"OK","error_stack":""},"data":{"enabled":true,"guest":{"enabled":false},"server_errors":{}}}

  
  
Posted 3 years ago

Can you share the contents of the browser's Dev tools, network panel when trying to log in? I assume there's a 401 or 400 error there, but it's details might be revealing...

  
  
Posted 3 years ago

Oh, I see. Then maybe we can see some more info in the browser dev tools

  
  
Posted 3 years ago

READ_ME_TO_RECOVER_YOUR_DATA.README this is the hint...

  
  
Posted 3 years ago

And these haven't changed at all? If so, this might be a corruption of the database (mongodb) since the server has entries there for these users, and the error might mean the user can't be located there

  
  
Posted 3 years ago

ImmenseMole52 can you try the following command from the server's console?
curl -u <username>:<password> -XGET http://localhost:8008/users.get_current_user

  
  
Posted 3 years ago

OK, so (1) the server recognizes there are user/passwords configured but (2) can't seem to locate the one you're providing... very strange

  
  
Posted 3 years ago

Use one of the user/password combinations that you've configured - I'd like to see if it's a server issue or some FW/communication issue

  
  
Posted 3 years ago

What about curl -XGET http://localhost:8008/auth.fixed_users_mode ?

  
  
Posted 3 years ago

{"meta":{"id":"39a90aa1b6e0474e8c1f75506dc1a2bb","trx":"39a90aa1b6e0474e8c1f75506dc1a2bb","endpoint":{"name":"users.get_current_user","requested_version":"2.9","actual_version":"1.0"},"result_code":401,"result_subcode":22,"result_msg":"Unauthorized (invalid credentials) (failed to locate provided credentials)","error_stack":null},"data":{}}

  
  
Posted 3 years ago

Still nothing :/

  
  
Posted 3 years ago

AppetizingMouse58 I didn't 😕 It is default installation on VM instance just including apiserver config with users defined

  
  
Posted 3 years ago

No, they were not SuccessfulKoala55

  
  
Posted 3 years ago

auth { # Fixed users login credentials # No other user will be able to login fixed_users { enabled: true users: [ { username: "admin" password: "some-1234-password" name: "admin" }, { username: "marek_cygan" password: "top-secret" name: "Marek Cygan" }, ] } }

  
  
Posted 3 years ago

It's still very strange since you say it used to work 😞

  
  
Posted 3 years ago

Oh, I didn't realize this is in the fileserver... Probably not related to the login issue...

  
  
Posted 3 years ago

Thanks for help! Good lesson for me 🙂

  
  
Posted 3 years ago

Can you share how your apiserver.conf (where the users are configured) looks? obviously without the passwords 😄

  
  
Posted 3 years ago

Failed to load resource: the server responded with a status of 400 (BAD REQUEST) :8008/v2.9/users.get_current_user:1 Failed to load resource: the server responded with a status of 400 (BAD REQUEST) zone-evergreen.js:2845 POST address/v2.9/auth.login 401 (UNAUTHORIZED)

  
  
Posted 3 years ago

In mongo logs i can see sth like this:
2020-11-08T09:30:07.209+0000 I COMMAND [conn70] dropDatabase DATA_RECOVERY - starting 2020-11-08T09:30:07.209+0000 I COMMAND [conn70] dropDatabase DATA_RECOVERY - dropping 0 collections 2020-11-08T09:30:07.215+0000 I COMMAND [conn70] dropDatabase DATA_RECOVERY - finished 2020-11-08T09:30:07.558+0000 I COMMAND [conn70] dropDatabase config - starting 2020-11-08T09:30:07.558+0000 I COMMAND [conn70] dropDatabase config - dropping 0 collections 2020-11-08T09:30:07.562+0000 I COMMAND [conn70] dropDatabase config - finished 2020-11-08T09:30:07.928+0000 I STORAGE [conn70] createCollection: READ_ME_TO_RECOVER_YOUR_DATA.README with generat

  
  
Posted 3 years ago

😞

  
  
Posted 3 years ago

show collections returns nothing 😱

  
  
Posted 3 years ago

So the server can't locate the credentials...

  
  
Posted 3 years ago

It seems your instance was open to the world and someone hacked your mongodb...

  
  
Posted 3 years ago

We always recommend to open only ports 8080 , 8008 and 8081 to the world 😞

  
  
Posted 3 years ago

Hi  ImmenseMole52 , did you do any changes in the docker compose file? If yes, then can you please send your version of the file?

  
  
Posted 3 years ago