Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 298
  • Merge Requests 38
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !400

Open
Opened 6 days ago by Emiliano Balbuena@edgebal
Report abuse

SSO for Pro sites

Testing

  • Log out on Minds
  • Visit any Pro Domain site (standalone) - user should be logged out
  • Visit Minds
  • Log in on Minds
  • Visit any Pro Domain site - user should be logged in
  • Log out on the Pro Domain site
  • Visit Minds - user should be logged out
  • Visit any Pro Domain site
  • Log in on Pro Domain site
  • Visit Minds - user should be logged in

Note: This testing procedure is valid on browsers with 3rd-party cookies enabled. On other strict-security browsers (such as Brave), Minds and Pro Domain sessions are completely independent.

Sandbox

  • Minds: https://goal-pro-sso.minds.io/
  • Pro Domain: http://another-domain-goal-pro-sso.minds.io

Helm Chart (Sandbox deployment chart)

  • Check out this branch: https://gitlab.com/minds/helm-charts/tree/goal/pro-sso
  • Manually deploy: helm upgrade --install --reuse-values --recreate-pods --set features.pro=true --set jwtsecret="<something random here>" --wait goal-pro-sso ./minds/

Issues

  • Closes #1127
Edited 16 hours ago by Emiliano Balbuena
Request to merge goal/pro-sso into master
The source branch is 3 commits behind the target branch
Open in Web IDE
Pipeline #97099283 passed for 3ad92c52 on goal/pro-sso
          Requires 2 more approvals from Devs and Deployers. Approved by
          Xander Miller
          Xander Miller
          Ben Hayward
          Ben Hayward
          Brian Hatchet
          Brian Hatchet
          Olivia Madrid
          Olivia Madrid
          Marcelo Rivera
          Marcelo Rivera
          Martin Santangelo
          Martin Santangelo
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes #1127

          Deletes source branch

          • Discussion 2
          • Commits 14
          • Pipelines 12
          • Changes 18
          0/1 thread resolved
          • Emiliano Balbuena @edgebal added Squad::Yellow scoped label 6 days ago

            added scoped label

          • Emiliano Balbuena @edgebal assigned to @edgebal 6 days ago

            assigned to @edgebal

          • Emiliano Balbuena @edgebal added 3 commits 6 days ago

            added 3 commits

            • aacc7678...cc738264 - 2 commits from branch master
            • cd9a4013 - Merge remote-tracking branch 'origin/master' into goal/pro-sso

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 5 days ago

            added 1 commit

            • 3de850e7 - (feat): SSO

            Compare with previous version

          • Emiliano Balbuena @edgebal added 2 commits 5 days ago

            added 2 commits

            • f74f5014 - (chore): Remove unused things
            • 1f14506e - (fix): 500 when no Session

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 5 days ago

            added 1 commit

            • e4e5e0ea - (feat): Destroy SSO key after use

            Compare with previous version

          • Emiliano Balbuena @edgebal added 3 commits 5 days ago

            added 3 commits

            • e4e5e0ea...d592fd9d - 2 commits from branch master
            • c2c95dfd - Merge remote-tracking branch 'origin/master' into goal/pro-sso

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 5 days ago

            added 1 commit

            • ef3d7433 - (chore): Allow SSO from root domains

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 4 days ago

            added 1 commit

            • 1155faab - (feat): Domain enforce; (test): Spec test

            Compare with previous version

          • Emiliano Balbuena @edgebal unmarked as a Work In Progress 4 days ago

            unmarked as a Work In Progress

          • Emiliano Balbuena @edgebal added MR::Awaiting Review scoped label 4 days ago

            added scoped label

          • Emiliano Balbuena @edgebal mentioned in merge request front!656 4 days ago

            mentioned in merge request front!656

          • Emiliano Balbuena @edgebal changed the description 4 days ago

            changed the description

          • Emiliano Balbuena @edgebal mentioned in issue #961 4 days ago

            mentioned in issue #961

          • Emiliano Balbuena @edgebal mentioned in issue front#2236 (closed) 4 days ago

            mentioned in issue front#2236 (closed)

          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 2 days ago
            Last updated by Emiliano Balbuena 1 day ago
            Core/SSO/Delegates/ProDelegate.php
            12 class ProDelegate
            13 {
            14 /** @var ProDomain */
            15 protected $proDomain;
            16
            17 /**
            18 * ProDelegate constructor.
            19 * @param ProDomain $proDomain
            20 */
            21 public function __construct(
            22 $proDomain = null
            23 ) {
            24 $this->proDomain = $proDomain ?: Di::_()->get('Pro\Domain');
            25 }
            26
            27 public function isAllowed($domain)
            • Mark Harding
              Mark Harding @markeharding · 2 days ago
              Owner

              bool return type

            • Emiliano Balbuena @edgebal changed this line in version 9 of the diff 1 day ago

              changed this line in version 9 of the diff

            • Please register or sign in to reply
          • Emiliano Balbuena @edgebal added 13 commits 1 day ago

            added 13 commits

            • 1155faab...52a592b9 - 11 commits from branch master
            • d9f6f766 - (chore): Pro Delegate types
            • cf4c1059 - Merge remote-tracking branch 'origin/master' into goal/pro-sso

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 21 hours ago

            added 1 commit

            • fd91559b - (fix): Origin's scheme should have more relevance for CORS

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 19 hours ago

            added 1 commit

            • 552ccf2f - (chore): Log authorization exceptions

            Compare with previous version

          • Emiliano Balbuena @edgebal added 1 commit 19 hours ago

            added 1 commit

            • 3ad92c52 - (fix): Use Origin for SSO authorize

            Compare with previous version

          • Emiliano Balbuena @edgebal changed the description 17 hours ago

            changed the description

          • Xander Miller @xander-miller approved this merge request 7 minutes ago

            approved this merge request

          • Xander Miller
            Xander Miller @xander-miller · 4 minutes ago
            Developer

            I tested on Chrome and Brave. I actually found that the system work just as well on Brave as it did on Chrome even with the shield turned on.

            http://another-domain-goal-pro-sso.minds.io https://goal-pro-sso.minds.io/

            I'm guessing that Brave shield might be smart enough to detect that both domains are minds.io but I'm not sure what's going on.

          Please register or sign in to reply
          Assignee
          Emiliano Balbuena's avatar
          Emiliano Balbuena @edgebal
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Awaiting Review Squad::Yellow
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Ben Hayward
          user avatar
          Brian Hatchet
          user avatar
          Olivia Madrid
          user avatar
          Marcelo Rivera
          user avatar
          Martin Santangelo
          user avatar
          Rami Albatal
          user avatar
          Guy Thouret
          Reference: minds/engine!400