<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2021 OPS4J.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<features name="org.ops4j.pax.web-8.0.33" xmlns="http://karaf.apache.org/xmlns/features/v1.6.0">

	<feature name="pax-web-specs" description="Jakarta web APIs and related bundle fragments adding osgi.contract capabilities" version="8.0.33">
		<details>
			Crucial APIs needed by Pax Web. "Canonical" jakarta.* bundles are used and Pax Web specific fragments
			are adding osgi.contract headers.
			This feature should be used if the custom Karaf distribution doesn't provide relevant APIs from
			system bundle (org.osgi.framework.system.packages[.extra])
		</details>

		<!-- Annotation API and osgi.contract=JavaAnnotation, versions 1.3, 1.2, 1.1, 1.0 -->
		<bundle start-level="30">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-annotation13/8.0.33</bundle>
		<!-- EL API and osgi.contract=JavaEL, versions 3.0, 2.2, 2.1, 2.0, 1.0 -->
		<bundle start-level="30">mvn:jakarta.el/jakarta.el-api/3.0.3</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-el2/8.0.33</bundle>
		<!-- Servlet API and osgi.contract=JavaServlet, versions 4.0, 3.1, 3.0, 2.6 -->
		<bundle start-level="30">mvn:jakarta.servlet/jakarta.servlet-api/4.0.4</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-servlet31/8.0.33</bundle>
	</feature>

	<feature name="pax-web-core" description="Core Pax Web bundles" version="8.0.33">
		<details>
			Pax Web API/SPI bundles without any active components (blueprints, scrs, services, activators)
			This feature is needed when integrating with Pax Web (e.g., registering Pax Web specific listeners)
		</details>

		<bundle start-level="30">mvn:jakarta.servlet/jakarta.servlet-api/4.0.4</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-servlet31/8.0.33</bundle>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-api/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-spi/8.0.33</bundle>
	</feature>

	<feature name="pax-web-websockets" description="Pax Web bundles for Web Sockets (JSR 356) support" version="8.0.33">
		<feature>pax-web-core</feature>

		<bundle start-level="30" dependency="true">mvn:jakarta.websocket/jakarta.websocket-api/1.1.2</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-websocket/8.0.33</bundle>
	</feature>

	<!--
		Three distinct (don't install at the same time) sets of features implementing
		OSGi CMPN R7 102 "Http Service Specification". "pax-web-http-*" means "Pax Web HTTP Service for container *".
		Each of these three depend on related "pax-web-*" features for each container runtime. Optionally it's
		possible to install respective "pax-web-*-websockets" features to provide WebSockets (JSR 356) support
	-->

	<feature name="pax-web-jetty" description="Jetty 9 bundles" version="9.4.57.v20241219">
		<bundle start-level="30" dependency="true">mvn:jakarta.servlet/jakarta.servlet-api/4.0.4</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-servlet31/8.0.33</bundle>

		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-util/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-util-ajax/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-io/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-http/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-xml/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-server/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-servlet/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-servlets/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-security/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-continuation/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-jmx/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-jaas/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-extras" description="Jetty 9 additional bundles" version="9.4.57.v20241219">
		<feature>pax-web-jetty</feature>
		<feature>spifly</feature>

<!--		<bundle start-level="30" dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>-->

		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-rewrite/9.4.57.v20241219</bundle>
<!--		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-annotations/9.4.57.v20241219</bundle>-->
<!--		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-plus/9.4.57.v20241219</bundle>-->
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-openid/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-proxy/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-websockets" description="Jetty 9 bundles for Web Sockets support" version="9.4.57.v20241219">
		<feature>pax-web-websockets</feature>
		<feature>pax-web-jetty</feature>

		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-api/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-common/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-server/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.websocket/websocket-servlet/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-http2" description="Jetty 9 bundles for HTTP/2 support" version="9.4.57.v20241219" >
		<details>
			Before JDK 8u252 org.eclipse.jetty.alpn.ALPN from org.eclipse.jetty.alpn:alpn-api:1.1.3.v20160715
			had to be present on boot classpath. It's no longer needed and on newer JDK 8 versions it's enough to
			have org.eclipse.jetty:jetty-alpn-openjdk8-server bundle installed.
			On JDK9+, have org.eclipse.jetty:jetty-alpn-java-server bundle has to be installed.
			So without direct dependency, if pax-web-jetty-http2 feature is installed, additional feature has to be
			installed depending on JDK used:
			 - JDK8: pax-web-jetty-http2-jdk8
			 - JDK9 and later: pax-web-jetty-http2-jdk9
		</details>
		<feature>pax-web-jetty</feature>

		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-hpack/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-common/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-server/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-http2-extras" description="Jetty 9 additional bundles for HTTP/2 support" version="9.4.57.v20241219" >
		<feature>pax-web-jetty</feature>

		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-hpack/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-common/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty.http2/http2-http-client-transport/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-http2-jdk8" description="Jetty 9 bundles for HTTP/2 support (JDK8)" version="9.4.57.v20241219" >
		<feature>pax-web-jetty</feature>

		<bundle start-level="30">mvn:org.eclipse.jetty.alpn/alpn-api/1.1.3.v20160715</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-server/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-openjdk8-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-openjdk8-server/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-jetty-http2-jdk9" description="Jetty 9 bundles for HTTP/2 support (JDK9+)" version="9.4.57.v20241219" >
		<feature>pax-web-jetty</feature>

		<bundle start-level="30">mvn:org.eclipse.jetty.alpn/alpn-api/1.1.3.v20160715</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-server/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-java-client/9.4.57.v20241219</bundle>
		<bundle start-level="30">mvn:org.eclipse.jetty/jetty-alpn-java-server/9.4.57.v20241219</bundle>
	</feature>

	<feature name="pax-web-http-jetty" description="Http Service implementation using Jetty 9" version="8.0.33">
		<feature>pax-web-core</feature>
		<feature>pax-web-jetty</feature>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-runtime/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jetty/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-common/8.0.33</bundle>

		<capability>pax.web.http.provider;provider:=jetty</capability>

		<config name="org.ops4j.pax.web">
# non secure connector configuration
org.osgi.service.http.enabled = true
org.osgi.service.http.port = 8181

# secure connector configuration
org.osgi.service.http.secure.enabled = false
#org.osgi.service.http.port.secure = 8443
#org.ops4j.pax.web.ssl.truststore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.truststore.password = passw0rd
#org.ops4j.pax.web.ssl.truststore.type = JKS
#org.ops4j.pax.web.ssl.keystore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.keystore.password = passw0rd
#org.ops4j.pax.web.ssl.keystore.type = JKS
#org.ops4j.pax.web.ssl.key.password = passw0rd
#org.ops4j.pax.web.ssl.key.alias = server
#org.ops4j.pax.web.ssl.clientauth.needed = false
#org.ops4j.pax.web.ssl.protocols.included = TLSv1.3
#org.ops4j.pax.web.ssl.protocol = TLSv1.3
#org.ops4j.pax.web.ssl.protocols.included = TLSv1.2 TLSv1.3
#org.ops4j.pax.web.ssl.ciphersuites.included = TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384
#org.ops4j.pax.web.ssl.secureRandom.algorithm = NativePRNGNonBlocking
#org.ops4j.pax.web.ssl.renegotiationAllowed = true
#org.ops4j.pax.web.ssl.session.enabled = true

# external Jetty configuration file where Jetty-specific beans may be declared
#org.ops4j.pax.web.config.file = ${karaf.etc}/jetty.xml
# optional Jetty context configuration file applied to all web contexts
# see https://www.eclipse.org/jetty/documentation/jetty-9/index.html#using-basic-descriptor-files
#org.ops4j.pax.web.context.file = ${karaf.etc}/jetty-web.xml

# SameSite attribute configuration for session cookie (possible values: none, lax, strict)
# Important: when using OpenID Connect / Oauth2 (e.g., Keycloak) SameSite=strict won't work, because
# the Keycloak redirected response after authentication should contain JSESSIONID cookie
#org.ops4j.pax.web.session.cookie.sameSite = strict

# this is a root directory for all the context-specific directories managed by Pax Web
javax.servlet.context.tempdir = ${karaf.data}/pax-web/tmp
		</config>
		<configfile finalname="${karaf.etc}/jetty.xml">
			mvn:org.ops4j.pax.web/pax-web-features/8.0.33/xml/config-jetty
		</configfile>
		<configfile finalname="${karaf.etc}/jetty-web.xml">
			mvn:org.ops4j.pax.web/pax-web-features/8.0.33/xml/context-jetty
		</configfile>
	</feature>

	<feature name="pax-web-jetty-keycloak18" description="Keycloak 18.x Jetty bundles" version="8.0.33">
		<!-- This requires mvn:org.keycloak/keycloak-osgi-features/18.0.2/xml/features -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-jetty</feature>

		<!-- These bundles are not part of any enabled Keycloak feature -->
		<bundle>mvn:org.keycloak/keycloak-osgi-adapter/18.0.2</bundle>
		<!-- These bundles are repackaged in pax-web-jetty-keycloak18, so they are easier to use (as with Tomcat) -->
<!--		<bundle>mvn:org.keycloak/keycloak-jetty-adapter-spi/18.0.2</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-jetty-core/18.0.2</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-jetty94-adapter/18.0.2</bundle>-->
		<!-- Fragment for pax-web-jetty - should have lower start-level -->
<!--		<bundle start="false" start-level="25">mvn:org.keycloak/keycloak-pax-web-jetty94/18.0.2</bundle>-->
		<!-- keycloak-pax-web-jetty94 misses important Import, so we use repackaged version -->
		<bundle start="false" start-level="25">mvn:org.ops4j.pax.web/pax-web-jetty-keycloak18/8.0.33</bundle>
	</feature>

	<feature name="pax-web-jetty-keycloak" description="Keycloak 20.x+ Jetty bundles" version="8.0.33">
		<!-- This feature doesn't require any external feature repository -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-jetty</feature>

		<bundle start="false" start-level="25">mvn:org.ops4j.pax.web/pax-web-jetty-keycloak/8.0.33</bundle>
	</feature>

	<feature name="pax-web-tomcat" description="Tomcat 9 bundles" version="9.0.107">
		<details>
			Tomcat libraries are repackaged in pax-web-tomcat bundle based on tomcat-embed-core
		</details>

		<feature>pax-web-core</feature>

		<bundle start-level="30" dependency="true">mvn:jakarta.el/jakarta.el-api/3.0.3</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.servlet/jakarta.servlet-api/4.0.4</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.security.auth.message/jakarta.security.auth.message-api/1.1.3</bundle>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-common/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat/8.0.33</bundle>
	</feature>

	<feature name="pax-web-tomcat-websockets" description="Tomcat 9 bundles for Web Sockets support" version="9.0.107">
		<feature>pax-web-websockets</feature>
		<feature>pax-web-tomcat</feature>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-websocket/8.0.33</bundle>
	</feature>

	<feature name="pax-web-http-tomcat" description="Http Service implementation using Tomcat 9" version="8.0.33">
		<feature>pax-web-tomcat</feature>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-runtime/8.0.33</bundle>

		<capability>pax.web.http.provider;provider:=tomcat</capability>

		<config name="org.ops4j.pax.web">
# non secure connector configuration
org.osgi.service.http.enabled = true
org.osgi.service.http.port = 8181

# secure connector configuration
org.osgi.service.http.secure.enabled = false
#org.osgi.service.http.port.secure = 8443
#org.ops4j.pax.web.ssl.truststore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.truststore.password = passw0rd
#org.ops4j.pax.web.ssl.truststore.type = JKS
#org.ops4j.pax.web.ssl.keystore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.keystore.password = passw0rd
#org.ops4j.pax.web.ssl.keystore.type = JKS
#org.ops4j.pax.web.ssl.key.password = passw0rd
#org.ops4j.pax.web.ssl.key.alias = server
#org.ops4j.pax.web.ssl.clientauth.needed = false
#org.ops4j.pax.web.ssl.protocol = TLSv1.3
#org.ops4j.pax.web.ssl.protocols.included = TLSv1.2 TLSv1.3
#org.ops4j.pax.web.ssl.ciphersuites.included = TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384
#org.ops4j.pax.web.ssl.secureRandom.algorithm = NativePRNGNonBlocking
#org.ops4j.pax.web.ssl.renegotiationAllowed = true
#org.ops4j.pax.web.ssl.session.enabled = true

# external Tomcat configuration file where Tomcat-specific beans may be declared
#org.ops4j.pax.web.config.file = ${karaf.etc}/tomcat-server.xml
# optional Tomcat context configuration file applied to all web contexts
# see https://tomcat.apache.org/tomcat-9.0-doc/config/context.html
#org.ops4j.pax.web.context.file = ${karaf.etc}/tomcat-context.xml

# SameSite attribute configuration for session cookie (possible values: none, lax, strict)
# Important: when using OpenID Connect / Oauth2 (e.g., Keycloak) SameSite=strict won't work, because
# the Keycloak redirected response after authentication should contain JSESSIONID cookie
#org.ops4j.pax.web.session.cookie.sameSite = strict

# this is a root directory for all the context-specific directories managed by Pax Web
javax.servlet.context.tempdir = ${karaf.data}/pax-web/tmp
		</config>
		<configfile finalname="${karaf.etc}/tomcat-server.xml">
			mvn:org.ops4j.pax.web/pax-web-features/8.0.33/xml/config-tomcat
		</configfile>
		<configfile finalname="${karaf.etc}/tomcat-context.xml">
			mvn:org.ops4j.pax.web/pax-web-features/8.0.33/xml/context-tomcat
		</configfile>
	</feature>

	<feature name="pax-web-tomcat-keycloak18" description="Keycloak 18.x Tomcat bundles" version="8.0.33">
		<!-- This requires mvn:org.keycloak/keycloak-osgi-features/18.0.2/xml/features -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-tomcat</feature>

		<bundle>mvn:org.keycloak/keycloak-osgi-adapter/18.0.2</bundle>
		<!-- These bundles are not part of any enabled Keycloak feature -->
<!--		<bundle>mvn:org.keycloak/keycloak-tomcat-adapter-spi/18.0.2</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-tomcat-core-adapter/18.0.2</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-tomcat-adapter/18.0.2</bundle>-->
		<!-- Fragment for pax-web-tomcat - should have lower start-level -->
<!--		<bundle start="false" start-level="25">mvn:org.keycloak/keycloak-pax-web-tomcat8/18.0.2</bundle>-->
		<!-- However we can't even install them as bundles, because they miss OSGi headers -->
		<!-- See: https://github.com/keycloak/keycloak/pull/11704 -->
		<!-- That's why Pax Web itself repackages the above bundles in one: -->
		<bundle start="false" start-level="25">mvn:org.ops4j.pax.web/pax-web-tomcat-keycloak18/8.0.33</bundle>
	</feature>

	<feature name="pax-web-tomcat-keycloak" description="Keycloak 20.x+ Tomcat bundles" version="8.0.33">
		<!-- This feature doesn't require any external feature repository -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-tomcat</feature>

		<bundle start="false" start-level="25">mvn:org.ops4j.pax.web/pax-web-tomcat-keycloak/8.0.33</bundle>
	</feature>

	<feature name="pax-web-undertow" description="Undertow 2 bundles" version="2.2.37.Final">
		<details>
			Undertow libraries are proper OSGi bundles, but pax-web-undertow exports required Wildfly packages
		</details>

		<feature>pax-web-core</feature>

		<bundle start-level="30" dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>
		<bundle start-level="30" dependency="true">mvn:com.sun.activation/javax.activation/1.2.0</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.servlet/jakarta.servlet-api/4.0.4</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.3</bundle>

		<bundle start-level="30">mvn:org.jboss.xnio/xnio-api/3.8.16.Final</bundle>
		<bundle start-level="30">mvn:org.jboss.xnio/xnio-nio/3.8.16.Final</bundle>
		<bundle start-level="30">mvn:io.undertow/undertow-core/2.2.37.Final</bundle>
		<bundle start-level="30">mvn:io.undertow/undertow-servlet/2.2.37.Final</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-undertow/8.0.33</bundle>
	</feature>

	<feature name="pax-web-undertow-websockets" description="Undertow 2 bundles for Web Sockets support" version="2.2.37.Final">
		<feature>pax-web-websockets</feature>
		<feature>pax-web-undertow</feature>

		<bundle start-level="30">mvn:io.undertow/undertow-websockets-jsr/2.2.37.Final</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-undertow-websocket/8.0.33</bundle>
	</feature>

	<feature name="pax-web-http-undertow" description="Http Service implementation using Undertow 2" version="8.0.33">
		<feature>pax-web-core</feature>
		<feature>pax-web-undertow</feature>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-runtime/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-common/8.0.33</bundle>

		<capability>pax.web.http.provider;provider:=undertow</capability>

		<config name="org.ops4j.pax.web">
# non secure connector configuration
org.osgi.service.http.enabled = true
org.osgi.service.http.port = 8181

# secure connector configuration
org.osgi.service.http.secure.enabled = false
#org.osgi.service.http.port.secure = 8443
#org.ops4j.pax.web.ssl.truststore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.truststore.password = passw0rd
#org.ops4j.pax.web.ssl.truststore.type = JKS
#org.ops4j.pax.web.ssl.keystore = ${karaf.etc}/server.keystore
#org.ops4j.pax.web.ssl.keystore.password = passw0rd
#org.ops4j.pax.web.ssl.keystore.type = JKS
#org.ops4j.pax.web.ssl.key.password = passw0rd
#org.ops4j.pax.web.ssl.key.alias = server
#org.ops4j.pax.web.ssl.clientauth.needed = false
#org.ops4j.pax.web.ssl.protocol = TLSv1.3
#org.ops4j.pax.web.ssl.protocols.included = TLSv1.2 TLSv1.3
#org.ops4j.pax.web.ssl.ciphersuites.included = TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384
#org.ops4j.pax.web.ssl.secureRandom.algorithm = NativePRNGNonBlocking
#org.ops4j.pax.web.ssl.renegotiationAllowed = true
#org.ops4j.pax.web.ssl.session.enabled = true

# external Undertow configuration file where Undertow-specific beans may be declared
#org.ops4j.pax.web.config.file = ${karaf.etc}/undertow.xml

# SameSite attribute configuration for session cookie (possible values: none, lax, strict)
# Important: when using OpenID Connect / Oauth2 (e.g., Keycloak) SameSite=strict won't work, because
# the Keycloak redirected response after authentication should contain JSESSIONID cookie
#org.ops4j.pax.web.session.cookie.sameSite = strict

# this is a root directory for all the context-specific directories managed by Pax Web
javax.servlet.context.tempdir = ${karaf.data}/pax-web/tmp
		</config>
		<configfile finalname="${karaf.etc}/undertow.xml">
			mvn:org.ops4j.pax.web/pax-web-features/8.0.33/xml/config-undertow
		</configfile>
	</feature>

	<feature name="pax-web-undertow-keycloak18" description="Keycloak 18.x Undertow bundles" version="8.0.33">
		<!-- This requires mvn:org.keycloak/keycloak-osgi-features/18.0.2/xml/features -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-undertow</feature>

		<bundle>mvn:org.keycloak/keycloak-osgi-adapter/18.0.2</bundle>
		<!--
			These bundles are part of "keycloak-pax-http-undertow" Keycloak feature, but this feature also includes
			org.keycloak/keycloak-camel-undertow, so we're providing Pax Web variant of this feature
		-->
		<bundle>mvn:org.keycloak/keycloak-undertow-adapter-spi/18.0.2</bundle>
		<bundle>mvn:org.keycloak/keycloak-undertow-adapter/18.0.2</bundle>
		<bundle start="false">mvn:org.keycloak/keycloak-pax-web-undertow/18.0.2</bundle>
	</feature>

	<feature name="pax-web-undertow-keycloak" description="Keycloak 20.x+ Undertow bundles" version="8.0.33">
		<!-- This feature doesn't require any external feature repository -->
		<feature>keycloak-adapter-core</feature>
		<feature>pax-web-core</feature>
		<feature>pax-web-http-undertow</feature>

		<bundle start="false" start-level="25">mvn:org.ops4j.pax.web/pax-web-undertow-keycloak/8.0.33</bundle>
	</feature>

	<!-- JSP suport -->

	<feature name="pax-web-jsp" version="8.0.33">
		<feature>pax-web-core</feature>

		<bundle start-level="30">mvn:jakarta.el/jakarta.el-api/3.0.3</bundle>
		<bundle start-level="30" start="false">mvn:org.ops4j.pax.web/pax-web-compatibility-el2/8.0.33</bundle>
		<bundle start-level="30" dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>

		<bundle start-level="30">mvn:org.eclipse.jdt/ecj/3.26.0</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-common/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-jsp/8.0.33</bundle>
	</feature>

	<!-- Implementation of OSGi CMPN R7 140 "Http Whiteboard Specification" -->

	<feature name="pax-web-whiteboard" description="Whiteboard Service implementation" version="8.0.33">
		<feature>pax-web-core</feature>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/8.0.33</bundle>
	</feature>

	<!-- Implementation of OSGi CMPN R7 128 "Web Applications Specification" -->

	<feature name="pax-web-war" description="Web Applications implementation" version="8.0.33">
		<feature>pax-web-core</feature>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-tomcat-common/8.0.33</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-extender-war/8.0.33</bundle>

		<bundle start-level="30" dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/1.3.5</bundle>

		<!-- pax-url-war requires osgi promise+function -->
		<bundle start-level="30" dependency="true">mvn:org.osgi/org.osgi.util.promise/1.3.0</bundle>
		<bundle start-level="30" dependency="true">mvn:org.osgi/org.osgi.util.function/1.2.0</bundle>
		<bundle start-level="30">mvn:org.ops4j.pax.url/pax-url-war/2.6.17/jar/uber</bundle>
	</feature>

	<!-- Karaf integration -->

	<feature name="pax-web-karaf" description="Pax Web Karaf integration" version="8.0.33">
		<feature>pax-web-core</feature>
		<feature>shell</feature>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-deployer/8.0.33</bundle>

		<bundle start-level="30">mvn:org.ops4j.pax.web/pax-web-karaf/8.0.33</bundle>
	</feature>

	<!-- Keycloak features -->

	<feature name="keycloak-adapter-core" description="Migration of removed Keyloak feature to Pax Web" version="8.0.33">
		<details>This feature replaces a feature that was available in Keycloak 18 and earlier</details>

		<!--
			These bundles were part of keycloak-adapter-core feature in Keycloak 18, but
			 - there are new dependencies (keycloak-crypto-default, keycloak-policy-enforcer)
			 - there's SPI requirement (https://github.com/keycloak/keycloak/issues/9287), but we don't want SPI-Fly
			 - we can control packages better after repackaging (OSGi is not easy...)
		-->
<!--		<bundle>mvn:org.keycloak/keycloak-common/22.0.4</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-core/22.0.4</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-authz-client/22.0.4</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-adapter-spi/22.0.4</bundle>-->
<!--		<bundle>mvn:org.keycloak/keycloak-adapter-core/22.0.4</bundle>-->

		<bundle>mvn:org.ops4j.pax.web/keycloak-common/8.0.33</bundle>
		<bundle>mvn:org.ops4j.pax.web/keycloak-osgi-adapter/8.0.33</bundle>

		<bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/4.4.16</bundle>
		<bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/4.5.14</bundle>

		<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/2.19.2</bundle>
		<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/2.19.2</bundle>
		<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/2.19.2</bundle>

		<bundle dependency="true">mvn:org.bouncycastle/bcprov-jdk18on/1.81</bundle>
		<bundle dependency="true">mvn:org.bouncycastle/bcpkix-jdk18on/1.81</bundle>
		<bundle dependency="true">mvn:org.bouncycastle/bcutil-jdk18on/1.81</bundle>
	</feature>

	<!-- Historical features -->

<!--	<feature name="pax-jsf-support" version="8.0.33">-->
<!--		<feature version="[8.0,8.1)">pax-war</feature>-->
<!--		<bundle dependency="true">mvn:javax.enterprise/cdi-api/${dependency.javax.cdi-api.version}</bundle>-->
<!--		<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/${dependency.servicemix.bundles.javax-inject.version}</bundle>-->
<!--		<bundle dependency="true">mvn:javax.interceptor/javax.interceptor-api/${dependency.javax.interceptor-api.version}</bundle>-->
<!--		<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr250-1.0/${dependency.servicemix.specs.version}</bundle>-->
<!--		<bundle dependency="true">mvn:javax.validation/validation-api/${dependency.javax.validation-api.version}</bundle>-->
<!--		<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-1.0.0/${dependency.servicemix.specs.version}</bundle>-->
<!--		<bundle dependency="true">mvn:commons-beanutils/commons-beanutils/${dependency.commons-beanutils.version}</bundle>-->
<!--		<bundle dependency="true">mvn:commons-collections/commons-collections/${dependency.commons-collection3.version}</bundle>-->
<!--		<bundle dependency="true">mvn:commons-codec/commons-codec/${dependency.commons-codec.version}</bundle>-->
<!--		<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-digester/${dependency.servicemix.bundles.commons-digester.version}</bundle>-->
<!--		<bundle dependency="true">mvn:org.apache.geronimo.bundles/commons-discovery/${dependency.geronimo.bundles.commons-discovery.version}</bundle>-->
<!--		<bundle>mvn:org.apache.myfaces.core/myfaces-api/${dependency.jsf.myfaces.version}</bundle>-->
<!--		<bundle>mvn:org.apache.myfaces.core/myfaces-impl/${dependency.jsf.myfaces.version}</bundle>-->
<!--		<capability>-->
<!--			osgi.contract;osgi.contract=JavaJSF;version:Version="2.2";uses:="javax.faces, javax.faces.application,-->
<!--			javax.faces.bean, javax.faces.component, javax.faces.component.behavior, javax.faces.component.html,-->
<!--			javax.faces.component.visit, javax.faces.context, javax.faces.convert, javax.faces.el, javax.faces.event,-->
<!--			javax.faces.flow, javax.faces.flow.builder, javax.faces.lifecycle, javax.faces.model, javax.faces.render,-->
<!--			javax.faces.validator, javax.faces.view, javax.faces.view.facelets, javax.faces.webapp"-->
<!--		</capability>-->
<!--	</feature>-->

<!--	<feature name="pax-jsf-resources-support" description="Provide sharing of resources according to Servlet 3.0 for OSGi bundles and JSF" version="8.0.33">-->
<!--		<feature version="[8.0,8.1)">pax-jsf-support</feature>-->
<!--		<bundle dependency="true">mvn:org.ops4j.pax.web/pax-web-resources-extender/8.0.33</bundle>-->
<!--		<bundle>mvn:org.ops4j.pax.web/pax-web-resources-jsf/8.0.33</bundle>-->
<!--	</feature>-->

</features>
