Search code examples
keycloakopenid-connectapache-zeppelin

How to show username on Zeppelin-Keycloak


I deployed Zeppelin (v0.8.2) on my Kubernetes cluster and configured it to connect to Keycloak for user authentication and authorization. However, as you can see in the image (upper-right corner), it shows the User ID generated by Keycloak.

How can I change this to show the username/user name instead?

enter image description here


Solution

  • This is a shiro config problem solved by adding pac4jRealm.principalNameAttribute = name to the shiro.ini.

    The solution can be referenced from https://github.com/bujiio/buji-pac4j/issues/61