Graylog2-server: https://example.com/api/system/sessions requires basic auth behind reverse proxies

Created on 3 May 2016  ·  3Comments  ·  Source: Graylog2/graylog2-server

Problem description

I've deployed Graylog 2.0.0 behind two reverse proxies (frontend: haproxy backend: nginx) and I get asked for basic auth on this url https://example.com/api/system/sessions.

Chrome:

Failed to load resource: the server responded with a status of 401 (Unauthorized)
Unhandled rejection SuperagentPromiseError: cannot GET https://example.com/api/system/sessions (401)
    at https://example.com/plugin/org.graylog.plugins.pipelineprocessor.Processor…pipelineprocessor.PipelineProcessorPlugin.62d4f9ed4c4bd0ccbd76.js:13580:20
    at Request.callback (https://example.com/plugin/org.graylog.plugins.pipelineprocessor.Processor….pipelineprocessor.PipelineProcessorPlugin.62d4f9ed4c4bd0ccbd76.js:19328:4)
    at Request.<anonymous> (https://example.com/plugin/org.graylog.plugins.pipelineprocessor.Processor…pipelineprocessor.PipelineProcessorPlugin.62d4f9ed4c4bd0ccbd76.js:19051:11)
    at Request.Emitter.emit (https://example.com/plugin/org.graylog.plugins.pipelineprocessor.Processor…pipelineprocessor.PipelineProcessorPlugin.62d4f9ed4c4bd0ccbd76.js:19738:21)
    at XMLHttpRequest.xhr.onreadystatechange (https://example.com/plugin/org.graylog.plugins.pipelineprocessor.Processor…pipelineprocessor.PipelineProcessorPlugin.62d4f9ed4c4bd0ccbd76.js:19410:11)

When I go directly to the nginx, I won't be asked for basic auth.

Steps to reproduce the problem

  1. install haproxy
  2. install nginx
  3. install graylog
  4. configure haproxy to terminate ssl for example.com and set nginx as backend
  5. configure nginx as described here
  6. enter https://example.com/

    Environment

  • Graylog Version: 2.0.0-6
  • Elasticsearch Version: 2.3.2
  • MongoDB Version: 3.0.11
  • Operating System: CentOS 6.7
  • Browser version: Chrome Version 50.0.2661.86 (64-bit)
question

All 3 comments

@albix We are using GitHub issues for tracking bugs in Graylog itself, but this doesn't look like one. Please post this issue to our public mailing list or join the #graylog channel on freenode IRC.

Thank you!

This _is_ actually an issue with Graylog itself. It has been fixed in 5eb97e803f7d83e4666d94472e7066e2d5f5ec19 and will be included in 2.0.1. In between the dialog is annoying, but harmless (and happens only once when you're returning to the web if but your session has expired in between)

Thanks for your help Dennis!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ajpen picture ajpen  ·  3Comments

mikkolehtisalo picture mikkolehtisalo  ·  4Comments

ianling picture ianling  ·  4Comments

jalogisch picture jalogisch  ·  4Comments

jozefbarcin picture jozefbarcin  ·  3Comments