-
Notifications
You must be signed in to change notification settings - Fork 3
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
User Name and Login instead of niuaId in User List. #57
Comments
Anyone could help to figure out the way? |
This is not a bug—it's the expected behavior for the way we authenticate SL users in Grafana using the auth proxy mode. We set a header in the NI web server before proxying requests to Grafana to let it know which user is making the request. So the only thing Grafana knows about our users is their ID. It looks like you can set a |
Hi @mure
Thank you for your reply, NI Web Server fails to restart with error message So, Where can I find the list of variable provided by NI Web Server and/or NI SystemLink ?Here is what I've done:
I've defined the optional headers in Grafana's [auth.proxy]
enabled = true
header_name = X-Remote-User
header_property = username
auto_sign_up = true
;sync_ttl = 60
;whitelist = 192.168.1.1, 192.168.2.1
# Optionally define more headers to sync other user attributes
# Example `headers = Name:X-WEBAUTH-NAME Role:X-WEBAUTH-ROLE Email:X-WEBAUTH-EMAIL Groups:X-WEBAUTH-GROUPS`
headers = Name:X-WEBAUTH-NAME Email:X-WEBAUTH-EMAIL
# Read the auth proxy docs for details on what the setting below enables
;enable_login_token = false And add the LoadModule proxy_module ${MODULES_PATH}/mod_proxy.so
LoadModule proxy_http_module ${MODULES_PATH}/mod_proxy_http.so
LoadModule proxy_wstunnel_module ${MODULES_PATH}/mod_proxy_wstunnel.so
<Location "/grafana">
# Use RewriteEngine to handle websocket connection upgrades
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule proxy:http://127.0.0.1:3000/grafana/(.*) ws://127.0.0.1:3000/grafana/$1 [P,L]
RequestHeader set X-Remote-User expr=%{REMOTE_USER}
RequestHeader set X-WEBAUTH-NAME expr=%{USER_NAME}
AuthNIApiKeyTranslateUsers On
RequestHeader set X-NI-Api-Key expr=%{API_KEY}
Use NIAuthnEnableBrowsers
Require valid-user
# preserve Host header to avoid cross-origin problems
ProxyPreserveHost on
# proxy to Grafana
ProxyPass http://127.0.0.1:3000/grafana
ProxyPassReverse http://127.0.0.1:3000/grafana
</Location> Then I restart Both NI Web Server and Grafana However the NI Web Server fail to start with error
So, Where can I find the list of variable provided by NI Web Server and/or NI SystemLink ? |
When managing Users I got some thing weird in the user list. It shows niuaId under user email and login while displaying nothing under the name.
And when we go to the "Edit user" menu, we can't change any of them under User Information might be caused by the Synced via Auth Proxy
I assume it's kind of bugs. Is there any way to figure out to fix it?
at least we can see First Name in the Name field
The text was updated successfully, but these errors were encountered: