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

docker version of cortex prints a lot of errors for auth failures #205

Closed
Trolldemorted opened this issue Jun 28, 2019 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@Trolldemorted
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) -
OS version (client) -
Cortex version / git hash latest on dockerhub
Package Type Docker
Browser type & version -

Problem Description

Cortex throws errors ("Authentication failure") and warnings ("cookie has an invalid signature") often, even if no users type invalid passwords. Either those things shouldn't happen during normal usage, or it should be an error.

Steps to Reproduce

  1. Download docker-compose file from official docs, apply fix for dockerhub sample uses the wrong port #203
  2. docker-compose up
  3. Wait until elastic and cortex have started
  4. Open localhost:9001 in your browser, click "Update Database", wait
  5. Register a user immediately to prevent docker version of cortex breaks when you don't create a user immediately #204
  6. Open some tabs, wait a while

Complementary information

docker-compose output

@b00lpy
Copy link

b00lpy commented Jun 28, 2019

I've got the same problem but it seems not to be an actual problem, i mean, I can log in. Probably there's something bad goin on logging level, maybe they wrote a wrong check?
I'm following that.

@nadouani nadouani added this to the 3.0.0-RC4 milestone Jul 2, 2019
@To-om
Copy link
Contributor

To-om commented Jul 3, 2019

Unless you set a secret in docker compose file, the key used to sign the session cookie change at each startup. This can be the cause of your authentication problems. I advise you to update your docker-compose file with this change:

[...]
cortex:
    image: thehiveproject/cortex:latest
+  command: --secret changeme
    ports:
      - "0.0.0.0:9001:9001"
  thehive:
    image: thehiveproject/thehive:latest
+  command: --secret changeme
    depends_on:
      - elasticsearch
      - cortex
[...]

TheHive secret and Cortex secret don't need to be the same.

@To-om To-om closed this as completed Jul 3, 2019
@To-om To-om added the doc label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants