<?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: [Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317400#M4401</link>
    <description>&lt;P&gt;For me it's a big regression because in LTS2019n it worked fine, but since LTS2021 OAUTH2 on CMIS et api Automation is breaked.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 08:21:10 GMT</pubDate>
    <dc:creator>freemann_</dc:creator>
    <dc:date>2023-02-03T08:21:10Z</dc:date>
    <item>
      <title>[Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317398#M4399</link>
      <description>&lt;P&gt;Hi &lt;A href="https://app.quandora.com/object/3c6ceed0-6c7d-420f-aa20-d7319ed44810"&gt;Kevin&lt;/A&gt;, &lt;A href="https://app.quandora.com/object/dfaf935a-5623-4e9c-9778-7a79c78a8114"&gt;Florent Guillaume&lt;/A&gt;&lt;BR /&gt; /&amp;gt;
When I try to connect to login on automation through OATUH2 token I always get &lt;STRONG&gt;http 401 statut.&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -H "Authorization:Bearer 012453xxgqzl45" -X POST &lt;A href="https://localhost:8080/nuxeo/api/v1/automation/login" target="test_blank"&gt;https://localhost:8080/nuxeo/api/v1/automation/login&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Response :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!doctype html&amp;gt;&amp;lt;html lang="en"&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;HTTP Status 401 ? Unauthorized&amp;lt;/title&amp;gt;&amp;lt;style type="text/css"&amp;gt;body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}&amp;lt;/style&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;HTTP Status 401 ? Unauthorized&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;%
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I try Basic AUTH, there is no problem and I don't understand why.
On my server side I have my custom &lt;STRONG&gt;auth.xml&lt;/STRONG&gt; sets like :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;...
&amp;lt;specificAuthenticationChain name="RestAPI"&amp;gt;
                        &amp;lt;urlPatterns&amp;gt;
                                &amp;lt;url&amp;gt;(.*)/api/v.*&amp;lt;/url&amp;gt;
                        &amp;lt;/urlPatterns&amp;gt;
                        &amp;lt;replacementChain&amp;gt;
                                &amp;lt;plugin&amp;gt;AUTOMATION_BASIC_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;BASIC_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;PORTAL_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;TOKEN_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;OAUTH2_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;JWT_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;!-- &amp;lt;plugin&amp;gt;ANONYMOUS_AUTH&amp;lt;/plugin&amp;gt; --&amp;gt;
                        &amp;lt;/replacementChain&amp;gt;
                &amp;lt;/specificAuthenticationChain&amp;gt;

                &amp;lt;specificAuthenticationChain name="ATOM_CMIS"&amp;gt;
                        &amp;lt;urlPatterns&amp;gt;
                                &amp;lt;url&amp;gt;(.*)/atom/cmis(/.*)?&amp;lt;/url&amp;gt;
                                &amp;lt;url&amp;gt;(.*)/atom/cmis10(/.*)?&amp;lt;/url&amp;gt;
                        &amp;lt;/urlPatterns&amp;gt;
                        &amp;lt;replacementChain&amp;gt;
                                &amp;lt;plugin&amp;gt;BASIC_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;PORTAL_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;TOKEN_AUTH&amp;lt;/plugin&amp;gt;
                        &amp;lt;/replacementChain&amp;gt;
                &amp;lt;/specificAuthenticationChain&amp;gt;

                &amp;lt;specificAuthenticationChain name="JSON_CMIS"&amp;gt;
                        &amp;lt;urlPatterns&amp;gt;
                          &amp;lt;url&amp;gt;(.*)/json/cmis(/.*)?&amp;lt;/url&amp;gt;
                        &amp;lt;/urlPatterns&amp;gt;
                        &amp;lt;replacementChain&amp;gt;
                                &amp;lt;plugin&amp;gt;BASIC_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;PORTAL_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;TOKEN_AUTH&amp;lt;/plugin&amp;gt;
                        &amp;lt;/replacementChain&amp;gt;
                  &amp;lt;/specificAuthenticationChain&amp;gt;

                &amp;lt;specificAuthenticationChain name="TokenAuth"&amp;gt;
                        &amp;lt;headers&amp;gt;
                          &amp;lt;header name="X-Authentication-Token"&amp;gt;.*&amp;lt;/header&amp;gt;
                        &amp;lt;/headers&amp;gt;
                        &amp;lt;replacementChain&amp;gt;
                                &amp;lt;plugin&amp;gt;TOKEN_AUTH&amp;lt;/plugin&amp;gt;
                                &amp;lt;plugin&amp;gt;AUTOMATION_BASIC_AUTH&amp;lt;/plugin&amp;gt;
                        &amp;lt;/replacementChain&amp;gt;
                  &amp;lt;/specificAuthenticationChain&amp;gt;
...

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 09:04:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317398#M4399</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2023-02-02T09:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317399#M4400</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the same problem with cmis authentication.
When I try :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -H "Authorization:Bearer 012453xxgqzl45" &lt;A href="http://localhost:8080/nuxeo/json/cmis" target="test_blank"&gt;http://localhost:8080/nuxeo/json/cmis&lt;/A&gt; | json_pp
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have an exception server side and this response :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{
   "exception" : "runtime",
   "message" : "Cannot create a CoreSession outside a security context,  login() missing."
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Exception :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;2023-02-02T11:32:51,303 WARN  [https-jsse-nio-0.0.0.0-8443-exec-4] [org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter] No auth plugin can be found to do the Login Prompt
2023-02-02T11:32:51,341 WARN  [https-jsse-nio-0.0.0.0-8443-exec-4] [org.nuxeo.ecm.core.opencmis.bindings.NuxeoCmisServiceWrapper] org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context,  login() missing.
org.nuxeo.ecm.core.api.NuxeoException: Cannot create a CoreSession outside a security context,  login() missing.
	at org.nuxeo.ecm.core.api.CoreInstance.getPrincipal(CoreInstance.java:199) ~[nuxeo-core-api-2021.32.8.jar:?]
	at org.nuxeo.ecm.core.api.CoreInstance.getCoreSession(CoreInstance.java:49) ~[nuxeo-core-api-2021.32.8.jar:?]
	at org.nuxeo.ecm.core.opencmis.impl.server.NuxeoRepositories.initRepositories(NuxeoRepositories.java:68) ~[nuxeo-opencmis-impl-2021.1.19.jar:?]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 10:35:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317399#M4400</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2023-02-02T10:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317400#M4401</link>
      <description>&lt;P&gt;For me it's a big regression because in LTS2019n it worked fine, but since LTS2021 OAUTH2 on CMIS et api Automation is breaked.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 08:21:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317400#M4401</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2023-02-03T08:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317401#M4402</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Have you tried to place &lt;STRONG&gt;OAUTH2_AUTH&lt;/STRONG&gt; in first position in &lt;STRONG&gt;replacementChain&lt;/STRONG&gt; list ?
Regards.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 13:59:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317401#M4402</guid>
      <dc:creator>Ghazi_HAKIM</dc:creator>
      <dc:date>2023-02-06T13:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: [Resolved] - LTS2021 - Nuxeo api automation login does not support OAUTH2 authentication</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317402#M4403</link>
      <description>&lt;P&gt;Hello &lt;A href="https://answers.nuxeo.com/users/1329910d-2c50-40e2-89dc-7f9e3cb45890"&gt;Ghazi HAKIM&lt;/A&gt; ,&lt;BR /&gt; /&amp;gt;
Thanks for your reply.&lt;BR /&gt; /&amp;gt;
Indeed, I had to add  &lt;STRONG&gt;OAUTH2_AUTH&lt;/STRONG&gt; in each part of &lt;STRONG&gt;replacementChain&lt;/STRONG&gt; of each section of &lt;STRONG&gt;specificAuthenticationChain&lt;/STRONG&gt; to make it works.&lt;BR /&gt; /&amp;gt;
I go to do some tests and come back for confirm that's it works.&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 07:20:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/resolved-lts2021-nuxeo-api-automation-login-does-not-support/m-p/317402#M4403</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2023-02-07T07:20:38Z</dc:date>
    </item>
  </channel>
</rss>

