User:Jeblad/Qualified access

A qualified access to another system is done according to the usercredits inside the wiki. Such credits can be several features such as user rights, number of contributions, time since registering, time since last block or even user name. The extension identifies some such features.

Defaults can be changed in  to enable configuration of each value, and then further enabled or disabled as necessary. Note that enabling use of user name will make it possible for external parties to identify users.

Fundamental operation is to add a parser function in running text, or to add link to a toolbox through LocalSettings.php, or to add a javascript link somewhere on a referencing page, which creates a backlink to a special page. This takes one parameter describing the resource which identifies the actual configuration set. A call to this special page will be Special:Qualifiedaccess/resource. During processing of this special page the necessary signing and/or encrytion will happend.

If the special page is accessed with an identificator an access for a specific external resource is prepared, and if necessary the available resources are filtered, and only those who make this external resource available will be listed. If no identificator is available the special page will prepare an empty request, which typically is used for an automatic log on to the external resource.

Unless otherwise configured the special page will display all data to be sent to the external web site.

Installation
Note that installation of  is a prerequisite for the extension. wiki-install-folder/extensions/QualifiedAccess
 * 1) Create a new folder (directory) in the following location:
 * 1) Download the following files:
 * 2) * QualifiedAccess.php
 * 3) * QualifiedAccess.i18n.php
 * 4) Copy the files to the new QualifiedAccess folder
 * 5) Add the following code to your LocalSettings.php (at the bottom)

You should not enable reporting of username or realname unless necessary, and if so you should inform your users of the consequences. Note also that using sufficient many attibutes in parallell can compromise the users anonymity.

Usage
The extension will enable a parser function which will prepare a redirect to a special page. This will only identify a resource by its name, and should have no security implications.

The extension will also enable a tag function and according to the definitions it will prepare a POST request, using customised values, for a request towards the given external web site. Any feature not disabled in LocalSettings.php and identified in the local tag function wil be added to the request. If a public key is specified it will be used to sign the request, either after downloading from an external key server or by extracting the tag functions content.

Tags are used on special pages from the Mediawiki namespace.

Identifier for the given dataset
 * resource

The actual url to use for the lookup of the resource
 * action

How to access the external resource
 * method

A comma-separated list of features to add to the request
 * feature

The name used for the external websites' public key
 * name

The email used for the external websites' public key
 * email

The comment used for the external websites' public key
 * comment

An external keyserver to be used for look up of public keys
 * keyserver

The algorithm to use for the signing
 * hash

How to process, only to do a clearsign or a encrypt operation
 * mode

The final rendered special page will contain and visualize all parts to be submitted to the external site, and a button to submitt the prepared dataset. This should make it completly visible and transparent to the user what he/she are about to do.

Note that the identificator for the external digital object is delivered directly to the special page in the call to this.

Signing
Signing is done through one of several subsystems, gpg is used as default.

Example
Requests to a resource are in general Special:Qualifiedaccess/megarchive. If a specific object are requested the shortform is Special:Qualifiedaccess/megarchive,1234567890. The form without a resource isn't generally supported Special:Qualifiedaccess/,1234567890, but the special page will use a fallback and allow use of all resources to locate the object. Some special forms of identificators is identified as such and cant be used as resource names.

The datasets for the resources resides at pages in the Mediawiki-space. This makes them implicit protected from anyone other than sysops.

&lt;qaccess feature="rights" action="http://somewhere.on.net" key="webmaster@somewhere.on.net" keyserver="" /&gt;

&lt;qaccess feature="contribution" action="http://somewhere.on.net" key="webmaster@somewhere.on.net"&gt; -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.4.6 (GNU/Linux) mQGiBEMdoegRBACSr3vbqextfQ51sHPr3Qs8SANLBJJyoPwcxYSTcgava5xWHU70 Zm8yCfHW7T90noBtCVHBNG5Yk9VIEOa6Ab/4axsRH5kc9lGSi7o3dHadFB4SmsEO MVB0DB8REWnQ+9Mh6jdyV5Ef/w7YlO5cnf6MI5dLOKI53ojhro9jRFC6owCgyTzI d6dvWrlutGwtgctQ8zj3EK0D/jezwAhV+neCTxBQYbu5rZthqa9pxHO3wasn+JWT 49qlb5GeCHN0jaBDMuMfVv7iXrLy8oYfq6A/cTnp+tSY4kPG63JvM5UtKzdlGngJ 1Tml/zSkLMumz5W02+jNPBCbNZla1pAJS6miyNZi1KjId3BvRuHOX8x1YKdeHCQA OcFkA/9HmhOtgJuWDHHE2Y+sP2GZ1DNjnRtbm4MhrwFeiuKPQTGX8Ni9ET4/++Mm XbfjMVgLbQ6ulusH4W3qePru96ChOMb+NYnN358Kxwy0sw3ZGsPiQucOmA6QvhWV AHKuRgW6LE5FQsCtVSJidJTEuJ12Yfwsn7rjq655iJk657xJ47Q1V2VibWFzdGVy IChqZWIga29uc3VsZW50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