HI Gerald,

- TLS inbound
I haven't had to do that yet. So far everything is internal and just http.
I will be doing something to provide an api externally, but I plan on doing
that through an https reverse proxy in front.

- Basic Auth inbound
My Karaf install is mostly for running camel routes, and I use
camel-servlet to expose endpoints. I have basic auth working on them with
pax jetty using its http context processing where you can configure web
contexts, including security constraints, with Configuration Admin. I know
there has been discussion about that on this mailing list not working
correctly with jetty, but the workaround of removing the second
JAASLoginService in jetty.xml works for me.  I will add that I also had to
install mvn:org.apache.geronimo.components/geronimo-jaspi/2.0.0 for it to
work.

- Multiple base paths for APIs inbound
I have a shared camel servlet across contexts that use camel-karaf's
OsgiServletRegisterer so they have the same base path. That's how I'm doing
it, but having separate servlets that are on different base paths is
possible, i.e. it's the pax web extender / whiteboard pattern and it works.
Sorry don't know if that answers your question.

Hope that helps.
-John

On Sat, Feb 19, 2022 at 10:24 AM Gerald Kallas - mailbox.org <
catsh...@mailbox.org> wrote:

> Hi John, thanks for the reply. We decided to use undertow some time ago to
> configure properly
>
> - TLS inbound
> - Basic Auth inbound
> - multiple base paths for APIs inbound
>
> Did you made this with pax-jetty as well?
>
> Sent by my mobile device
> - Gerald Kallas
>
> Am 19.02.2022 um 05:56 schrieb John Taylor <jtt77...@gmail.com>:
>
> 
> Hi Gerald,
> Sorry for not responding sooner, this went to my spam.
> I haven't been able to look at this anymore, and have settled (for now) on
> using pax-jetty
>
> -John
>
>
>
> On Wed, Feb 9, 2022 at 6:33 PM Gerald Kallas <catsh...@mailbox.org> wrote:
>
>> I did add the following lines to the file org.apache.karaf.features.xml
>>
>>     <blacklistedBundles>
>>         <Bundle>mvn:javax.servlet/javax.servlet-api/3.1.0</Bundle>
>>     </blacklistedBundles>
>>
>> as suggested before running
>>
>> feature:install pax-http-undertow
>> feature:install hawtio
>>
>> The error remains the same.
>>
>> org.apache.felix.resolver.reason.ReasonException: Uses constraint
>> violation. Unable to resolve resource org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.23] because it is exposed to
>> package 'javax.servlet' from resources javax.servlet-api
>> [javax.servlet-api/3.1.0] and javax.servlet-api [javax.servlet-api/4.0.0]
>> via two dependency chains.
>>
>> Chain 1:
>>   org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.23]
>>     import:
>> (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=5.0.0)))
>>      |
>>     export: osgi.wiring.package: javax.servlet
>>   javax.servlet-api [javax.servlet-api/3.1.0]
>>
>> Chain 2:
>>   org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.23]
>>     import:
>> (&(osgi.wiring.package=io.undertow.servlet)(version>=2.0.0)(!(version>=2.1.0)))
>>      |
>>     export: osgi.wiring.package=io.undertow.servlet; uses:=javax.servlet
>>   io.undertow.servlet [io.undertow.servlet/2.0.33.Final]
>>     import:
>> (&(osgi.wiring.package=javax.servlet)(version>=4.0.0)(!(version>=5.0.0)))
>>      |
>>     export: osgi.wiring.package: javax.servlet
>>   javax.servlet-api [javax.servlet-api/4.0.0]
>>         at
>> org.apache.felix.resolver.ResolverImpl$UseConstraintError.toException(ResolverImpl.java:2467)
>>         at
>> org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:462)
>>         at
>> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420)
>>         at
>> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374)
>>         at
>> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
>>         at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399)
>>         at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
>>         at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
>>         at
>> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>>         at
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>         at
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>         at java.base/java.lang.Thread.run(Thread.java:829)
>>
>>
>> Any suggestions?
>>
>> > Gerald Kallas <catsh...@mailbox.org> hat am 09.02.2022 15:58
>> geschrieben:
>> >
>> >
>> > Hi JB,
>> >
>> > I did just test this with a vanilla Karaf 4.3.6 and hawtio 2.14.4 and
>> got the same error.
>> >
>> > Are there any updates when this might be fixed?
>> >
>> > Best
>> > Gerald
>> >
>> > > Jean-Baptiste Onofre <j...@nanthrax.net> hat am 10.11.2020 05:37
>> geschrieben:
>> > >
>> > >
>> > > Hi,
>> > >
>> > > That’s related to the Pax Web 7.3 update we did for Karaf 4.3.0.
>> > >
>> > > It upgraded to undertow.
>> > >
>> > > Here, you have two javax.servlet version:
>> > > - 3.1.0 coming with pax-web-undertow
>> > > - 4.0.0 coming with io.undertow.servlet
>> > >
>> > > As workaround you can blacklist javax.servlet 3.1.0 coming from
>> pax-web-undertow.
>> > >
>> > > Anyway, for Karaf 4.3.1, I will fix that at Pax Web (with new 7.3.x
>> version).
>> > >
>> > > Regards
>> > > JB
>> > >
>> > > > Le 9 nov. 2020 à 21:35, John Taylor <jtt77...@gmail.com> a écrit :
>> > > >
>> > > > Hi All,
>> > > > I'm testing karaf 4.3.0 on Windows 10, Java 11.
>> > > > I can't install hawtio-core with pax-http-undertow.
>> > > >
>> > > > It looks like
>> > > > org.ops4j.pax.web.pax-web-undertow imports
>> javax.servlet(version>=3.1.0)(!(version>=5.0.0)))
>> > > > and also imports
>> > > > io.undertow.servlet which has a uses of
>> javax.servlet(version>=4.0.0)(!(version>=5.0.0)))
>> > > >
>> > > >
>> > > >
>> > > > 2020-11-09T14:03:25,743 | ERROR | Karaf ssh console user karaf |
>> ShellUtil                        | 43 - org.apache.karaf.shell.core - 4.3.0
>> | Exception caught while executing command
>> > > > org.apache.felix.resolver.reason.ReasonException: Uses constraint
>> violation. Unable to resolve resource org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.9] because it is exposed to package
>> 'javax.servlet' from resources javax.servlet-api [javax.servlet-api/3.1.0]
>> and javax.servlet-api [javax.servlet-api/4.0.0] via two dependency chains.
>> > > >
>> > > > Chain 1:
>> > > >  org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.9]
>> > > >    import:
>> (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=5.0.0)))
>> > > >     |
>> > > >    export: osgi.wiring.package: javax.servlet
>> > > >  javax.servlet-api [javax.servlet-api/3.1.0]
>> > > >
>> > > > Chain 2:
>> > > >  org.ops4j.pax.web.pax-web-undertow
>> [org.ops4j.pax.web.pax-web-undertow/7.3.9]
>> > > >    import:
>> (&(osgi.wiring.package=io.undertow.servlet)(version>=2.0.0)(!(version>=2.1.0)))
>> > > >     |
>> > > >    export: osgi.wiring.package=io.undertow.servlet;
>> uses:=javax.servlet
>> > > >  io.undertow.servlet [io.undertow.servlet/2.0.31.Final]
>> > > >    import:
>> (&(osgi.wiring.package=javax.servlet)(version>=4.0.0)(!(version>=5.0.0)))
>> > > >     |
>> > > >    export: osgi.wiring.package: javax.servlet
>> > > >  javax.servlet-api [javax.servlet-api/4.0.0]
>> > > >   at
>> org.apache.felix.resolver.ResolverImpl$UseConstraintError.toException(ResolverImpl.java:2444)
>> ~[?:?]
>> > > >   at
>> org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:463)
>> ~[?:?]
>> > > >   at
>> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:421) ~[?:?]
>> > > >   at
>> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:375) ~[?:?]
>> > > >   at
>> org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
>> ~[?:?]
>> > > >   at
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:392)
>> ~[?:?]
>> > > >   at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
>> ~[?:?]
>> > > >   at
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
>> ~[?:?]
>> > > >   at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
>> > > >   at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>> ~[?:?]
>> > > >   at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>> ~[?:?]
>> > > >   at java.lang.Thread.run(Thread.java:834) [?:?]
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > karaf@root()> feature:list --installed
>> > > > Name                | Version      | Required | State   |
>> Repository               | Description
>> > > >
>> --------------------+--------------+----------+---------+--------------------------+--------------------------------------------------
>> > > > wrap                | 2.6.2        | x        | Started |
>> standard-4.2.9           | Wrap URL handler
>> > > > feature             | 4.3.0        | x        | Started |
>> standard-4.3.0           | Features Support
>> > > > shell               | 4.3.0        | x        | Started |
>> standard-4.3.0           | Karaf Shell
>> > > > deployer            | 4.3.0        | x        | Started |
>> standard-4.3.0           | Karaf Deployer
>> > > > bundle              | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide Bundle support
>> > > > config              | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide OSGi ConfigAdmin support
>> > > > diagnostic          | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide Diagnostic support
>> > > > instance            | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide Instance support
>> > > > jaas                | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide JAAS support
>> > > > log                 | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide Log support
>> > > > package             | 4.3.0        | x        | Started |
>> standard-4.3.0           | Package commands and mbeans
>> > > > service             | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide Service support
>> > > > system              | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide System support
>> > > > kar                 | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide KAR (KARaf archive) support
>> > > > ssh                 | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide a SSHd server on Karaf
>> > > > management          | 4.3.0        | x        | Started |
>> standard-4.3.0           | Provide a JMX MBeanServer and a set of MBeans in
>> > > > eventadmin          | 4.3.0        | x        | Started |
>> standard-4.3.0           | OSGi Event Admin service specification for event-
>> > > > scr                 | 4.3.0        |          | Started |
>> standard-4.3.0           | Declarative Service support
>> > > > wrap                | 2.6.2        | x        | Started |
>> standard-4.3.0           | Wrap URL handler
>> > > > pax-web-core        | 7.3.9        |          | Started |
>> org.ops4j.pax.web-7.3.9  | Provide Core pax-web bundles
>> > > > pax-http            | 7.3.9        |          | Started |
>> org.ops4j.pax.web-7.3.9  | Implementation of the OSGI HTTP Service
>> > > > undertow            | 2.0.31.Final |          | Started |
>> org.ops4j.pax.web-7.3.9  |
>> > > > pax-http-undertow   | 7.3.9        | x        | Started |
>> org.ops4j.pax.web-7.3.9  |
>> > > > jdbc                | 4.3.0        | x        | Started |
>> enterprise-4.3.0         | JDBC service and commands
>> > > > pax-jdbc-spec       | 1.4.4        |          | Started |
>> org.ops4j.pax.jdbc-1.4.4 | Provides OSGi JDBC Service spec
>> > > > pax-jdbc            | 1.4.4        |          | Started |
>> org.ops4j.pax.jdbc-1.4.4 | Provides JDBC Service support
>> > > > pax-jdbc-config     | 1.4.4        |          | Started |
>> org.ops4j.pax.jdbc-1.4.4 | Provides JDBC Config support
>> > > > pax-jdbc-pool-dbcp2 | 1.4.4        | x        | Started |
>> org.ops4j.pax.jdbc-1.4.4 | Provides JDBC Pooling DataSourceFactory
>> > > >
>> > > >
>> > > >
>> > > > -John
>>
>

Reply via email to