cancel
Showing results for 
Search instead for 
Did you mean: 

authenticationChain of my plugin is overridden by org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig

Rafi_Cohen
Champ in-the-making
Champ in-the-making

I am trying to test a login/auth plugin example, which (among other things) alters the authenticationChain (in order to add itself), and yet it seems it does not 'kick in' or being used, i.e. the log shows both its auth-plugin and login-plugin are initialized, and yet when I try to log in, they do not get involved in the auth/login process. looking at the log, it seems the alteration the auth plugin makes to authenticationChain are overridden by org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig (from the log):

[org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService] New authentication chain powered by service:org.nuxeo.ecm.platform.your.authentication.chain.config
...
[org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService] New authentication chain powered by service:org.nuxeo.ecm.platform.ui.web.auth.defaultConfig
...
[org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService] New authentication chain powered by service:com.ikanow.infinit.e.nuxeo.auth.InfiniteAuthenticator <<< NOTE THIS IS THE PLUGIN-EXAMPLE I AM TRYING TO TEST ALTERING THE CHAIN, so that it would be able to perform its task
...
[org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService] New authentication chain powered by service:org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig <<< AND YET HERE THE ALTERATION MADE ABOVE IS OVERRIDDEN
...

Could anyone please advise on how to resolve this issue ?

p.s. just discovered that if I rename the plugin bundle to start with a 'Z' it gets loaded last, and as such its auth-chain 'prevails' (at the cost of overwriding WebEngine chain changes, of course). ~~about to try adding 'order' to the plugin (i.s. as another alternative, instead of renaming the bundle) to see if it will also work.~~ Further tests results:

  • (as mentioned above) renaming the bundle name: the test-plugin chain alteration is the last to be applied
  • renaming the config-file of the bundle (under NUXEO_INSTALL/nxserver/config) in the same way: WebEngine chain alteration is the last to be applied
  • adding 'order = "9999"' to the test plugin: WebEngine chain alteration is the last to be applied
6 REPLIES 6

mejihad_
Champ on-the-rise
Champ on-the-rise

Hi Rafi,

Try to add this line in your xml contrib file:

<component name="yourComponent" version="1.0">
	<require>org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig</require>
...

Jihad

Rafi_Cohen
Champ in-the-making
Champ in-the-making

Does not seem to work

Rafi_Cohen
Champ in-the-making
Champ in-the-making

Apology - it does work

Sherry_Ummen
Champ on-the-rise
Champ on-the-rise

Hi [Rafi Cohen](https

Sherry_Ummen
Champ on-the-rise
Champ on-the-rise

[Rafi Cohen](https

Sherry_Ummen
Champ on-the-rise
Champ on-the-rise

Also how do you test its working using which API or method ?