<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to make web ui use custom authentication plugin to authenticate the user? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-make-web-ui-use-custom-authentication-plugin-to/m-p/325365#M12366</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;first of all, take a look at this (first piece of code): &lt;A href="https://answers.nuxeo.com/general/q/52798df8e3754ec2b908aeaf6008e32b/Custom-Authentication-not-working-as-expected-with-Java-Client-SDK"&gt;https://answers.nuxeo.com/general/q/52798df8e3754ec2b908aeaf6008e32b/Custom-Authentication-not-working-as-expected-with-Java-Client-SDK&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I implemented JWT authentication, but I also kept the Basic Auth and Form Auth. I think you can just remove them from the authenticationChain. As I have seen, you only defined "specificChains", but you didn't add the authentication to the "generic" chain, so your authentication is not defined in the Web UI.&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2020 16:10:10 GMT</pubDate>
    <dc:creator>Rodri_</dc:creator>
    <dc:date>2020-04-28T16:10:10Z</dc:date>
    <item>
      <title>How to make web ui use custom authentication plugin to authenticate the user?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-make-web-ui-use-custom-authentication-plugin-to/m-p/325364#M12365</link>
      <description>&lt;P&gt;I have created a plugin for authentication which will be validating a JWT token passed during API calls. I have also installed web-ui plugin of Nuxeo on my server but when I am logging in with Administrator credentials on web ui login page, it allows me login with any JWT token. Is there any way to prevent login without JWT token?&lt;/P&gt;
&lt;P&gt;Below is the contrib.xml&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component
	name="com.softcell.dms.auth.jwt.authchain-override-config"&amp;gt;
	&amp;lt;extension
		target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService"
		point="specificChains"&amp;gt;
		&amp;lt;!-- 
			Extending specificChains as we only want to handle RestApis through custom jwt plugin
		--&amp;gt;
		&amp;lt;specificAuthenticationChain
			name="RestAPI"&amp;gt;
			&amp;lt;headers&amp;gt;
				&amp;lt;header name = "Authorization"&amp;gt;^(?:Basic|Bearer)\s.*&amp;lt;/header&amp;gt;
				&amp;lt;!-- request not intended with basic authentication --&amp;gt;
			&amp;lt;/headers&amp;gt;
			&amp;lt;replacementChain&amp;gt;
				&amp;lt;plugin&amp;gt;CUSTOM_JWT_AUTH&amp;lt;/plugin&amp;gt;
			&amp;lt;/replacementChain&amp;gt;
		&amp;lt;/specificAuthenticationChain&amp;gt;
	&amp;lt;/extension&amp;gt;
	&amp;lt;extension
		target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService"
		point="specificChains"&amp;gt;
		&amp;lt;!--
			Extending specificChains as we only want to handle Automation apis through custom jwt plugin
		--&amp;gt;
		&amp;lt;specificAuthenticationChain
			name="Automation"&amp;gt;
			&amp;lt;headers&amp;gt;
				&amp;lt;header name = "Authorization"&amp;gt;^(?:Basic|Bearer)\s.*&amp;lt;/header&amp;gt;
				&amp;lt;!-- request not intended with basic authentication --&amp;gt;
			&amp;lt;/headers&amp;gt;
			&amp;lt;replacementChain&amp;gt;
				&amp;lt;plugin&amp;gt;CUSTOM_JWT_AUTH&amp;lt;/plugin&amp;gt;
			&amp;lt;/replacementChain&amp;gt;
		&amp;lt;/specificAuthenticationChain&amp;gt;
	&amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Apr 2020 10:07:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-make-web-ui-use-custom-authentication-plugin-to/m-p/325364#M12365</guid>
      <dc:creator>Ankush_Bandil</dc:creator>
      <dc:date>2020-04-28T10:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make web ui use custom authentication plugin to authenticate the user?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-make-web-ui-use-custom-authentication-plugin-to/m-p/325365#M12366</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;first of all, take a look at this (first piece of code): &lt;A href="https://answers.nuxeo.com/general/q/52798df8e3754ec2b908aeaf6008e32b/Custom-Authentication-not-working-as-expected-with-Java-Client-SDK"&gt;https://answers.nuxeo.com/general/q/52798df8e3754ec2b908aeaf6008e32b/Custom-Authentication-not-working-as-expected-with-Java-Client-SDK&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I implemented JWT authentication, but I also kept the Basic Auth and Form Auth. I think you can just remove them from the authenticationChain. As I have seen, you only defined "specificChains", but you didn't add the authentication to the "generic" chain, so your authentication is not defined in the Web UI.&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 16:10:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-make-web-ui-use-custom-authentication-plugin-to/m-p/325365#M12366</guid>
      <dc:creator>Rodri_</dc:creator>
      <dc:date>2020-04-28T16:10:10Z</dc:date>
    </item>
  </channel>
</rss>

