Single Sign On

Sebastian Grewe edited this page Mar 6, 2018 · 3 revisions

Single Sign On

With MPOS version 1.0.2 a few new variables were added to allow single sign on (SSO) instances of MPOS. Using these new variables in combination with a proper cookie domain allows users to switch between MPOS instances without having to login again.

How it works

The newly added variables $config['db']['shared']['accounts'], $config['db']['shared']['workers'] and $config['db']['shared']['news'] control where MPOS reads the information for users, workers and news. By default, it will access the database name configured in $config['db']['name']. If you plan to use a shared accounts database, just create a new empty database and import your accounts and coin_addresses tables to it. Then set the $config['db']['shared']['accounts'] variable to point at the database name that has the accounts and coin_addresses table in it (coin_addresses are shared across instances but bound to the currency setting in your global config). Same works for Workers and News. Make sure you set your cookie domain properly so all sites access the same session cookie (e.g. pool1.example.tld, pool2.example.tld will use .example.tld as the cookie domain).

MPOS Setup

Simply clone one instance for each coin you want to run and set the shared tables in every setup. They will start sharing accounts across instances automatically. If you are running into login issues, ensure the database user of that instance has read/write access to the accounts table. Accounts, workers and news may NOT be placed on an entirely different database host! Other MySQL systems like the FEDERATED engine could be used for that (out of scope of this setup).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.