Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-29 Thread Jean-Baptiste Onofre
Thanks, I saw the Jira. I will take a look. Regards JB > Le 29 juin 2020 à 09:26, Gerald Kallas a écrit : > > See for detailed description and code sample the ticket > > https://issues.apache.org/jira/browse/KARAF-6772 > > Best > - Gerald > >> Jean-Baptiste Onofre hat am 29.06.2020 08:34

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-29 Thread Gerald Kallas
See for detailed description and code sample the ticket https://issues.apache.org/jira/browse/KARAF-6772 Best - Gerald > Jean-Baptiste Onofre hat am 29.06.2020 08:34 geschrieben: > > > Thanks, I will take a look. > > Regards > JB > > > Le 29 juin 2020 à 08:31, Gerald Kallas a écrit : > >

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-29 Thread Jean-Baptiste Onofre
Thanks, I will take a look. Regards JB > Le 29 juin 2020 à 08:31, Gerald Kallas a écrit : > > I'm going to create the tickets for the issues. We may extend these so far > with additional information. > > Best > - Gerald > >> Jean-Baptiste Onofre hat am 29.06.2020 07:40 geschrieben: >> >>

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-29 Thread Gerald Kallas
I'm going to create the tickets for the issues. We may extend these so far with additional information. Best - Gerald > Jean-Baptiste Onofre hat am 29.06.2020 07:40 geschrieben: > > > I thought Gerald already explained it on the mailing list. My intention is > more to create the Jira with

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-28 Thread Jean-Baptiste Onofre
I thought Gerald already explained it on the mailing list. My intention is more to create the Jira with the details. Regards JB > Le 29 juin 2020 à 07:33, Andrea Cosentino a écrit : > > I think it's good to have the details shared in public. > > Il lun 29 giu 2020, 07:30 Jean-Baptiste Onofre

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-28 Thread Andrea Cosentino
I think it's good to have the details shared in public. Il lun 29 giu 2020, 07:30 Jean-Baptiste Onofre ha scritto: > Hi, > > Yes Karaf 4.2.9 upgraded to Pax Web 7.2.15 and Jetty 9.4.28.v20200408. > > Can you please send a private message about issues you have with Karaf > 4.2.9 and Camel 3.4.0

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-28 Thread Jean-Baptiste Onofre
Hi, Yes Karaf 4.2.9 upgraded to Pax Web 7.2.15 and Jetty 9.4.28.v20200408. Can you please send a private message about issues you have with Karaf 4.2.9 and Camel 3.4.0 (as I’m working on camel karaf for 3.5.0) ? Thanks, Regards JB > Le 28 juin 2020 à 22:02, Gerald Kallas a écrit : > > I

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-28 Thread Gerald Kallas
I tested the combination Karaf 4.2.8 and Camel 3.3.0, with this the workaround works as expected. Seems that Jetty has been updated in Karaf 4.2.9? (The combination Karaf 4.2.8 and Camel 3.4.0 doesn't work due to other issues.) > Gerald Kallas hat am 28.06.2020 18:12 geschrieben: > > > Hi

Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0

2020-06-28 Thread Gerald Kallas
Hi all, I was updating the runtime to Karaf 4.2.9 and Camel 3.4.0. after removing one of the org.eclipse.jetty.jaas.JAASLoginService entries in my etc/jetty.xml I'm getting an error as attached below. Neither hawtio nor my servlet are working any longer. Seems that now both entries of

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-14 Thread Alex Soto
CC forum > On May 14, 2020, at 12:42 PM, Alex Soto wrote: > > Looks good to me: '/camel/api/say/hello' should be correct. > > The only difference I see is that in my case I am not using the > ‘httpRegistry'; try removing that part. > > > Best regards, > Alex soto > > > > >> On May

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-14 Thread Gerald Kallas
Thanks Alex. I'm still struggling upfront. I was copying your example and have combined the parts in one Blueprint DSL. See my complete Blueprint DSL file below. I'm always getting a HTTP 404 (not found). I'm assuming that the URL https://localhost:8443/camel/api/say/hello should be the one

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-14 Thread Alex Soto
Hi Gerald, I would put the Servlet in the same bundle; I don’t see the need to separate it for reuse. Looks like you are missing security constraint in the 'etc/org.ops4j.pax.web.context-admin.cfg' file security.constraint.1.url = /camel/services/* security.constraint.1.method = *

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Gerald Kallas
Tried this following you sample but the access to curl --location --request GET 'https://localhost:8443/camel/services/hello1' gives a HTTP 404 (not found) back. http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Gerald Kallas
Hi Alex, I think I'm missing some details. I have 3 files (see below). The log shows me when updating the cfg 2020-05-13T22:17:59,528 | INFO | fileinstall-/opt/apache-karaf-4.2.7/etc | fileinstall | 10 - org.apache.felix.fileinstall - 3.6.4 | Updating configuration from

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Alex Soto
I tested Pax-Web Context Processing as explained here: https://ops4j1.jira.com/wiki/spaces/paxweb/pages/354025473/HTTP+Context+processing And it does in fact, work. I was able to add BASIC authentication

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Gerald Kallas
As I have only Blueprint DSL routes it would be interesting how to configure this either in a Blueprint DSL file or globally in a config. Best - Gerald > Alex Soto hat am 13. Mai 2020 16:26 geschrieben: > > > This looks promising: > >

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Gerald Kallas
Hi Alex, you're absolutely right. We ended up for the moment with one Blueprint DSL file that contains the security handler configuration with multiple constraints (for different paths) and one route as kind of a "heartbeat" listening on the port and get assigned the security handler. All the

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Alex Soto
This looks promising: https://ops4j1.jira.com/wiki/spaces/paxweb/pages/354025473/HTTP+Context+processing Best regards, Alex soto > On May 13, 2020, at 10:26 AM, Alex Soto wrote: > > Re-sending to group

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Alex Soto
Re-sending to group > On May 13, 2020, at 9:38 AM, Alex Soto wrote: > > Thank you Gerald, I appreciate the link. > > I was starting going that route, but it is not optimal, because I have more > than one bundle that expose HTTP endpoints, and it is wasteful for each one > to run their own

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Achim Nierbeck
Yes, the configuration is case sensitive. regarding sample for Karaf, I can do that, but there had been a reason for consuming 10 Pages in the "Apache Karaf Cookbook" :) regards, Achim Am Di., 12. Mai 2020 um 23:10 Uhr schrieb Gerald Kallas < catsh...@mailbox.org>: > Hi Alex, > > we did make

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-12 Thread Gerald Kallas
Hi Alex, we did make some experience with TLS and basic authentication on HTTP consumers in between (and with the help of this mailing list). I started a article series on my blog, see https://www.catshout.de/?p=161 for a single HTTP consumer with TLS and basic authentication enabled. It's

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-12 Thread Alex Soto
This threads talks about the need to : http://karaf.922171.n3.nabble.com/Jetty-security-camel-servlet-td2120289.html Quote: > you need to use the OSGi HTTP service > api to properly configure the security bits (by

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-12 Thread Alex Soto
Thanks, JB. I found the problem was, a typo in the `realm-name` in the web.xml file. It appears to be case-sensitive. I had: BASIC Karaf But in the jetty.xml: karaf So I think it could not match the `Karaf` in

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-12 Thread Jean-Baptiste Onofre
Hi, It sounds like a class loader issue, so possible. Let me add an example in Karaf showing basic auth. Regards JB > Le 12 mai 2020 à 15:39, Alex Soto a écrit : > > I found that I have multiple versions of Jetty deployed in Karaf, that is: > 9.4.20.v20190813, and 9.4.22.v20191022 > Would

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-12 Thread Alex Soto
I found that I have multiple versions of Jetty deployed in Karaf, that is: 9.4.20.v20190813, and 9.4.22.v20191022 Would this be the reason for the following exception: 2020-05-12T09:10:19,122 | ERROR | paxweb-extender-2-thread-1 | WebAppPublisher | 302 -

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Alex Soto
A little more info. The class appears in many bundles: karaf@root()> bundle:find-class org.eclipse.jetty.security.authentication.BasicAuthenticator Jetty :: Security (229) org/eclipse/jetty/security/authentication/BasicAuthenticator.class Jetty :: Security (230)

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Alex Soto
Thanks for the effort to help me, Achim. I believe the Jetty configuration is being added automatically by PAX-Web, because I see it being created after the container starts, so I think that part is fine. The web.xml is correctly configured too, except I am using BASIC authentication as

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Achim Nierbeck
Hi Alex, a wab is nothing else then a war which is already contains the required Web-ApplicationContext parameter. That's the only difference, and the sample is actually the same ;) Needed to look this up from the "Apache Karaf Cookbook" :) (it's been a while I did write this and the code in

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Alex Soto
Ok, I am not having good luck with this. Using the realm “karaf” and BASIC authentication. Mind that my artifact is a WAB, not a WAR. My web.xml Protected Area /*

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Alex Soto
Ok I saw it now, it was hidden: Test Realm Best regards, Alex soto > On May 11, 2020, at 8:31 AM, Alex Soto wrote: > > Thanks Achin and JB, > > I looked at that example, but that is is WAR, and I am looking for WAB > example. Still, in the ‘web.xml’ file there is no reference to JAAS

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Alex Soto
Thanks Achin and JB, I looked at that example, but that is is WAR, and I am looking for WAB example. Still, in the ‘web.xml’ file there is no reference to JAAS realm. Where do you indicate the realm name? (I have my own realm separate from the default Karaf one). Actually, it is not fun

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Jean-Baptiste Onofre
No rush, I think it’s easier for our users to find "how to" ;) Thanks ! Regards JB > Le 11 mai 2020 à 09:09, Achim Nierbeck a écrit : > > Sure .. > maybe I find some time during this week to create this there ;) > > regards, Achim > > p.s. this just reminds me, that those samples are also

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Achim Nierbeck
Sure .. maybe I find some time during this week to create this there ;) regards, Achim p.s. this just reminds me, that those samples are also in the "Apache Karaf Cookbook" :) Am Mo., 11. Mai 2020 um 06:32 Uhr schrieb Jean-Baptiste Onofre < j...@nanthrax.net>: > Maybe worth to add this in the

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-10 Thread Jean-Baptiste Onofre
Maybe worth to add this in the Karaf wab example as well. I will. Regards JB > Le 10 mai 2020 à 13:45, Achim Nierbeck a écrit : > > Hi, > > there is a sample app for Pax-Web, which is also used in the test-suite: >

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-10 Thread Achim Nierbeck
Hi, there is a sample app for Pax-Web, which is also used in the test-suite: https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-authentication And actually you just need to reference the jaas of the surrounding Karaf instance in your web.xml file. regards, Achim Am Fr., 8. Mai

Basic authentication of WAB using Jaas in Karaf

2020-05-08 Thread Alex Soto
Hello, Is there a good tutorial or documentation on how to protect a WAB (Web Application Bundle) with JAAS authentication? My Karaf version is 4.2.8. Documentation here https://karaf.apache.org/manual/latest/webcontainer is scarce, only