Closed jeraldsm closed 4 years ago
We are merging the functionality of this plugin into the server in 4.0. I can't really follow what's going on with your setup, to me it sounds like a problem with which IP the server believes it is running, but that should not have anything to do with the SSO plugin itself.
Problem description
I'm having an issue with getting permissions to work properly with users authenticating via the SSO-Auth plugin. I have 3 Graylog nodes running behind an Oauth2 proxy and a Loadbalancer. My setup is like
user -->> LB --> Nginx -->> Oauth2_proxy —>> Graylog Cluster.
GRAYLOG_IS_MASTER=true GRAYLOG_HTTP_PUBLISH_URI=http://privateip-of-graylog:9000/ GRAYLOG_HTTP_EXTERNAL_URI=https://public-url-pointing-LB/ GRAYLOG_ROOT_PASSWORD_SHA2=************ GRAYLOG_PASSWORD_SECRET=************** GRAYLOG_ELASTICSEARCH_HOSTS=http://private-ip-of-the-vm:9200/ GRAYLOG_MONGODB_URI=mongodb://********************27017/graylog?replicaSet=graylog-rs0 GRAYLOG_WEB_ENABLE=true GRAYLOG_OUTPUT_BATCH_SIZE=5000 GRAYLOG_TRUSTED_PROXIES=\"127.0.0.1/32, 172.17.0.0/16, 10.0.0.0/16\" \ GRAYLOG_SERVER_JAVA_OPTS=\"-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:NewRatio=1 -XX:MaxMetaspaceSize=256m -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow -Xms6g -Xmx6g\""
Steps to reproduce the problem
Logs in oauth2-proxy when login is successful:
From the above screenshot, it can be seen that the node cannot be viewed and there are errors.
Environment
Additional information Single Sign-On Configuration Username Header: X-Forwarded-User
A similar problem seems to be reported in the community below, but , I didn't see a bug report or possible solution for this issue. https://community.graylog.org/t/sso-auth-users-with-admin-role-are-unauthorized-for-some-calls/15615
PS: Everything works, without using oauth2-proxy or just disabling single sign-on (this will cause double authentication)
Any suggestions are highly appreciated.