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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved 403 in proxyAuth apps after server migration

    Support
    proxyauth
    3
    3
    50
    Loading More Posts
    • 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.
    • mehdi
      mehdi App Dev last edited by girish

      I recently migrated my server to a new one (classic backup + restore process).

      After the restore, I noticed an issue with some apps : I kept getting a 403 error.

      00a3f78a-8ff2-4eb6-a99c-25b8b2da5276-image.png

      After a bit of investigation, it turned out that it was only for some specific apps : those that use the proxyAuth plugin. What was happening was that the browser still had a valid cookie for the app, so it sent it. The proxyAuth plugin, seeing a cookie, checked it, and it was incorrect (I suppose current sessions are not part of the backup so are not migrated, which makes sense).

      The problem is, instead of simply redirecting to the login page, the app keeps throwing the 403 error. For technical users, it's not really a big problem : one can just clear the site's cookies and it's all good to go. However, for less technical users, it can be a pain.

      1 Reply Last reply Reply Quote 1
      • girish
        girish Staff last edited by

        I was able to reproduce both issues, thanks for reporting!

        • The proxy auth cookie secret is not persisted. It's stored in platform runtime data. I have migrated this into the database.
        • Redirection logic was incorrect when the token is invalid. This is also fixed.
        1 Reply Last reply Reply Quote 2
        • robi
          robi last edited by

          this condition can be checked for and some action performed within the nginx config.

          Life of Gratitude.
          Life of Advanced Technology

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff last edited by

            I was able to reproduce both issues, thanks for reporting!

            • The proxy auth cookie secret is not persisted. It's stored in platform runtime data. I have migrated this into the database.
            • Redirection logic was incorrect when the token is invalid. This is also fixed.
            1 Reply Last reply Reply Quote 2
            • First post
              Last post
            Powered by NodeBB