dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] hideForKeycloakUsers does not hide elements

Open jakob1379 opened this issue 2 years ago • 3 comments

Environment

Self-Hosted (Docker)

System

firefox 112, docker version 23.0.4

Version

2.1.1

Describe the problem

I have setup a selfhosted keycloak instance as described in the docs for dashy and (hide|show)ForKeycloakUsers does not seem to work as expected. The login part worked after downgrading from 2.1.1. to 2.1.0 (#678). Now the issue is that my user is part of the group dashyReadOnly as seen here on Keycloak

image

And in the dashu config I have this

appConfig:
  statusCheckInterval: 0 # service will only be checked on initial page load
  preventWriteToDisk: true
  theme: default
  enableFontAwesome: true
  statusCheck: true
  auth:
    enableGuestAccess: false
    enableKeycloak: true
    keycloak:
      serverUrl: 'https://auth.mypage.com'
      realm: 'test-realm'
      clientId: 'test-client'
      legacySupport: true # remove this if keycloak >= v17

sections: # An array of sections
  - name: Apps
    icon: far fa-rocket
    items:
      - title: test-app
        description: testing the tests to improve other tests
        statusCheckAllowInsecure: true
        icon: si-streamlit
        url: https://tests.com
        displayData:
          hideForKeycloakUsers:
            groups: ['dashyReadOnly']

Now when I log in as the user jga I can still see the item test-app.

Additional info

No response

Please tick the boxes

jakob1379 avatar Apr 27 '23 11:04 jakob1379

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Apr 27 '23 11:04 liss-bot

I mentioned on your linked discussion that:

Downgrading to 2.1.0 worked for me, as did the suggested advice to change the entrypoint.

Do you know if the hideForKeycloakUsers issue persists using 2.1.1 with the modified entrypoint?

itsmejoeeey avatar Apr 30 '23 01:04 itsmejoeeey

I do not know if the issue is persistent as I am running 2.1.0.

I checked that the token holds the correct group, which it does, so i suspect that something is going wrong in dashy.

jakob1379 avatar May 02 '23 07:05 jakob1379

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Aug 02 '23 01:08 liss-bot

This issue is still relevant. I still believe it is related to #1051

itsmejoeeey avatar Aug 02 '23 07:08 itsmejoeeey

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Nov 01 '23 01:11 liss-bot

Issue is still relevant.

itsmejoeeey avatar Nov 01 '23 01:11 itsmejoeeey

@jakob1379 Same issue... any solutions???

johnny9798 avatar Nov 29 '23 20:11 johnny9798

Just an update - either this has never been a problem OR it has been pushed as a hotfix which does not update the version. See my description here: https://github.com/Lissy93/dashy/issues/1290#issuecomment-1857784047

jakob1379 avatar Dec 19 '23 19:12 jakob1379