Default route in kibana

Hi guys any idea how to set the default routing in kibana , im facing a problem beacause when i log in it gives me the select tenant interface and i choose a tenant but then it loads the last page before i log out
I’ve tried setting th default route param in the advanced settings but it wont work?
Any idea how to do it
Ps:im using the latest version of OD security plugin with ELK 7.10.2

Setting defaultRoute in advanced settings of kibana worked fine for me.
Maybe you have misconfigured it? Could you please share the value that you inserted there?

Hi thanks for responding , this is what i’ve putted in the advanced settings : /app/dashboards

app/dashboards worked fine too on my cluster, no matter which tenant I choose (Global, Private, custom ones), always redirecting me to the dashboards (seeing the corresponding ones).
I wonder whether the tenant change messes up something on your end. Maybe you could try checking the Remember my selection next time I log in from this device. box when selecting tenant and see how it will behave once you reconnect?

@HeiDri did you try changing it via kibana.yml file with line:
server.defaultRoute: /app/dashboards
Also, this option only seems to navigate to the correct url first time kibana is loaded, any subsequent attempts are redirected to where the user was previously.

Hi @Anthony thanks for your response , i’ve tried that and it stills not working

@HeiDri I’ll try to reproduce your environment, can you confirm the below:

Elasticsearch version 7.10.2 is this OSS version or Basic
Which version of odfe security plugin are you using: 1.13.‘?’

1 Like

Hi @Anthony i’m using the basinc version with odfe 1.13.0 ,thank you

@HeiDri can you share your kibana.yml file? I got it working removing the tenants.preferred option. See full config below. The user selects the correct tenant and clicks “remember” option, after that the user is always directed to dashboards page in the correct tenant.

server.name: kibana
server.host: “0”
elasticsearch.hosts: https://localhost:9200
elasticsearch.ssl.verificationMode: none
elasticsearch.username: kibanaserver
elasticsearch.password: kibanaserver
elasticsearch.requestHeadersWhitelist: [“securitytenant”,“Authorization”]
opendistro_security.multitenancy.enabled: true
#opendistro_security.multitenancy.tenants.preferred: [“Global”, “Private”]
opendistro_security.readonly_mode.roles: [“kibana_read_only”]
opendistro_security.cookie.secure: true
opendistro_security.cookie.isSameSite: None
server.defaultRoute: /app/dashboards
newsfeed.enabled: false
telemetry.optIn: false
telemetry.enabled: false
security.showInsecureClusterWarning: false
xpack.spaces.enabled: false
xpack.apm.enabled: false
xpack.canvas.enabled: false
xpack.graph.enabled: false
xpack.grokdebugger.enabled: false
xpack.infra.enabled: false
xpack.license_management.enabled: false
xpack.maps.enabled: false
xpack.ml.enabled: false
xpack.reporting.enabled: false
xpack.searchprofiler.enabled: false
xpack.security.enabled: false
xpack.uptime.enabled: false
xpack.watcher.enabled: false
(I disabled the rest to make sure it’s not interfering with anything)
Hope this helps.

Hi , thank you for your help and your time , i’ve tried your config but nothing happened

This is my config

elasticsearch.username: "kibana"
elasticsearch.password: "kibana"
elasticsearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opendistro_security.multitenancy.enabled: true
opendistro_security.multitenancy.tenants.enable_global: false
opendistro_security.multitenancy.tenants.enable_private: false
#opendistro_security.multitenancy.tenants.preferred: ["Private", "Global","API_USER"]
opendistro_security.readonly_mode.roles: ["read_only"]

# x-pack security is replaced by opendistro security
xpack.security.enabled: false

# space is replaced by opendistr security multi tenant
xpack.spaces.enabled: false




server.defaultRoute: /app/dashboards
opendistro_security.cookie.secure: true
opendistro_security.cookie.isSameSite: None
newsfeed.enabled: false
telemetry.optIn: false
telemetry.enabled: false
security.showInsecureClusterWarning: false
xpack.apm.enabled: false
xpack.canvas.enabled: false
xpack.graph.enabled: false
xpack.grokdebugger.enabled: false
xpack.infra.enabled: false
xpack.license_management.enabled: false
xpack.maps.enabled: false
xpack.ml.enabled: false
xpack.reporting.enabled: false
xpack.searchprofiler.enabled: false
xpack.uptime.enabled: false
xpack.watcher.enabled: false

thanks

@HeiDri Can you confirm exact steps you use to reproduce this? The result you are getting and the expected result.

In my case, when I log in first time, I’m directed to dashboards screen. If I select a different page (for example Discovery) and logout. If I use the same browser screen, upon login I’m directed back to Discovery, but if I close current browser tab and open a new tab, after login I get redirected back to dashboards.

Are you seeing a different behaviour?

yes that’s exactly what i’m seeing , when i select a different page and logout and if I use the same browser screen I’m directed back to the same page.

@HeiDri thats correct, the browser stores where the user was prior to logout, and if nothing is found defaults to server.defaultRoute. There doesn’t seem to be a way to change this behaviour.

1 Like

Okay , thanks a lot for you help :slight_smile: