[MediaWiki-l] accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Ingo Gabriel
Hello,

we are using MediaWiki as a closed wiki for our community.

For authentication purpose we use SimpleSAMLAuth against our CRM
database. Applied skin is 'Vector'. All works fine so far.

We like to improve usability for accessing direct wiki links of
protected pages like https://our.wiki.de/InternalPage

On the landing page we configured MediaWiki:Loginreqpagetext using the
parameter $1 with some explanatory text to link to our "sso" login form.

The link url of $1 looks like
https://our.wiki.de/index.php?title=Spezial:Anmelden&returnto=InternalPage&returntoquery=
(Spezail:Anmelden translates to Special:Login?)

The login link in the top right corner of the landing page looks like
https://sso.wiki.de/module.php/core/as_login.php?AuthId=specialsqlauth&ReturnTo=https%3A%2F%2Four.wiki.de%2FInternalPage

After login on the sso site the first one leeds to the homepage of the
protected wiki instead to the protected page 'InternalPage'.
The second one leeds to the protected page 'InternalPage' after
successful login.

I assume that the link in top right corner is covered by SimpleSAMLAuths
SimpleSamlAuth.class.php method 'hookPersonalUrls'.

Question: Is it possible to change the link generation $1 in
MediaWiki:Loginreqpagetext the same way like in top right corner and if
so how?. How can it be accessed? Any hints or code snippets appreciated.

Thanks in advance.

Ingo

--
Ingo Gabriel

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Amanda Quad
Hi,
I could be missing something here, but both of the URL's (our.wiki.de and sso.wiki.de) both don't go anywhere. Attempting to open either of them throws a "server not found" error. If the wiki is private, the URL will still load, but attempting to read any page except (usually) the Main Page will throw a "you do not have permission to read this page" message. Are you sure you spelled your address(es) correctly?
--Amanda


On Saturday, September 9, 2017, 2:28 PM, Ingo Gabriel <[hidden email]> wrote:

Hello,

we are using MediaWiki as a closed wiki for our community.

For authentication purpose we use SimpleSAMLAuth against our CRM
database. Applied skin is 'Vector'. All works fine so far.

We like to improve usability for accessing direct wiki links of
protected pages like https://our.wiki.de/InternalPage

On the landing page we configured MediaWiki:Loginreqpagetext using the
parameter $1 with some explanatory text to link to our "sso" login form.

The link url of $1 looks like
https://our.wiki.de/index.php?title=Spezial:Anmelden&returnto=InternalPage&returntoquery=
(Spezail:Anmelden translates to Special:Login?)

The login link in the top right corner of the landing page looks like
https://sso.wiki.de/module.php/core/as_login.php?AuthId=specialsqlauth&ReturnTo=https%3A%2F%2Four.wiki.de%2FInternalPage

After login on the sso site the first one leeds to the homepage of the
protected wiki instead to the protected page 'InternalPage'.
The second one leeds to the protected page 'InternalPage' after
successful login.

I assume that the link in top right corner is covered by SimpleSAMLAuths
SimpleSamlAuth.class.php method 'hookPersonalUrls'.

Question: Is it possible to change the link generation $1 in
MediaWiki:Loginreqpagetext the same way like in top right corner and if
so how?. How can it be accessed? Any hints or code snippets appreciated.

Thanks in advance.

Ingo

--
Ingo Gabriel

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Ingo Gabriel
Hi,

the URL are anonymized (it's a habit in my working environment, sorry).

See real URLs

  * https://wiki.unitas.org/index.php?title=Spezial:Anmelden&returnto=Corporate+Design&returntoquery=
  * https://sso.unitas.org/module.php/core/as_login.php?AuthId=sewobesqlauth&ReturnTo=https%3A%2F%2Fwiki.unitas.org%2FCorporate_Design

on https://wiki.unitas.org/Corporate_Design (which redirects to the same
page as https://wiki.unitas.org if not logged in)

Thanks.
Ingo

Amanda Quad schrieb:

> Hi,
> I could be missing something here, but both of the URL's (our.wiki.de and sso.wiki.de) both don't go anywhere. Attempting to open either of them throws a "server not found" error. If the wiki is private, the URL will still load, but attempting to read any page except (usually) the Main Page will throw a "you do not have permission to read this page" message. Are you sure you spelled your address(es) correctly?
> --Amanda
>
>
> On Saturday, September 9, 2017, 2:28 PM, Ingo Gabriel <[hidden email]> wrote:
>
> Hello,
>
> we are using MediaWiki as a closed wiki for our community.
>
> For authentication purpose we use SimpleSAMLAuth against our CRM
> database. Applied skin is 'Vector'. All works fine so far.
>
> We like to improve usability for accessing direct wiki links of
> protected pages like https://our.wiki.de/InternalPage
>
> On the landing page we configured MediaWiki:Loginreqpagetext using the
> parameter $1 with some explanatory text to link to our "sso" login form.
>
> The link url of $1 looks like
> https://our.wiki.de/index.php?title=Spezial:Anmelden&returnto=InternalPage&returntoquery=
> (Spezail:Anmelden translates to Special:Login?)
>
> The login link in the top right corner of the landing page looks like
> https://sso.wiki.de/module.php/core/as_login.php?AuthId=specialsqlauth&ReturnTo=https%3A%2F%2Four.wiki.de%2FInternalPage
>
> After login on the sso site the first one leeds to the homepage of the
> protected wiki instead to the protected page 'InternalPage'.
> The second one leeds to the protected page 'InternalPage' after
> successful login.
>
> I assume that the link in top right corner is covered by SimpleSAMLAuths
> SimpleSamlAuth.class.php method 'hookPersonalUrls'.
>
> Question: Is it possible to change the link generation $1 in
> MediaWiki:Loginreqpagetext the same way like in top right corner and if
> so how?. How can it be accessed? Any hints or code snippets appreciated.
>
> Thanks in advance.
>
> Ingo
>

--
Ingo Gabriel

Verband der W.K.St.V. Unitas e.V.

Internetbeauftragter
Kooptiertes Mitglied im Beirat für Öffentlichkeitsarbeit,
Nachwuchsförderung und Presse

E-Mail: [hidden email]
Homepage: http://www.unitas.org
Telefon Mobil: +49 173 9962143

Privatanschrift:
Leopoldstr. 37
76133 Karlsruhe

Sitz/Hausanschrift:
Jan-van-Werth-Str. 1
41564 Kaarst

Verbandsgeschäftsführer: Barbara Czernek
Vereinsregister VR 2101 beim Amtsgerichts Bonn

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Mark A. Hershberger-4
In reply to this post by Ingo Gabriel
Ingo Gabriel <[hidden email]> writes:

> For authentication purpose we use SimpleSAMLAuth against our CRM
> database. Applied skin is 'Vector'. All works fine so far.

You don't mention which version of MediaWiki you're using, but if you
plan on upgrading to a supported version (1.27+) then you should really
consider switching to SimpleSAMLphp and PluggableAuth[1].

The author, Cindy Cicalese[2] is the product manager for the MediaWiki
Platform team at WMF and, in my experience, has been extremely helpful.

Footnotes:
[1]  https://www.mediawiki.org/wiki/Extension:SimpleSAMLphp

[2]  https://www.mediawiki.org/wiki/User:Cindy.cicalese

--
Mark A. Hershberger
NicheWork LLC
717-271-1084

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Ingo Gabriel
Thank you for your hint and advice.

We are currently on MediaWiki 1.26,

considering migration to 1.27 LTS and struggling a little bit with our
SimpleSAMLAuth implemantation and the changes in session management of
MediaWiki 1.27+. But this is another projekt. ;)

Very helpful to know that there is a supported alternative which I will
definitely look into.

Best
Ingo

Mark A. Hershberger schrieb:

> Ingo Gabriel <[hidden email]> writes:
>
>> For authentication purpose we use SimpleSAMLAuth against our CRM
>> database. Applied skin is 'Vector'. All works fine so far.
>
> You don't mention which version of MediaWiki you're using, but if you
> plan on upgrading to a supported version (1.27+) then you should really
> consider switching to SimpleSAMLphp and PluggableAuth[1].
>
> The author, Cindy Cicalese[2] is the product manager for the MediaWiki
> Platform team at WMF and, in my experience, has been extremely helpful.
>
> Footnotes:
> [1]  https://www.mediawiki.org/wiki/Extension:SimpleSAMLphp
>
> [2]  https://www.mediawiki.org/wiki/User:Cindy.cicalese
>

--
Ingo Gabriel
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: accessing / modifing $1 in MediaWiki:Loginreqpagetext with SimpleSAMLauth

Ingo Gabriel
In reply to this post by Ingo Gabriel
As an update from further investigation:

The 'returnto' part of URL
https://wiki.unitas.org/index.php?title=Spezial:Anmelden&returnto=Corporate+Design&returntoquery=
seems to be replaced by the page name of the main page during
SimpleSAMLAuth redirect, as the SSO URL looks like
https://sso.unitas.org/module.php/core/loginuserpass.php?AuthState=_b1b96843d964038ab5bb10f066a7e0d4076f73b398%3Ahttps%3A%2F%2Fsso.unitas.org%2Fmodule.php%2Fcore%2Fas_login.php%3FAuthId%3Dsewobesqlauth%26ReturnTo%3D%252F%252Fwiki.unitas.org%252FHauptseite

That said there seems no need to rewrite the $1 variable directly but to
find the code in SimpleSAMLAuth class builds the redirect URL.

Some hints are appreciated for the SimpleSAMLphp code but I will take a
deeper look into SimpleSAMLphp and PluggableAuth as mentioned by Mark
Hershberger, too.

Have a nice weekend.

Ingo

Ingo Gabriel schrieb:

> Hi,
>
> the URL are anonymized (it's a habit in my working environment, sorry).
>
> See real URLs
>
>   * https://wiki.unitas.org/index.php?title=Spezial:Anmelden&returnto=Corporate+Design&returntoquery=
>   * https://sso.unitas.org/module.php/core/as_login.php?AuthId=sewobesqlauth&ReturnTo=https%3A%2F%2Fwiki.unitas.org%2FCorporate_Design
>
> on https://wiki.unitas.org/Corporate_Design (which redirects to the same
> page as https://wiki.unitas.org if not logged in)
>
> Thanks.
> Ingo
>
> Amanda Quad schrieb:
>> Hi,
>> I could be missing something here, but both of the URL's (our.wiki.de and sso.wiki.de) both don't go anywhere. Attempting to open either of them throws a "server not found" error. If the wiki is private, the URL will still load, but attempting to read any page except (usually) the Main Page will throw a "you do not have permission to read this page" message. Are you sure you spelled your address(es) correctly?
>> --Amanda
>>
>>
>> On Saturday, September 9, 2017, 2:28 PM, Ingo Gabriel <[hidden email]> wrote:
>>
>> Hello,
>>
>> we are using MediaWiki as a closed wiki for our community.
>>
>> For authentication purpose we use SimpleSAMLAuth against our CRM
>> database. Applied skin is 'Vector'. All works fine so far.
>>
>> We like to improve usability for accessing direct wiki links of
>> protected pages like https://our.wiki.de/InternalPage
>>
>> On the landing page we configured MediaWiki:Loginreqpagetext using the
>> parameter $1 with some explanatory text to link to our "sso" login form.
>>
>> The link url of $1 looks like
>> https://our.wiki.de/index.php?title=Spezial:Anmelden&returnto=InternalPage&returntoquery=
>> (Spezail:Anmelden translates to Special:Login?)
>>
>> The login link in the top right corner of the landing page looks like
>> https://sso.wiki.de/module.php/core/as_login.php?AuthId=specialsqlauth&ReturnTo=https%3A%2F%2Four.wiki.de%2FInternalPage
>>
>> After login on the sso site the first one leeds to the homepage of the
>> protected wiki instead to the protected page 'InternalPage'.
>> The second one leeds to the protected page 'InternalPage' after
>> successful login.
>>
>> I assume that the link in top right corner is covered by SimpleSAMLAuths
>> SimpleSamlAuth.class.php method 'hookPersonalUrls'.
>>
>> Question: Is it possible to change the link generation $1 in
>> MediaWiki:Loginreqpagetext the same way like in top right corner and if
>> so how?. How can it be accessed? Any hints or code snippets appreciated.
>>
>> Thanks in advance.
>>
>> Ingo
>>
>

--
Ingo Gabriel
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l