Extension:CentralAuth/ja

CentralAuth拡張機能は複数のプロジェクトのあいだのグローバル/共用アカウントを可能にします. この拡張機能は6つの新しい特別ページを追加します &mdash; Special:AutoLogin (一覧に表示されない特別ページ)、Special:CentralAuth, Special:GlobalGroupMembership、Special:GlobalGroupPermissions、Special:GlobalUsersとSpecial:MergeAccount.

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. However, this provides no solution to the single-sign-on feature (sign-in on one wiki, like wikipedia.org, automatically makes the user signed-in to e.g. a shared repository under a different, shared domain, like commons.wikimedia.org), nor global account locking.

CentralAuth development is closely tied to the MediaWiki core development trunk. Therefore, if you download the latest CentralAuth version, it may not work with older versions of MediaWiki. In general, for the best results, it may be a good idea to use a trunk version of MediaWiki when using this extension.

インストール
See the setup section below for prerequisites to using CentralAuth. Then follow these instructions when you are ready to activate CentralAuth:
 * 1) 最新のスナップショットをダウンロードしextensionsディレクトリに展開します.
 * 2) Select the database in which to want to CentralAuth's tables to be created (you may wish to create a new database named, for example, ) and run central-auth.sql.
 * 3) Add require_once ("$IP/extensions/CentralAuth/CentralAuth.php"); to LocalSettings.php for each of your wikis, or in another PHP file that is included in LocalSettings.php on each of your wikis.
 * 4) 拡張機能はアクティブになります.

You can also take a look at the walkthrough if it helps. It is more user-friendly than the instructions below.

セットアップ
最初に、$wgConfを使ってウィキファミリーを設定することが必要になります. さもなければCentralAuthはウィキファミリーで使うことができません. これは$wgLocalDatabasesの設定とこれを$wgConf->wikisに割り当てることも含まれます. 次の例に注意深く従ってください. Make sure that you put the configuration code after the  line in LocalSettings.php. 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,  ,  , etc., pertaining to wikis belonging to the same group, all have the suffix " ").

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 and  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  table in your CentralAuth database, with   and (for access to the group management interface). A sample query that is recommended to use is:. Then, run migrateStewards.php to promote local stewards to global steward status.

CentralAuth.php修正したほうがよいさまざまな設定項目があります(たとえば1つのドメイン全体でシングルサインインを提供するかどうか). listed in. In particular, you will want to override the default value of $wgCentralAuthDatabase if your CentralAuth database is named something other than 'centralauth'. Make sure you put such settings after the require_once line in LocalSettings.php, e.g.:

"SUL2" behavior
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,

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

means account creation will create a new global account.

Simulating SUL2 behavior on a single-instance development machine
You can simulate this new behavior on a single-instance development machine. You can set ) so CentralAuth makes its HTTP redirect requests to your same local wiki. This will not exercise central login properly, but will activate its "returnto" behavior.  CentralAuth will still use its own 'centralauth' database to store global user names.

To determine the URL on the login wiki, CentralAuth uses WikiMap which assumes a wiki farm has been configured using $wgConf. Configuration setup (in SiteConfiguration.php) is very flexible; one way to set up a dummy single-wiki  in LocalSettings.php is:

キャッシュの問題
CentralAuthをセットアップするにはすべてのウィキが同じキャッシュサーバーを使うことが必要になります. これらがすべてmemcachedを使っているのであれば問題ありませんが、デフォルトの設定(CACHE_NONE)で異なるデータベース(もしくはプレフィックス)を使っている場合動きません. Copy the objectcache table's structure to the CentralAuth database. This can be done by using a SQL command such as the following (which assumes your CentralAuth database is named  and that your wiki is named  ):

次の設定を行う必要があります:

使用法
MediaWikiのAuthPluginシステムを使ってシングルユーザーログイン(SUL - Single User Login)システムをすぐに可能にします. すべてのウィキにまたがった1つの中央のユーザーテーブルを使ってユーザー作成とログインはグローバルに行われます. ローカルユーザーのアカウントは作成/ログイン時に自動的に作成されることに注意してください.

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

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.

グローバル利用者
A global account can be locked or hidden by a user with the centralauth-lock and centralauth-oversight 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, and logins fail with an "incorrect password" error. A hidden global account's username is not visible in any logs except the global account log.

Users with the centralauth-unmerge permission (again, 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.

Account renames using Extension:Renameuser have to be done locally on every wiki.

ウィキ集合
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).

グローバル利用者グループ
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.

ライセンスとダウンロード
この拡張機能はGNU General Public License 2.0 or laterのもとで利用可能で、Subversionからダウンロード、もしくはWebベースのビューワーからアクセスできます.

ソフトウェアは無保証で提供されます. Wikimediaのウィキ群の必要性; もしくは致命的な脆弱性が見つかった場合に更新されます.

フック
この拡張機能は1つの新しいアカウントを追加します:
 * CentralAuthWikiList

関連項目

 * Single login specifications
 * m:Help:Unified login
 * $wgSharedDB
 * Global session threat assessment
 * en:Wikipedia:Integrated watchlists