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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Traccar
  3. Cloudron SSO Overwrites Traccar Admin Permissions

Cloudron SSO Overwrites Traccar Admin Permissions

Scheduled Pinned Locked Moved Traccar
5 Posts 2 Posters 17 Views 3 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.
  • H Offline
    H Offline
    hakunamatata
    wrote last edited by hakunamatata
    #1

    Environment

    • Cloudron Version: 9.1.3
    • App: Traccar 6.12.2
    • User Management: Enabled (Cloudron SSO)

    Description

    When a user logs in via Cloudron SSO, their administrative permissions within Traccar are automatically reverted to a standard "User" status. Even after manually elevating the user in the database (setting administrator = 1 and userlimit = -1 in the tc_users table), the changes are overwritten the moment the user authenticates via SSO or the app is restarted.

    This creates a persistent "Write Access Denied" state for the primary administrator, preventing the management of devices, geofences, or server settings.

    Steps to Reproduce

    1. Install Traccar on Cloudron with User Management (SSO) enabled.

    2. Login via SSO (Initial status is a standard user).

    3. Manually elevate the user to admin in the Traccar UI.

    4. Confirm Admin access is active in the Traccar UI (Settings and Server menus are visible).

    5. Log out and log back in via Cloudron SSO, or restart the app.

    6. The user's administrator status in tc_users is reverted to 0x00, and administrative access is lost.

    SQL: SELECT email, administrator FROM tc_users WHERE email = '[redacted]';
    

    Expected Behavior
    The Cloudron SSO sync should respect existing administrator flags within the Traccar database.

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

      Thanks for the bugreport, this is easy to reproduce just looking for a fix now.

      1 Reply Last reply
      1
      • H Offline
        H Offline
        hakunamatata
        wrote last edited by hakunamatata
        #3

        The bug must be relatively recent because I was able to add a device on March 5th when I was running Traccar 6.12.0. Cloudron instance was updated to 9.1.3 on March 7th.

        Today I went in to add some more devices and experienced the aforementioned issue.

        1 Reply Last reply
        0
        • nebulonN Away
          nebulonN Away
          nebulon
          Staff
          wrote last edited by
          #4

          So it turns out the traccar code always resets the role for a user on login. Because Cloudron does not expose the user role from Cloudron itself (like if a user is admin or not on the Cloudron), traccar assumes all users are normal users. Generally we do not expose user roles via OpenID, since the roles on Cloudron are usually not mapping well to an app. It looks like their implementation is more designed for ActiveDirectory/LDAP style usage, where such info is usually stored with the directory and can be configured per client/app.

          We will see if some upstream fix can be made and would be accepted.

          1 Reply Last reply
          1
          • H Offline
            H Offline
            hakunamatata
            wrote last edited by hakunamatata
            #5

            Temporary work-around for anyone experiencing the same issue:

            1. Access the SQL DB via the Cloudron App Terminal
            2. Manually elevate the user via SQL:
            UPDATE tc_users SET administrator = 1, userlimit = -1 WHERE email = 'user@domain.com'
            
            1. Do whatever admin tasks you need to do, noting that admin permissions will be removed at next login or app restart.
            1 Reply Last reply
            1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            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