Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. First time setup/Admin notes show incorrect + LDAP default role not functioning

First time setup/Admin notes show incorrect + LDAP default role not functioning

Scheduled Pinned Locked Moved Solved Directus
10 Posts 4 Posters 422 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fuko
    wrote on last edited by
    #1

    Hi all,

    it seems the either the docs or first time install notes are incorrect regarding setting the default ldap role, first time install says the path is "/app/data/env" while the docs say "/app/data/env.sh"
    I am not sure which is correct, as I can not get either to work.
    I am also having to assume you get the role ID from the url like this "/admin/settings/roles/524eadcb-5b8b-4bf6-ae4e-7f0e02c54ed6" as that is also not in the docs.

    Any clarification on this would be appreciated, as well as a correction of whichever location is wrong.

    First time install notes
    bee94b93-0ec4-4de3-8941-151e3ed468ab-image.png

    https://docs.cloudron.io/apps/directus/
    2c3c5551-44c8-453f-b556-55df797b0b0f-image.png

    Thanks all!

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Looking at start.sh script of the app, both files are currently treated the same essentially: https://git.cloudron.io/packages/directus-app/-/blob/master/start.sh?ref_type=heads#L112

      The one in the long run will be /app/data/env.sh and I have fixed up the postinstall for the next package version now.

      For the role value, the id from the browser URL bar is indeed the correct ID, this only applies to first time login

      F osoboO 2 Replies Last reply
      1
      • nebulonN nebulon marked this topic as a question on
      • nebulonN nebulon

        Looking at start.sh script of the app, both files are currently treated the same essentially: https://git.cloudron.io/packages/directus-app/-/blob/master/start.sh?ref_type=heads#L112

        The one in the long run will be /app/data/env.sh and I have fixed up the postinstall for the next package version now.

        For the role value, the id from the browser URL bar is indeed the correct ID, this only applies to first time login

        F Offline
        F Offline
        Fuko
        wrote on last edited by
        #3

        @nebulon Thanks for the clarification and patch! I appreciate you looking into this.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          joseph
          Staff
          wrote on last edited by
          #4

          Just a heads up: the directus package is using OIDC and not LDAP

          1 Reply Last reply
          0
          • nebulonN nebulon

            Looking at start.sh script of the app, both files are currently treated the same essentially: https://git.cloudron.io/packages/directus-app/-/blob/master/start.sh?ref_type=heads#L112

            The one in the long run will be /app/data/env.sh and I have fixed up the postinstall for the next package version now.

            For the role value, the id from the browser URL bar is indeed the correct ID, this only applies to first time login

            osoboO Offline
            osoboO Offline
            osobo
            wrote on last edited by osobo
            #5

            @nebulon Thank you for the clarification but I'm still confused regarding roles id.
            I understand there are 4 main key build-in roles in Directus (Admin, Editors, Viewer and Public).
            For instance if I want all Cloudron's users (except the Admin that has logged first) to be given by default the build-in role "Viewer" in Directus what role id should I use in AUTH_LDAP_DEFAULT_ROLE_ID=<id of role>? Thank you for your support 🙏

            1 Reply Last reply
            0
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #6

              At least in a fresh installation I cannot see those roles you refer to in the UI. So I also don't know where to get the ID or if those even exist or if those are just some convention.

              osoboO 1 Reply Last reply
              1
              • nebulonN nebulon

                At least in a fresh installation I cannot see those roles you refer to in the UI. So I also don't know where to get the ID or if those even exist or if those are just some convention.

                osoboO Offline
                osoboO Offline
                osobo
                wrote on last edited by osobo
                #7

                @nebulon Thanks. No they don't exist by default. You start with only Admin and Public ones and have to create the other roles you need, along with their related policies, with or without Admin rights. So ultimately you got a custom id role for each new role created.

                I've then edited the env.sh and add export AUTH_LDAP_DEFAULT_ROLE_ID=<id of new role without Admin rights> but whenever I log a new Cloudron user it still inherits the Admin rights by default..

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #8

                  OH! only now I realized the hint from @joseph about LDAP. So the env variable now has to beAUTH_CLOUDRON_DEFAULT_ROLE_ID

                  The app uses AUTH_<provider>_... schema for those variables and we have switched over from LDAP to a custom Cloudron OIDC provider.

                  osoboO 1 Reply Last reply
                  1
                  • nebulonN nebulon

                    OH! only now I realized the hint from @joseph about LDAP. So the env variable now has to beAUTH_CLOUDRON_DEFAULT_ROLE_ID

                    The app uses AUTH_<provider>_... schema for those variables and we have switched over from LDAP to a custom Cloudron OIDC provider.

                    osoboO Offline
                    osoboO Offline
                    osobo
                    wrote on last edited by
                    #9

                    @nebulon said in First time setup/Admin notes show incorrect + LDAP default role not functioning:

                    AUTH_CLOUDRON_DEFAULT_ROLE_ID

                    Thanks a lot. It works 👌 ! I really like this app. The UI is neat (dark mode from the start !) and it has a lot of potential. Let's try to develop something with it.
                    Best wishes 😊

                    1 Reply Last reply
                    1
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #10

                      Also fixed up the docs at https://docs.cloudron.io/apps/directus/ then

                      1 Reply Last reply
                      0
                      • nebulonN nebulon has marked this topic as solved on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search