Camel-CMIS Authentication Bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Camel-CMIS Authentication Bug?

pokkie
Consider the following route:

from("file:/tmp/data")
                .process(exchange -> {
                    exchange.getIn().getHeaders().put(SessionParameter.USER, "admin");
                    exchange.getIn().getHeaders().put(SessionParameter.PASSWORD, "admin");
                    exchange.getIn().getHeaders().put(SessionParameter.COOKIES, "true");
                    exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
                    exchange.getIn().getHeaders().put(PropertyIds.NAME, exchange.getIn().getHeader(Exchange.FILE_NAME));
                    exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH, "/demo");

                })
                .to("cmis://http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom?username={{username}}&password={{password}}&repositoryId=-default-");

When this route executes, it gives the following exception:

org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException: Unauthorized
        at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:477) ~[chemistry-opencmis-client-bindings-0.13.0.jar:0.13.0]

I have stepped through the code and for some reason, both the cmis username (org.apache.chemistry.opencmis.user) and password (org.apache.chemistry.opencmis.password) properties are null when the route executes.

However, when I insert those values in the debugger it passes.

Any ideas?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Camel-CMIS Authentication Bug?

Claus Ibsen-2
Hi

I think we fixed a bug recently in that. You can check JIRA about cmis tickets.


On Wed, Jan 11, 2017 at 7:55 AM, pokkie <[hidden email]> wrote:

> Consider the following route:
>
> from("file:/tmp/data")
>                 .process(exchange -> {
>                     exchange.getIn().getHeaders().put(SessionParameter.USER,
> "admin");
>
> exchange.getIn().getHeaders().put(SessionParameter.PASSWORD, "admin");
>
> exchange.getIn().getHeaders().put(SessionParameter.COOKIES, "true");
>
> exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE,
> "text/plain; charset=UTF-8");
>                     exchange.getIn().getHeaders().put(PropertyIds.NAME,
> exchange.getIn().getHeader(Exchange.FILE_NAME));
>
> exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH,
> "/demo");
>
>                 })
>
> .to("cmis://http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom?username={{username}}&password={{password}}&repositoryId=-default-");
>
> When this route executes, it gives the following exception:
>
> org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException:
> Unauthorized
>         at
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:477)
> ~[chemistry-opencmis-client-bindings-0.13.0.jar:0.13.0]
>
> I have stepped through the code and for some reason, both the cmis username
> (org.apache.chemistry.opencmis.user) and password
> (org.apache.chemistry.opencmis.password) properties are null when the route
> executes.
>
> However, when I insert those values in the debugger it passes.
>
> Any ideas?
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CMIS-Authentication-Bug-tp5792382.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Camel-CMIS Authentication Bug?

pokkie
In reply to this post by pokkie
Update:

I have confirmed that it is a cmis-component version-based issue:

Version 2.16.5 of the code snippet works just fine
Version 2.17.0 and above of the code snippet produces the results that I posted.

What's the process to getting this logged and investigated?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Camel-CMIS Authentication Bug?

pokkie
In reply to this post by Claus Ibsen-2
Apologies Claus, only saw your message now.
Loading...