Show last authors
1 = Allow LoginExtensions on Guest-Protected-Wikis =
2
3 XWiki has introduced an administration setting //Prevent unregistered users from viewing pages, regardless of the page rights// (formerly //Prevent unregistered users from viewing pages, regardless of the page or space rights//) around xwiki 5 or 6 that allows web-site administrators. Probable reason: to make sure that the rights are not completely uncontrolled (as rights are objects which many can manipulate as soon as they can manipulate objects). This checkbox has the effect that only URLs at views that are in the login process are accessible; others redirect to the {{code}}/login/XWiki/XWikiLogin{{/code}}.
4
5 However, applications that provide the facility to authenticate users may need to respond to some URLs or deliver some skin-material or configuration-information in order for them to offer or deliver their services. Examples for these include:
6
7 * JavaScript or CSS UI-modifications to change the login form to invite users to start a login-flow involving an extra information or an external partner
8 * URLs followed by a redirect that take part to an OAuth login flow
9
10 ----
11
12 == About ==
13
14 This page proposes the a sketch of the necessary implementation so that login-providers can still work with this setting activated.
15
16 == Possible Ingredients ==
17
18 Discussed on [[the forum>>https://forum.xwiki.org/t/xwiki-rights-the-prevent-checkbox-and-login-extensions/6541]].
19
20 * Use a [[UI Extension>>https://extensions.xwiki.org/xwiki/bin/view/Extension/UIExtension+Module]] or that loads the JavaScript code on the login page, probably as a component with [[role UIExtension>>https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-uiextension/xwiki-platform-uiextension-api/src/main/java/org/xwiki/uiextension/UIExtension.java]].
21 * Let the JS be delivered by a WebJar
22 * The JavaScript can also be used to implement the functions of an OAuth page which redirects to the identity provider and receives the redirect back.
23 * Let external URLs be reached using the [[Resource API>>https://extensions.xwiki.org/xwiki/bin/view/Extension/Resource%20API]] which allows services to implement wiki-page-independent http-server-actions such as redirects.
24
25 ----
26
27 == Lesser Secure Workaround ==
28
29 In a wiki where an administrator has an overview of all the rights, using the rights can simulate this effect:
30
31 * XWikiGuest is prohibited to make any access except on the Login-relevant pages (XWikiLogin but also the pages of the identity provider)
32 * XWikiAllGroup is allowed to make any access
33
34 === Problem ===
35
36 This setting prevents implementors of login-providers (e.g. GoogleApps, OpenID, ...) to deliver their content when coming from other pages than the login-page: JS-Extensions or OAuth-bounce pages are two example of pages prevented by this checkbox.

Get Connected