搜索

此内容没有您所选择的语言版本。

Chapter 5. Quarkus CXF extensions reference

download PDF

This chapter provides reference information about Quarkus CXF extensions.

5.1. Quarkus CXF

Core capabilities for implementing SOAP clients and JAX-WS services.

5.1.1. Maven coordinates

Create a new project using quarkus-cxf on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf</artifactId>
</dependency>

5.1.2. Supported standards

5.1.3. Usage

There are several chapters in the User guide covering the usage of this extension.

5.1.4. Configuration

The padlock icon lock indicates a configuration property that is fixed at build time. All other configuration properties are overridable at runtime.

Configuration propertyTypeDefault

lock quarkus.cxf.path

string

/services

The default path for CXF resources.

Earlier versions

The default value before Quarkus CXF version 2.0.0 was /.

Environment variable: QUARKUS_CXF_PATH

lock quarkus.cxf.min-chunk-size

int

128

The size in bytes of the chunks of memory allocated when writing data.

This is a very advanced setting that should only be set if you understand exactly how it affects the output IO operations of the application.

Environment variable: QUARKUS_CXF_MIN_CHUNK_SIZE

lock quarkus.cxf.output-buffer-size

int

8191

The size of the output stream response buffer in bytes. If a response is larger than this and no content-length is provided then the response will be chunked.

Larger values may give slight performance increases for large responses, at the expense of more memory usage.

Environment variable: QUARKUS_CXF_OUTPUT_BUFFER_SIZE

quarkus.cxf.decoupled-endpoint-base

string

 

An URI base to use as a prefix of quarkus.cxf.client.myClient.decoupled-endpoint. You will typically want to set this to something like the following:

quarkus.cxf.decoupled-endpoint-base = https://api.example.com:${quarkus.http.ssl-port}${quarkus.cxf.path}

or, for plain HTTP:

quarkus.cxf.decoupled-endpoint-base = http://api.example.com:${quarkus.http.port}${quarkus.cxf.path}

If you invoke your WS client from within a HTTP handler, you can leave this option unspecified and rather set it dynamically on the request context of your WS client using the org.apache.cxf.ws.addressing.decoupled.endpoint.base key. Here is an example how to do that from a RESTeasy handler method:

import java.util.Map;
import jakarta.inject.Inject;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.UriInfo;
import jakarta.xml.ws.BindingProvider;
import io.quarkiverse.cxf.annotation.CXFClient;
import org.eclipse.microprofile.config.inject.ConfigProperty;

@Path("/my-rest")
public class MyRestEasyResource {

    @Inject
    @CXFClient("hello")
    HelloService helloService;

    @ConfigProperty(name = "quarkus.cxf.path")
                     String quarkusCxfPath;

    @POST
    @Path("/hello")
    @Produces(MediaType.TEXT_PLAIN)
        public String hello(String body, @Context UriInfo uriInfo) throws IOException {

        // You may consider doing this only once if you are sure that your service is accessed
        // through a single hostname
        String decoupledEndpointBase = uriInfo.getBaseUriBuilder().path(quarkusCxfPath);
        Map>String, Object< requestContext = ((BindingProvider)
        helloService).getRequestContext();
        requestContext.put("org.apache.cxf.ws.addressing.decoupled.endpoint.base",
        decoupledEndpointBase);

        return wsrmHelloService.hello(body);
    }
}

Environment variable: QUARKUS_CXF_DECOUPLED_ENDPOINT_BASE
Since Quarkus CXF: 2.7.0

quarkus.cxf.logging.enabled-for

clients, services, both, none

none

Specifies whether the message logging will be enabled for clients, services, both or none. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.enabled or quarkus.cxf.client."clients".logging.enabled respectively.

Environment variable: QUARKUS_CXF_LOGGING_ENABLED_FOR
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.pretty

boolean

false

If true, the XML elements will be indented in the log; otherwise they will appear unindented. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.pretty or quarkus.cxf.client."clients".logging.pretty respectively.

Environment variable: QUARKUS_CXF_LOGGING_PRETTY
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.limit

int

49152

A message length in bytes at which it is truncated in the log. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.limit or quarkus.cxf.client."clients".logging.limit respectively.

Environment variable: QUARKUS_CXF_LOGGING_LIMIT
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.in-mem-threshold

long

-1

A message length in bytes at which it will be written to disk. -1 is unlimited. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.in-mem-threshold or quarkus.cxf.client."clients".logging.in-mem-threshold respectively.

Environment variable: QUARKUS_CXF_LOGGING_IN_MEM_THRESHOLD
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.log-binary

boolean

false

If true, binary payloads will be logged; otherwise they won’t be logged. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.log-binary or quarkus.cxf.client."clients".logging.log-binary respectively.

Environment variable: QUARKUS_CXF_LOGGING_LOG_BINARY
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.log-multipart

boolean

true

If true, multipart payloads will be logged; otherwise they won’t be logged. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.log-multipart or quarkus.cxf.client."clients".logging.log-multipart respectively.

Environment variable: QUARKUS_CXF_LOGGING_LOG_MULTIPART
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.verbose

boolean

true

If true, verbose logging will be enabled; otherwise it won’t be enabled. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.verbose or quarkus.cxf.client."clients".logging.verbose respectively.

Environment variable: QUARKUS_CXF_LOGGING_VERBOSE
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.in-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingInInterceptor whose content will not be logged unless log-binary is true. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.in-binary-content-media-types or quarkus.cxf.client."clients".logging.in-binary-content-media-types respectively.

Environment variable: QUARKUS_CXF_LOGGING_IN_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.out-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor whose content will not be logged unless log-binary is true. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.out-binary-content-media-types or quarkus.cxf.client."clients".logging.out-binary-content-media-types respectively.

Environment variable: QUARKUS_CXF_LOGGING_OUT_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor and LoggingInInterceptor whose content will not be logged unless log-binary is true. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.binary-content-media-types or quarkus.cxf.client."clients".logging.binary-content-media-types respectively.

Environment variable: QUARKUS_CXF_LOGGING_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.sensitive-element-names

List of string

 

A comma separated list of XML elements containing sensitive information to be masked in the log. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.sensitive-element-names or quarkus.cxf.client."clients".logging.sensitive-element-names respectively.

Environment variable: QUARKUS_CXF_LOGGING_SENSITIVE_ELEMENT_NAMES
Since Quarkus CXF: 2.6.0

quarkus.cxf.logging.sensitive-protocol-header-names

List of string

 

A comma separated list of protocol headers containing sensitive information to be masked in the log. This setting can be overridden per client or service endpoint using quarkus.cxf.endpoint."endpoints".logging.sensitive-protocol-header-names or quarkus.cxf.client."clients".logging.sensitive-protocol-header-names respectively.

Environment variable: QUARKUS_CXF_LOGGING_SENSITIVE_PROTOCOL_HEADER_NAMES
Since Quarkus CXF: 2.6.0

lock quarkus.cxf.client."clients".service-interface

string

 

The client service interface class name

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SERVICE_INTERFACE

lock quarkus.cxf.client."clients".alternative

boolean

false

Indicates whether this is an alternative proxy client configuration. If true, then this configuration is ignored when configuring a client without annotation @CXFClient.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ALTERNATIVE

lock quarkus.cxf.client."clients".native.runtime-initialized

boolean

false

If true, the client dynamic proxy class generated by native compiler will be initialized at runtime; otherwise the proxy class will be initialized at build time.

Setting this to true makes sense if your service endpoint interface references some class initialized at runtime in its method signatures. E.g. Say, your service interface has method int add(Operands o) and the Operands class was requested to be initialized at runtime. Then, without setting this configuration parameter to true, the native compiler will throw an exception saying something like Classes that should be initialized at run time got initialized during image building: org.acme.Operands …​ jdk.proxy<some-number>.$Proxy<some-number> caused initialization of this class. jdk.proxy<some-number>.$Proxy<some-number> is the proxy class generated by the native compiler.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__NATIVE_RUNTIME_INITIALIZED

quarkus.cxf.endpoint."endpoints".implementor

string

 

The service endpoint implementation class

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IMPLEMENTOR

quarkus.cxf.endpoint."endpoints".wsdl

string

 

The service endpoint WSDL path

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__WSDL

quarkus.cxf.endpoint."endpoints".soap-binding

string

 

The URL of the SOAP Binding, should be one of four values:

  • http://schemas.xmlsoap.org/wsdl/soap/http for SOAP11HTTP_BINDING
  • http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true for SOAP11HTTP_MTOM_BINDING
  • http://www.w3.org/2003/05/soap/bindings/HTTP/ for SOAP12HTTP_BINDING
  • http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true for SOAP12HTTP_MTOM_BINDING

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SOAP_BINDING

quarkus.cxf.endpoint."endpoints".published-endpoint-url

string

 

The published service endpoint URL

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__PUBLISHED_ENDPOINT_URL

quarkus.cxf.endpoint."endpoints".logging.enabled

true, false, pretty

 

If true or pretty, the message logging will be enabled; otherwise it will not be enabled. If the value is pretty (since 2.7.0), the pretty attribute will effectively be set to true. The default is given by quarkus.cxf.logging.enabled-for.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_ENABLED
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.pretty

boolean

 

If true, the XML elements will be indented in the log; otherwise they will appear unindented. The default is given by quarkus.cxf.logging.pretty

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_PRETTY
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.limit

int

 

A message length in bytes at which it is truncated in the log. The default is given by quarkus.cxf.logging.limit

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_LIMIT
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.in-mem-threshold

long

 

A message length in bytes at which it will be written to disk. -1 is unlimited. The default is given by quarkus.cxf.logging.in-mem-threshold

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_IN_MEM_THRESHOLD
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.log-binary

boolean

 

If true, binary payloads will be logged; otherwise they won’t be logged. The default is given by quarkus.cxf.logging.log-binary

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_LOG_BINARY
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.log-multipart

boolean

 

If true, multipart payloads will be logged; otherwise they won’t be logged. The default is given by quarkus.cxf.logging.log-multipart

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_LOG_MULTIPART
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.verbose

boolean

 

If true, verbose logging will be enabled; otherwise it won’t be enabled. The default is given by quarkus.cxf.logging.verbose

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_VERBOSE
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.in-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingInInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.in-binary-content-media-types

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_IN_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.out-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.out-binary-content-media-types

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_OUT_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor and LoggingInInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.binary-content-media-types

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.sensitive-element-names

List of string

 

A comma separated list of XML elements containing sensitive information to be masked in the log. The default is given by quarkus.cxf.logging.sensitive-element-names

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_SENSITIVE_ELEMENT_NAMES
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".logging.sensitive-protocol-header-names

List of string

 

A comma separated list of protocol headers containing sensitive information to be masked in the log. The default is given by quarkus.cxf.logging.sensitive-protocol-header-names

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__LOGGING_SENSITIVE_PROTOCOL_HEADER_NAMES
Since Quarkus CXF: 2.6.0

quarkus.cxf.endpoint."endpoints".features

List of string

 

A comma-separated list of fully qualified CXF Feature class names or named CDI beans.

Examples:

quarkus.cxf.endpoint."/hello".features = org.apache.cxf.ext.logging.LoggingFeature
quarkus.cxf.endpoint."/fruit".features = #myCustomLoggingFeature

In the second case, the #myCustomLoggingFeature bean can be produced as follows:

import org.apache.cxf.ext.logging.LoggingFeature;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;

class Producers {

    @Produces
    @ApplicationScoped
    LoggingFeature myCustomLoggingFeature() {
        LoggingFeature loggingFeature = new LoggingFeature();
        loggingFeature.setPrettyLogging(true);
        return loggingFeature;
    }
}

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__FEATURES

quarkus.cxf.endpoint."endpoints".handlers

List of string

 

The comma-separated list of Handler classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__HANDLERS

quarkus.cxf.endpoint."endpoints".in-interceptors

List of string

 

The comma-separated list of InInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IN_INTERCEPTORS

quarkus.cxf.endpoint."endpoints".out-interceptors

List of string

 

The comma-separated list of OutInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__OUT_INTERCEPTORS

quarkus.cxf.endpoint."endpoints".out-fault-interceptors

List of string

 

The comma-separated list of OutFaultInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__OUT_FAULT_INTERCEPTORS

quarkus.cxf.endpoint."endpoints".in-fault-interceptors

List of string

 

The comma-separated list of InFaultInterceptor classes

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__IN_FAULT_INTERCEPTORS

quarkus.cxf.endpoint."endpoints".schema-validation.enabled-for

in, request, out, response, both, none

 

Select for which messages XML Schema validation should be enabled. If not specified, no XML Schema validation will be enforced unless it is enabled by other means, such as @org.apache.cxf.annotations.SchemaValidation or @org.apache.cxf.annotations.EndpointProperty(key = "schema-validation-enabled", value = "true") annotations.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SCHEMA_VALIDATION_ENABLED_FOR
Since Quarkus CXF: 2.7.0

quarkus.cxf.client."clients".wsdl

string

 

A URL, resource path or local filesystem path pointing to a WSDL document to use when generating the service proxy of this client.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__WSDL

quarkus.cxf.client."clients".soap-binding

string

 

The URL of the SOAP Binding, should be one of four values:

  • http://schemas.xmlsoap.org/wsdl/soap/http for SOAP11HTTP_BINDING
  • http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true for SOAP11HTTP_MTOM_BINDING
  • http://www.w3.org/2003/05/soap/bindings/HTTP/ for SOAP12HTTP_BINDING
  • http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true for SOAP12HTTP_MTOM_BINDING

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SOAP_BINDING

quarkus.cxf.client."clients".client-endpoint-url

string

 

The client endpoint URL

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CLIENT_ENDPOINT_URL

quarkus.cxf.client."clients".endpoint-namespace

string

 

The client endpoint namespace

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ENDPOINT_NAMESPACE

quarkus.cxf.client."clients".endpoint-name

string

 

The client endpoint name

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ENDPOINT_NAME

quarkus.cxf.client."clients".username

string

 

The username for HTTP Basic authentication

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__USERNAME

quarkus.cxf.client."clients".password

string

 

The password for HTTP Basic authentication

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PASSWORD

quarkus.cxf.client."clients".secure-wsdl-access

boolean

false

If true, then the Authentication header will be sent preemptively when requesting the WSDL, as long as the username is set; otherwise the WSDL will be requested anonymously.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURE_WSDL_ACCESS
Since Quarkus CXF: 2.7.0

quarkus.cxf.client."clients".logging.enabled

true, false, pretty

 

If true or pretty, the message logging will be enabled; otherwise it will not be enabled. If the value is pretty (since 2.7.0), the pretty attribute will effectively be set to true. The default is given by quarkus.cxf.logging.enabled-for.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_ENABLED
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.pretty

boolean

 

If true, the XML elements will be indented in the log; otherwise they will appear unindented. The default is given by quarkus.cxf.logging.pretty

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_PRETTY
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.limit

int

 

A message length in bytes at which it is truncated in the log. The default is given by quarkus.cxf.logging.limit

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_LIMIT
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.in-mem-threshold

long

 

A message length in bytes at which it will be written to disk. -1 is unlimited. The default is given by quarkus.cxf.logging.in-mem-threshold

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_IN_MEM_THRESHOLD
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.log-binary

boolean

 

If true, binary payloads will be logged; otherwise they won’t be logged. The default is given by quarkus.cxf.logging.log-binary

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_LOG_BINARY
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.log-multipart

boolean

 

If true, multipart payloads will be logged; otherwise they won’t be logged. The default is given by quarkus.cxf.logging.log-multipart

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_LOG_MULTIPART
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.verbose

boolean

 

If true, verbose logging will be enabled; otherwise it won’t be enabled. The default is given by quarkus.cxf.logging.verbose

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_VERBOSE
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.in-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingInInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.in-binary-content-media-types

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_IN_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.out-binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.out-binary-content-media-types

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_OUT_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.binary-content-media-types

List of string

 

A comma separated list of additional binary media types to add to the default values in the LoggingOutInterceptor and LoggingInInterceptor whose content will not be logged unless log-binary is true. The default is given by quarkus.cxf.logging.binary-content-media-types

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_BINARY_CONTENT_MEDIA_TYPES
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.sensitive-element-names

List of string

 

A comma separated list of XML elements containing sensitive information to be masked in the log. The default is given by quarkus.cxf.logging.sensitive-element-names

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_SENSITIVE_ELEMENT_NAMES
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".logging.sensitive-protocol-header-names

List of string

 

A comma separated list of protocol headers containing sensitive information to be masked in the log. The default is given by quarkus.cxf.logging.sensitive-protocol-header-names

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__LOGGING_SENSITIVE_PROTOCOL_HEADER_NAMES
Since Quarkus CXF: 2.6.0

quarkus.cxf.client."clients".features

List of string

 

A comma-separated list of fully qualified CXF Feature class names.

Example:

quarkus.cxf.endpoint.myClient.features = org.apache.cxf.ext.logging.LoggingFeature

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__FEATURES

quarkus.cxf.client."clients".handlers

List of string

 

The comma-separated list of Handler classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__HANDLERS

quarkus.cxf.client."clients".in-interceptors

List of string

 

The comma-separated list of InInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__IN_INTERCEPTORS

quarkus.cxf.client."clients".out-interceptors

List of string

 

The comma-separated list of OutInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__OUT_INTERCEPTORS

quarkus.cxf.client."clients".out-fault-interceptors

List of string

 

The comma-separated list of OutFaultInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__OUT_FAULT_INTERCEPTORS

quarkus.cxf.client."clients".in-fault-interceptors

List of string

 

The comma-separated list of InFaultInterceptor classes

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__IN_FAULT_INTERCEPTORS

quarkus.cxf.client."clients".connection-timeout

long

30000

Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CONNECTION_TIMEOUT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".receive-timeout

long

60000

Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__RECEIVE_TIMEOUT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".connection-request-timeout

long

60000

Specifies the amount of time, in milliseconds, used when requesting a connection from the connection manager(if appliable). 0 is infinite.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CONNECTION_REQUEST_TIMEOUT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".auto-redirect

boolean

false

Specifies if the consumer will automatically follow a server issued redirection. (name is not part of standard)

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__AUTO_REDIRECT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".max-retransmits

int

-1

Specifies the maximum amount of retransmits that are allowed for redirects. Retransmits for authorization is included in the retransmit count. Each redirect may cause another retransmit for a UNAUTHORIZED response code, ie. 401. Any negative number indicates unlimited retransmits, although, loop protection is provided. The default is unlimited. (name is not part of standard)

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__MAX_RETRANSMITS
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".allow-chunking

boolean

true

If true, the client is free to use chunking streams if it wants, but it is not required to use chunking streams. If false, the client must use regular, non-chunked requests in all cases.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ALLOW_CHUNKING
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".chunking-threshold

int

4096

If AllowChunking is true, this sets the threshold at which messages start getting chunked. Messages under this limit do not get chunked.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CHUNKING_THRESHOLD
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".chunk-length

int

-1

Specifies the chunk length for a HttpURLConnection. This value is used in java.net.HttpURLConnection.setChunkedStreamingMode(int chunklen). chunklen indicates the number of bytes to write in each chunk. If chunklen is less than or equal to zero, a default value will be used.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CHUNK_LENGTH
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".accept

string

 

Specifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.)

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ACCEPT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".accept-language

string

 

Specifies the language the client desires (e.g., English, French, etc.)

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ACCEPT_LANGUAGE

quarkus.cxf.client."clients".accept-encoding

string

 

Specifies the encoding the client is prepared to handle (e.g., gzip)

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__ACCEPT_ENCODING
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".content-type

string

 

Specifies the content type of the stream being sent in a post request. (this should be text/xml for web services, or can be set to application/x-www-form-urlencoded if the client is sending form data).

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CONTENT_TYPE
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".host

string

 

Specifies the Internet host and port number of the resource on which the request is being invoked. This is sent by default based upon the URL. Certain DNS scenarios or application designs may request you to set this, but typically it is not required.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__HOST
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".connection

close, keep-alive

keep-alive

The connection disposition. If close the connection to the server is closed after each request/response dialog. If Keep-Alive the client requests the server to keep the connection open, and if the server honors the keep alive request, the connection is reused. Many servers and proxies do not honor keep-alive requests.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CONNECTION
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".cache-control

string

 

Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for requests

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__CACHE_CONTROL
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".version

string

auto

HTTP Version used for the connection. The default value auto will use whatever the default is for the HTTPConduit implementation defined via quarkus.cxf.client.myClient.http-conduit-factory. Other possible values: 1.1, 2.

Some of these values might be unsupported by some HTTPConduit implementations.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__VERSION
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".browser-type

string

 

The value of the User-Agent HTTP header.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__BROWSER_TYPE
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".decoupled-endpoint

string

 

An URI path (starting with /) or a full URI for the receipt of responses over a separate provider consumer connection. If the value starts with /, then it is prefixed with the base URI configured via quarkus.cxf.client.myClient.decoupled-endpoint-base before being used as a value for the WS-Addressing ReplyTo message header.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__DECOUPLED_ENDPOINT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".proxy-server

string

 

Specifies the address of proxy server if one is used.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PROXY_SERVER
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".proxy-server-port

int

 

Specifies the port number used by the proxy server.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PROXY_SERVER_PORT
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".non-proxy-hosts

string

 

Specifies the list of hostnames that will not use the proxy configuration. Examples:

  • localhost - a single hostname
  • localhost|www.google.com - two hostnames that will not use the proxy configuration
  • localhost|www.google.*|*.apache.org - hostname patterns

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__NON_PROXY_HOSTS
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".proxy-server-type

http, socks

http

Specifies the type of the proxy server. Can be either HTTP or SOCKS.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PROXY_SERVER_TYPE
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".proxy-username

string

 

Username for the proxy authentication

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PROXY_USERNAME
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".proxy-password

string

 

Password for the proxy authentication

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__PROXY_PASSWORD
Since Quarkus CXF: 2.2.3

quarkus.cxf.client."clients".http-conduit-factory

QuarkusCXFDefault, CXFDefault, HttpClientHTTPConduitFactory, URLConnectionHTTPConduitFactory

 

Select the HTTPConduitFactory implementation for this client.

  • QuarkusCXFDefault (default): if io.quarkiverse.cxf:quarkus-cxf-rt-transports-http-hc5 is present in class path, then its HTTPConduitFactory implementation will be used; otherwise this value is equivalent with URLConnectionHTTPConduitFactory (this may change, once issue #992 gets resolved in CXF)
  • CXFDefault: the selection of HTTPConduitFactory implementation is left to CXF
  • HttpClientHTTPConduitFactory: the HTTPConduitFactory for this client will be set to an implementation always returning org.apache.cxf.transport.http.HttpClientHTTPConduit. This will use java.net.http.HttpClient as the underlying HTTP client.
  • URLConnectionHTTPConduitFactory: the HTTPConduitFactory for this client will be set to an implementation always returning org.apache.cxf.transport.http.URLConnectionHTTPConduit. This will use java.net.HttpURLConnection as the underlying HTTP client.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__HTTP_CONDUIT_FACTORY

quarkus.cxf.client."clients".trust-store

string

 

The trust store location for this client. The resource is first looked up in the classpath, then in the file system.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__TRUST_STORE

quarkus.cxf.client."clients".trust-store-password

string

 

The trust store password

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__TRUST_STORE_PASSWORD

quarkus.cxf.client."clients".trust-store-type

string

JKS

The type of the trust store.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__TRUST_STORE_TYPE

quarkus.cxf.client."clients".hostname-verifier

string

 

Can be one of the following:

  • One of the well known values: AllowAllHostnameVerifier, HttpsURLConnectionDefaultHostnameVerifier
  • A fully qualified class name implementing javax.net.ssl.HostnameVerifier to look up in the CDI container.
  • A bean name prefixed with # that will be looked up in the CDI container; example: #myHostnameVerifier If not specified, then the creation of the HostnameVerifier is delegated to CXF, which boils down to org.apache.cxf.transport.https.httpclient.DefaultHostnameVerifier with the default org.apache.cxf.transport.https.httpclient.PublicSuffixMatcherLoader as returned from PublicSuffixMatcherLoader.getDefault().

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__HOSTNAME_VERIFIER

quarkus.cxf.client."clients".schema-validation.enabled-for

in, request, out, response, both, none

 

Select for which messages XML Schema validation should be enabled. If not specified, no XML Schema validation will be enforced unless it is enabled by other means, such as @org.apache.cxf.annotations.SchemaValidation or @org.apache.cxf.annotations.EndpointProperty(key = "schema-validation-enabled", value = "true") annotations.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SCHEMA_VALIDATION_ENABLED_FOR
Since Quarkus CXF: 2.7.0

5.2. Metrics Feature

Collect metrics using Micrometer.

Important

Unlike CXF Metrics feature, this Quarkus CXF extension does not support Dropwizard Metrics. Only Micrometer is supported.

5.2.1. Maven coordinates

Create a new project using quarkus-cxf-rt-features-metrics on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-rt-features-metrics</artifactId>
</dependency>

5.2.2. Usage

The integration of CXF into the Quarkus Micrometer ecosystem is implemented using io.quarkiverse.cxf.metrics.QuarkusCxfMetricsFeature. As long as your application depends on quarkus-cxf-rt-features-metrics, an instance of QuarkusCxfMetricsFeature is created internally and enabled by default for all clients and service endpoints created by Quarkus CXF. You can disable it via quarkus.cxf.metrics.enabled-for, quarkus.cxf.client."clients".metrics.enabled and quarkus.cxf.endpoint."endpoints".metrics.enabled properties documented below.

5.2.2.1. Runnable example

There is an integration test covering Micrometer Metrics in the Quarkus CXF source tree.

Unsurprisingly, it depends on quarkus-cxf-rt-features-metrics

pom.xml

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-rt-features-metrics</artifactId>
</dependency>

It is using quarkus-micrometer-registry-prometheus extension to export the metrics in JSON format and for Prometheus:

pom.xml

<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-micrometer-registry-prometheus</artifactId>
</dependency>

The following configuration is needed to be able to inspect the collected metrics over a REST endpoint:

application.properties

quarkus.micrometer.export.json.enabled = true
quarkus.micrometer.export.json.path = metrics/json
quarkus.micrometer.export.prometheus.path = metrics/prometheus

Having all the above in place, you can start the application in Dev mode:

$ mvn quarkus:dev

Now send a request to the HelloService:

$ curl \
  -d '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:helloResponse xmlns:ns2="http://it.server.metrics.cxf.quarkiverse.io/"><return>Hello Joe!</return></ns2:helloResponse></soap:Body></soap:Envelope>' \
  -H 'Content-Type: text/xml' \
  -X POST \
  http://localhost:8080/metrics/client/hello

After that, metrics are shown under cxf.server.requests in the output of the endpoint you configured above:

$ curl http://localhost:8080/q/metrics/json
metrics: {
    ...
    "cxf.server.requests": {
        "count;exception=None;faultCode=None;method=POST;operation=hello;outcome=SUCCESS;status=200;uri=/soap/hello": 2,
        "elapsedTime;exception=None;faultCode=None;method=POST;operation=hello;outcome=SUCCESS;status=200;uri=/soap/hello": 64.4
    },
    ...
}

5.2.3. Configuration

lock Configuration property fixed at build time. All other configuration properties are overridable at runtime.

Configuration propertyTypeDefault

quarkus.cxf.metrics.enabled-for

clients, services, both, none

both

Specifies whether the metrics collection will be enabled for clients, services, both or none. This global setting can be overridden per client or service endpoint using the quarkus.cxf.client."clients".metrics.enabled or quarkus.cxf.endpoint."endpoints".metrics.enabled option respectively.

Environment variable: QUARKUS_CXF_METRICS_ENABLED_FOR
Since Quarkus CXF: 2.7.0

quarkus.cxf.client."clients".metrics.enabled

boolean

true

If true and if quarkus.cxf.metrics.enabled-for is set to both or clients then the MetricsFeature will be added to this client; otherwise the feature will not be added to this client.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__METRICS_ENABLED
Since Quarkus CXF: 2.7.0

quarkus.cxf.endpoint."endpoints".metrics.enabled

boolean

true

If true and if quarkus.cxf.metrics.enabled-for is set to both or services then the MetricsFeature will be added to this service endpoint; otherwise the feature will not be added to this service endpoint.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__METRICS_ENABLED
Since Quarkus CXF: 2.7.0

5.3. OpenTelemetry

Generate OpenTelemetry traces.

Important

OpenTelemetry Metrics and Logging are not supported yet on neither Quarkus nor CXF side, hence Quarkus CXF cannot support them either. Therefore, tracing is the only OpenTelemetry feature supported by this extension.

5.3.1. Maven coordinates

Create a new project using quarkus-cxf-integration-tracing-opentelemetry on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-integration-tracing-opentelemetry</artifactId>
</dependency>

5.3.2. Usage

This extension builds on top of org.apache.cxf.tracing.opentelemetry.OpenTelemetryFeature (for service endpoints) and org.apache.cxf.tracing.opentelemetry.OpenTelemetryClientFeature (for clients). Instances of these are created and configured internally using the instance of io.opentelemetry.api.OpenTelemetry provided by Quarkus OpenTelemetry.

The tracing is enabled by default for all clients and service endpoints created by Quarkus CXF, unless you disable it explicitly via quarkus.cxf.otel.enabled-for, quarkus.cxf.client."clients".otel.enabled or quarkus.cxf.endpoint."endpoints".otel.enabled.

5.3.2.1. Runnable example

There is an integration test covering OpenTelemetry in the Quarkus CXF source tree. It is using InMemorySpanExporter from io.opentelemetry:opentelemetry-sdk-testing, so that the spans can be inspected from tests easily. Refer to Quarkus OpenTelemetry guide for information about other supported span exporters and collectors.

5.3.3. Configuration

lock Configuration property fixed at build time. All other configuration properties are overridable at runtime.

Configuration propertyTypeDefault

quarkus.cxf.otel.enabled-for

clients, services, both, none

both

Specifies whether the OpenTelemetry tracing will be enabled for clients, services, both or none. This global setting can be overridden per client or service endpoint using the quarkus.cxf.client."clients".otel.enabled or quarkus.cxf.endpoint."endpoints".otel.enabled option respectively.

Environment variable: QUARKUS_CXF_OTEL_ENABLED_FOR
Since Quarkus CXF: 2.7.0

quarkus.cxf.client."clients".otel.enabled

boolean

true

If true and if quarkus.cxf.otel.enabled-for is set to both or clients then the OpenTelemetryClientFeature will be added to this client; otherwise the feature will not be added to this client.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__OTEL_ENABLED
Since Quarkus CXF: 2.7.0

quarkus.cxf.endpoint."endpoints".otel.enabled

boolean

true

If true and if quarkus.cxf.otel.enabled-for is set to both or services then the OpenTelemetryFeature will be added to this service endpoint; otherwise the feature will not be added to this service endpoint.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__OTEL_ENABLED
Since Quarkus CXF: 2.7.0

5.4. WS-Security

Provides CXF framework’s WS-Security implementation allowing you to:

  • Pass authentication tokens between services
  • Encrypt messages or parts of messages
  • Sign messages
  • Timestamp messages

5.4.1. Maven coordinates

Create a new project using quarkus-cxf-rt-ws-security on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-rt-ws-security</artifactId>
</dependency>

5.4.2. Supported standards

5.4.3. Usage

The CXF framework’s WS-Security (WSS) implementation is based on WSS4J. It can be activated in two ways:

  • By using WS-SecurityPolicy
  • By adding WSS4J interceptors to your clients and service endpoints.

WS-SecurityPolicy is preferable because in that way, the security requirements become a part of the WSDL contract. That in turn greatly simplifies not only the implementation of clients and service endpoints but also the interoperability between vendors.

Nevertheless, if you leverage WS-SecurityPolicy, CXF sets up the WSS4J interceptors under the hood for you.

We won’t explain the manual approach with WSS4J interceptors in detail here, but you can still refer to our WS-Security integration test as an example.

5.4.3.1. WS-Security via WS-SecurityPolicy

Tip

The sample code snippets used in this section come from the WS-SecurityPolicy integration test in the source tree of Quarkus CXF

Let’s say our aim is to ensure that the communication between the client and service is confidential (through encryption) and that the message has not been tampered with (through digital signatures). We also want to assure that the clients are who they claim to be by authenticating themselves by X.509 certificates.

We can express all these requirements in a single WS-SecurityPolicy document:

encrypt-sign-policy.xml

<?xml version="1.0" encoding="UTF-8" ?>
<wsp:Policy wsu:Id="SecurityServiceEncryptThenSignPolicy"
    xmlns:wsp="http://www.w3.org/ns/ws-policy"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
    <wsp:ExactlyOne>
        <wsp:All>
            1
            <sp:AsymmetricBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
                <wsp:Policy>
                    2
                    <sp:InitiatorToken>
                        <wsp:Policy>
                            <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                                <wsp:Policy>
                                    <sp:WssX509V3Token11/>
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:InitiatorToken>
                    <sp:RecipientToken>
                        <wsp:Policy>
                            <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
                                <wsp:Policy>
                                    <sp:WssX509V3Token11/>
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:RecipientToken>
                    <sp:AlgorithmSuite>
                        <wsp:Policy>
                            <sp:Basic256/>
                        </wsp:Policy>
                    </sp:AlgorithmSuite>
                    <sp:Layout>
                        <wsp:Policy>
                            <sp:Strict/>
                        </wsp:Policy>
                    </sp:Layout>
                    <sp:IncludeTimestamp/>
                    <sp:ProtectTokens/>
                    <sp:OnlySignEntireHeadersAndBody/>
                    <sp:EncryptBeforeSigning/>
                </wsp:Policy>
            </sp:AsymmetricBinding>
            3
            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <sp:Body/>
            </sp:SignedParts>
            4
            <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <sp:Body/>
            </sp:EncryptedParts>
            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                <wsp:Policy>
                    <sp:MustSupportRefIssuerSerial/>
                </wsp:Policy>
            </sp:Wss10>
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>

1
AsymmetricBinding specifies the use of asymmetric (public/private key) cryptography for securing the communication between two parties
2
InitiatorToken indicates that the initiator (sender) of the message will use an X.509 certificate token that must always be provided to the recipient.
3
SignedParts specifies which parts of the SOAP message must be signed to ensure their integrity.
4
EncryptedParts specifies the parts of the SOAP message that must be encrypted to ensure their confidentiality.

We set this policy on the Service Endpoint Interface (SEI) EncryptSignPolicyHelloService using @org.apache.cxf.annotations.Policy annotation:

EncryptSignPolicyHelloService.java

@WebService(serviceName = "EncryptSignPolicyHelloService")
@Policy(placement = Policy.Placement.BINDING, uri = "encrypt-sign-policy.xml")
public interface EncryptSignPolicyHelloService extends AbstractHelloService {
...
}

On the first sight, setting the policy on the SEI should suffice to enforce it on both the service and all clients generated from the SEI or from the WSDL served by the service. However, that’s not all. Security keys, usernames, passwords and other kinds of confidental information cannot be exposed in a public policy.

Those have to be set in the configuration.

Note

The server and client references helloEncryptSign differently, since there are differences in what the reference represents:

The server reference is a path to the service endpoint, accessible via HTTP, which means it has to start with /.

The client reference is a label. It is used to group the client options and to specify the client for injection with @CXFClient("helloEncryptSign").

The label for the client can be completely different (for example, e.g. foo), or start with /. To associate with the service, the important thing is that you provide a correct client-endpoint-url value.

Let’s do it for the service first:

application.properties

# A service with encrypt-sign-policy.xml set
quarkus.cxf.endpoint."/helloEncryptSign".implementor = io.quarkiverse.cxf.it.security.policy.EncryptSignPolicyHelloServiceImpl
# can be jks or pkcs12 - set from Maven profiles in this test
keystore.type = ${keystore.type}
# Signature settings
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.username = bob
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.password = password
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.type" = ${keystore.type}
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = bob
quarkus.cxf.endpoint."/helloEncryptSign".security.signature.properties."org.apache.ws.security.crypto.merlin.file" = bob.${keystore.type}
# Encryption settings
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.username = alice
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.type" = ${keystore.type}
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = bob
quarkus.cxf.endpoint."/helloEncryptSign".security.encryption.properties."org.apache.ws.security.crypto.merlin.file" = bob.${keystore.type}

Similar setup is necessary on the client side:

application.properties

# A client with encrypt-sign-policy.xml set
quarkus.cxf.client.helloEncryptSign.client-endpoint-url = https://localhost:${quarkus.http.test-ssl-port}/services/helloEncryptSign
quarkus.cxf.client.helloEncryptSign.service-interface = io.quarkiverse.cxf.it.security.policy.EncryptSignPolicyHelloService
quarkus.cxf.client.helloEncryptSign.features = #messageCollector
# The client-endpoint-url above is HTTPS, so we have to setup the server's SSL certificates
quarkus.cxf.client.helloEncryptSign.trust-store = client-truststore.${keystore.type}
quarkus.cxf.client.helloEncryptSign.trust-store-password = password
# Signature settings
quarkus.cxf.client.helloEncryptSign.security.signature.username = alice
quarkus.cxf.client.helloEncryptSign.security.signature.password = password
quarkus.cxf.client.helloEncryptSign.security.signature.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.client.helloEncryptSign.security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.client.helloEncryptSign.security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.client.helloEncryptSign.security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = alice
quarkus.cxf.client.helloEncryptSign.security.signature.properties."org.apache.ws.security.crypto.merlin.file" = alice.${keystore.type}
# Encryption settings
quarkus.cxf.client.helloEncryptSign.security.encryption.username = bob
quarkus.cxf.client.helloEncryptSign.security.encryption.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.client.helloEncryptSign.security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.client.helloEncryptSign.security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.client.helloEncryptSign.security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = alice
quarkus.cxf.client.helloEncryptSign.security.encryption.properties."org.apache.ws.security.crypto.merlin.file" = alice.${keystore.type}

To inspect the flow of the messages, you can execute the EncryptSignPolicyTest as follows:

# Clone the repository
$ git clone https://github.com/quarkiverse/quarkus-cxf.git -o upstream
$ cd quarkus-cxf
# Build the whole source tree
$ mvn clean install -DskipTests -Dquarkus.build.skip
# Run the test
$ cd integration-tests/ws-security-policy
$ mvn clean test -Dtest=EncryptSignPolicyTest

Some messages containing Signature elements and encrypted bodies are shown in the console output.

5.4.4. Configuration

lock Configuration property fixed at build time. All other configuration properties are overridable at runtime.

Configuration propertyTypeDefault

quarkus.cxf.client."clients".security.username

string

 

The user’s name. It is used as follows:

  • As the name in the UsernameToken for WS-Security
  • As the alias name in the keystore to get the user’s cert and private key for signature if signature.username is not set
  • As the alias name in the keystore to get the user’s public key for encryption if encryption.username is not set

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.password

string

 

The user’s password when a callback-handler is not defined. This is only used for the password in a WS-Security UsernameToken.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_PASSWORD
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.signature.username

string

 

The user’s name for signature. It is used as the alias name in the keystore to get the user’s cert and private key for signature. If this is not defined, then username is used instead. If that is also not specified, it uses the the default alias set in the properties file referenced by signature.properties. If that’s also not set, and the keystore only contains a single key, that key will be used.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SIGNATURE_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.signature.password

string

 

The user’s password for signature when a callback-handler is not defined.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SIGNATURE_PASSWORD
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.encryption.username

string

 

The user’s name for encryption. It is used as the alias name in the keystore to get the user’s public key for encryption. If this is not defined, then username is used instead. If that is also not specified, it uses the default alias set in the properties file referenced by encrypt.properties. If that’s also not set, and the keystore only contains a single key, that key will be used.

For the WS-Security web service provider, the useReqSigCert value can be used to accept (encrypt to) any client whose public key is in the service’s truststore (defined in encrypt.properties).

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENCRYPTION_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.callback-handler

string

 

A reference to a javax.security.auth.callback.CallbackHandler bean used to obtain passwords, for both outbound and inbound requests.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_CALLBACK_HANDLER
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.saml-callback-handler

string

 

A reference to a javax.security.auth.callback.CallbackHandler implementation used to construct SAML Assertions.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SAML_CALLBACK_HANDLER
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.signature.properties

Map<String,String>

 

The Crypto property configuration to use for signing, if signature.crypto is not set.

Example

[prefix].signature.properties."org.apache.ws.security.crypto.provider" =
org.apache.ws.security.components.crypto.Merlin
[prefix].signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].signature.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SIGNATURE_PROPERTIES
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.encryption.properties

Map<String,String>

 

The Crypto property configuration to use for encryption, if encryption.crypto is not set.

Example

[prefix].encryption.properties."org.apache.ws.security.crypto.provider" =
org.apache.ws.security.components.crypto.Merlin
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENCRYPTION_PROPERTIES
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.signature.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto bean to be used for signature. If not set, signature.properties will be used to configure a Crypto instance.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SIGNATURE_CRYPTO
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.encryption.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto to be used for encryption. If not set, encryption.properties will be used to configure a Crypto instance.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENCRYPTION_CRYPTO
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.encryption.certificate

string

 

A message property for prepared X509 certificate to be used for encryption. If this is not defined, then the certificate will be either loaded from the keystore encryption.properties or extracted from request (when WS-Security is used and if encryption.username has value useReqSigCert.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENCRYPTION_CERTIFICATE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable-revocation

boolean

false

If true, Certificate Revocation List (CRL) checking is enabled when verifying trust in a certificate; otherwise it is not enabled.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_REVOCATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable-unsigned-saml-assertion-principal

boolean

false

If true, unsigned SAML assertions will be allowed as SecurityContext Principals; otherwise they won’t be allowed as SecurityContext Principals.

Signature

The label "unsigned" refers to an internal signature. Even if the token is signed by an external signature (as per the "sender-vouches" requirement), this boolean must still be configured if you want to use the token to set up the security context.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.validate-saml-subject-confirmation

boolean

true

If true, the SubjectConfirmation requirements of a received SAML Token (sender-vouches or holder-of-key) will be validated; otherwise they won’t be validated.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_VALIDATE_SAML_SUBJECT_CONFIRMATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.sc-from-jaas-subject

boolean

true

If true, security context can be created from JAAS Subject; otherwise it must not be created from JAAS Subject.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SC_FROM_JAAS_SUBJECT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.audience-restriction-validation

boolean

true

If true, then if the SAML Token contains Audience Restriction URIs, one of them must match one of the values in audience.restrictions; otherwise the SAML AudienceRestriction validation is disabled.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_AUDIENCE_RESTRICTION_VALIDATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.saml-role-attributename

string

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role

The attribute URI of the SAML AttributeStatement where the role information is stored.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SAML_ROLE_ATTRIBUTENAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.subject-cert-constraints

string

 

A String of regular expressions (separated by the value specified in security.cert.constraints.separator) which will be applied to the subject DN of the certificate used for signature validation, after trust verification of the certificate chain associated with the certificate.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SUBJECT_CERT_CONSTRAINTS
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.cert-constraints-separator

string

,

The separator that is used to parse certificate constraints configured in security.subject.cert.constraints

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_CERT_CONSTRAINTS_SEPARATOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.actor

string

 

The actor or role name of the wsse:Security header. If this parameter is omitted, the actor name is not set.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ACTOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.validate.token

boolean

true

If true, the password of a received UsernameToken will be validated; otherwise it won’t be validated.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_VALIDATE_TOKEN
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.username-token.always.encrypted

boolean

true

Whether to always encrypt UsernameTokens that are defined as a SupportingToken. This should not be set to false in a production environment, as it exposes the password (or the digest of the password) on the wire.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_USERNAME_TOKEN_ALWAYS_ENCRYPTED
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.is-bsp-compliant

boolean

true

If true, the compliance with the Basic Security Profile (BSP) 1.1 will be ensured; otherwise it will not be ensured.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_IS_BSP_COMPLIANT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable.nonce.cache

boolean

 

If true, the UsernameToken nonces will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching

Caching only applies when either a UsernameToken WS-SecurityPolicy is in effect, or the UsernameToken action has been configured for the non-security-policy case.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_NONCE_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable.timestamp.cache

boolean

 

If true, the Timestamp Created Strings (these are only cached in conjunction with a message Signature) will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching

Caching only applies when either a IncludeTimestamp policy is in effect, or the Timestamp action has been configured for the non-security-policy case.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_TIMESTAMP_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable.streaming

boolean

false

If true, the new streaming (StAX) implementation of WS-Security is used; otherwise the old DOM implementation is used.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_STREAMING
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.return.security.error

boolean

false

If true, detailed security error messages are sent to clients; otherwise the details are omitted and only a generic error message is sent.

The "real" security errors should not be returned to the client in production, as they may leak information about the deployment, or otherwise provide an "oracle" for attacks.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_RETURN_SECURITY_ERROR
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.must-understand

boolean

true

If true, the SOAP mustUnderstand header is included in security headers based on a WS-SecurityPolicy; otherwise the header is always omitted.

Works only with enable.streaming = true - see CXF-8940

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_MUST_UNDERSTAND
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.enable.saml.cache

boolean

 

If true and in case the token contains a OneTimeUse Condition, the SAML2 Token Identifiers will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching only applies when either a SamlToken policy is in effect, or a SAML action has been configured for the non-security-policy case.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ENABLE_SAML_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.store.bytes.in.attachment

boolean

 

Whether to store bytes (CipherData or BinarySecurityToken) in an attachment. The default is true if MTOM is enabled. Set it to false to BASE-64 encode the bytes and "inlined" them in the message instead. Setting this to true is more efficient, as it means that the BASE-64 encoding step can be skipped. This only applies to the DOM WS-Security stack.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STORE_BYTES_IN_ATTACHMENT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.swa.encryption.attachment.transform.content

boolean

false

If true, Attachment-Content-Only transform will be used when an Attachment is encrypted via a WS-SecurityPolicy expression; otherwise Attachment-Complete transform will be used when an Attachment is encrypted via a WS-SecurityPolicy expression.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SWA_ENCRYPTION_ATTACHMENT_TRANSFORM_CONTENT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.use.str.transform

boolean

true

If true, the STR (Security Token Reference) Transform will be used when (externally) signing a SAML Token; otherwise the STR (Security Token Reference) Transform will not be used.

Some frameworks cannot process the SecurityTokenReference. You may set this false in such cases.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_USE_STR_TRANSFORM
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.add.inclusive.prefixes

boolean

true

If true, an InclusiveNamespaces PrefixList will be added as a CanonicalizationMethod child when generating Signatures using WSConstants.C14N_EXCL_OMIT_COMMENTS; otherwise the PrefixList will not be added.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ADD_INCLUSIVE_PREFIXES
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.disable.require.client.cert.check

boolean

false

If true, the enforcement of the WS-SecurityPolicy RequireClientCertificate policy will be disabled; otherwise the enforcement of the WS-SecurityPolicy RequireClientCertificate policy is enabled.

Some servers may not do client certificate verification at the start of the SSL handshake, and therefore the client certificates may not be available to the WS-Security layer for policy verification.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_DISABLE_REQUIRE_CLIENT_CERT_CHECK
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.expand.xop.include

boolean

 

If true, the xop:Include elements will be searched for encryption and signature (on the outbound side) or for signature verification (on the inbound side); otherwise the search won’t happen. This ensures that the actual bytes are signed, and not just the reference. The default is true if MTOM is enabled, otherwise the default is false.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_EXPAND_XOP_INCLUDE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.timestamp.timeToLive

string

300

The time in seconds to add to the Creation value of an incoming Timestamp to determine whether to accept it as valid or not.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_TIMESTAMP_TIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.timestamp.futureTimeToLive

string

60

The time in seconds in the future within which the Created time of an incoming Timestamp is valid. The default is greater than zero to avoid problems where clocks are slightly askew. Set this to 0 to reject all future-created `Timestamp`s.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_TIMESTAMP_FUTURETIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.usernametoken.timeToLive

string

300

The time in seconds to append to the Creation value of an incoming UsernameToken to determine whether to accept it as valid or not.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_USERNAMETOKEN_TIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.usernametoken.futureTimeToLive

string

60

The time in seconds in the future within which the Created time of an incoming UsernameToken is valid. The default is greater than zero to avoid problems where clocks are slightly askew. Set this to 0 to reject all future-created `UsernameToken`s.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_USERNAMETOKEN_FUTURETIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.spnego.client.action

string

 

A reference to a org.apache.wss4j.common.spnego.SpnegoClientAction bean to use for SPNEGO. This allows the user to plug in a different implementation to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SPNEGO_CLIENT_ACTION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.nonce.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache UsernameToken nonces. A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_NONCE_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.timestamp.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache Timestamp Created Strings. A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_TIMESTAMP_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.saml.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache SAML2 Token Identifier Strings (if the token contains a OneTimeUse condition). A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SAML_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.cache.config.file

string

 

Set this property to point to a configuration file for the underlying caching implementation for the TokenStore. The default configuration file that is used is cxf-ehcache.xml in org.apache.cxf:cxf-rt-security JAR.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_CACHE_CONFIG_FILE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.token-store-cache-instance

string

 

A reference to a org.apache.cxf.ws.security.tokenstore.TokenStore bean to use for caching security tokens. By default this uses a instance.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_TOKEN_STORE_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.cache.identifier

string

 

The Cache Identifier to use with the TokenStore. CXF uses the following key to retrieve a token store: org.apache.cxf.ws.security.tokenstore.TokenStore-<identifier>. This key can be used to configure service-specific cache configuration. If the identifier does not match, then it falls back to a cache configuration with key org.apache.cxf.ws.security.tokenstore.TokenStore.

The default <identifier> is the QName of the service in question. However to pick up a custom cache configuration (for example, if you want to specify a TokenStore per-client proxy), it can be configured with this identifier instead.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_CACHE_IDENTIFIER
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.role.classifier

string

 

The Subject Role Classifier to use. If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. If this value is not specified, then it tries to get roles using the DefaultSecurityContext in org.apache.cxf:cxf-core. Otherwise it uses this value in combination with the role.classifier.type to get the roles from the Subject.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ROLE_CLASSIFIER
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.role.classifier.type

string

prefix

The Subject Role Classifier Type to use. If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. Currently accepted values are prefix or classname. Must be used in conjunction with the role.classifier.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ROLE_CLASSIFIER_TYPE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.asymmetric.signature.algorithm

string

 

This configuration tag allows the user to override the default Asymmetric Signature algorithm (RSA-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_ASYMMETRIC_SIGNATURE_ALGORITHM
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.symmetric.signature.algorithm

string

 

This configuration tag allows the user to override the default Symmetric Signature algorithm (HMAC-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SYMMETRIC_SIGNATURE_ALGORITHM
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.password.encryptor.instance

string

 

A reference to a org.apache.wss4j.common.crypto.PasswordEncryptor bean, which is used to encrypt or decrypt passwords in the Merlin Crypto implementation (or any custom Crypto implementations).

By default, WSS4J uses the org.apache.wss4j.common.crypto.JasyptPasswordEncryptor which must be instantiated with a password to use to decrypt keystore passwords in the Merlin Crypto definition. This password is obtained via the CallbackHandler defined via callback-handler

The encrypted passwords must be stored in the format "ENC(encoded encrypted password)".

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_PASSWORD_ENCRYPTOR_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.delegated.credential

string

 

A reference to a Kerberos org.ietf.jgss.GSSCredential bean to use for WS-Security. This is used to retrieve a service ticket instead of using the client credentials.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_DELEGATED_CREDENTIAL
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.security.context.creator

string

 

A reference to a org.apache.cxf.ws.security.wss4j.WSS4JSecurityContextCreator bean that is used to create a CXF SecurityContext from the set of WSS4J processing results. The default implementation is org.apache.cxf.ws.security.wss4j.DefaultWSS4JSecurityContextCreator.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SECURITY_CONTEXT_CREATOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.security.token.lifetime

long

300000

The security token lifetime value (in milliseconds).

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_SECURITY_TOKEN_LIFETIME
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.request.credential.delegation

boolean

false

If true, credential delegation is requested in the KerberosClient; otherwise the credential delegation is not in the KerberosClient.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_REQUEST_CREDENTIAL_DELEGATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.use.credential.delegation

boolean

false

If true, GSSCredential bean is retrieved from the Message Context using the delegated.credential property and then it is used to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_USE_CREDENTIAL_DELEGATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.is.username.in.servicename.form

boolean

false

If true, the Kerberos username is in servicename form; otherwise the Kerberos username is not in servicename form.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_IS_USERNAME_IN_SERVICENAME_FORM
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.jaas.context

string

 

The JAAS Context name to use for Kerberos.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_JAAS_CONTEXT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.spn

string

 

The Kerberos Service Provider Name (spn) to use.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_SPN
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.kerberos.client

string

 

A reference to a org.apache.cxf.ws.security.kerberos.KerberosClient bean used to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_KERBEROS_CLIENT
Since Quarkus CXF: 2.5.0

quarkus.cxf.client."clients".security.sts.client

string

 

A reference to a fully configured org.apache.cxf.ws.security.trust.STSClient bean to communicate with the STS. If not set, the STS client will be created and configured based on other [prefix].security.sts.client.* properties as long as they are available.

To work around the fact that org.apache.cxf.ws.security.trust.STSClient does not have a no-args constructor and cannot thus be used as a CDI bean type, you can use the wrapper class io.quarkiverse.cxf.ws.security.sts.client.STSClientBean instead.

Tip

Check the Security Token Service (STS) extension page for more information about WS-Trust.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.wsdl

string

 

A URL, resource path or local filesystem path pointing to a WSDL document to use when generating the service proxy of the STS client.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_WSDL
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.service-name

string

 

A fully qualified name of the STS service. Common values include:

  • WS-Trust 1.0: {http://schemas.xmlsoap.org/ws/2005/02/trust/}SecurityTokenService
  • WS-Trust 1.3: {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService
  • WS-Trust 1.4: {http://docs.oasis-open.org/ws-sx/ws-trust/200802/}SecurityTokenService

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_SERVICE_NAME
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.endpoint-name

string

 

A fully qualified name of the STS endpoint name. Common values include:

  • {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port
  • {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port
  • {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_ENDPOINT_NAME
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.username

string

 

The user name to use when authenticating against the STS. It is used as follows:

  • As the name in the UsernameToken for WS-Security
  • As the alias name in the keystore to get the user’s cert and private key for signature if signature.username is not set
  • As the alias name in the keystore to get the user’s public key for encryption if encryption.username is not set

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_USERNAME
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.password

string

 

The password associated with the username.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_PASSWORD
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.encryption.username

string

 

The user’s name for encryption. It is used as the alias name in the keystore to get the user’s public key for encryption. If this is not defined, then username is used instead. If that is also not specified, it uses the default alias set in the properties file referenced by encrypt.properties. If that’s also not set, and the keystore only contains a single key, that key will be used.

For the WS-Security web service provider, the useReqSigCert value can be used to accept (encrypt to) any client whose public key is in the service’s truststore (defined in encrypt.properties).

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_ENCRYPTION_USERNAME
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.encryption.properties

Map<String,String>

 

The Crypto property configuration to use for encryption, if encryption.crypto is not set.

Example

[prefix].encryption.properties."org.apache.ws.security.crypto.provider" =
org.apache.ws.security.components.crypto.Merlin
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_ENCRYPTION_PROPERTIES
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.encryption.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto to be used for encryption. If not set, encryption.properties will be used to configure a Crypto instance.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_ENCRYPTION_CRYPTO
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.token.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto to be used for the STS. If not set, token.properties will be used to configure a Crypto instance.

WCF’s trust server sometimes will encrypt the token in the response IN ADDITION TO the full security on the message. These properties control the way the STS client will decrypt the EncryptedData elements in the response.

These are also used by the token.properties to send/process any RSA/DSAKeyValue tokens used if the KeyType is PublicKey

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_TOKEN_CRYPTO
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.token.properties

Map<String,String>

 

The Crypto property configuration to use for encryption, if encryption.crypto is not set.

Example

[prefix].token.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
[prefix].token.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].token.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_TOKEN_PROPERTIES
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.token.username

string

 

The alias name in the keystore to get the user’s public key to send to the STS for the PublicKey KeyType case.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_TOKEN_USERNAME
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.token.usecert

boolean

false

Whether to write out an X509Certificate structure in UseKey/KeyInfo, or whether to write out a KeyValue structure.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_TOKEN_USECERT
Since Quarkus CXF: 3.8.0

quarkus.cxf.client."clients".security.sts.client.soap12-binding

boolean

false

If true the STS client will be set to send Soap 1.2 messages; otherwise it will send SOAP 1.1 messages.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__SECURITY_STS_CLIENT_SOAP12_BINDING
Since Quarkus CXF: 3.8.0

quarkus.cxf.endpoint."endpoints".security.username

string

 

The user’s name. It is used as follows:

  • As the name in the UsernameToken for WS-Security
  • As the alias name in the keystore to get the user’s cert and private key for signature if signature.username is not set
  • As the alias name in the keystore to get the user’s public key for encryption if encryption.username is not set

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.password

string

 

The user’s password when a callback-handler is not defined. This is only used for the password in a WS-Security UsernameToken.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_PASSWORD
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.signature.username

string

 

The user’s name for signature. It is used as the alias name in the keystore to get the user’s cert and private key for signature. If this is not defined, then username is used instead. If that is also not specified, it uses the the default alias set in the properties file referenced by signature.properties. If that’s also not set, and the keystore only contains a single key, that key will be used.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SIGNATURE_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.signature.password

string

 

The user’s password for signature when a callback-handler is not defined.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SIGNATURE_PASSWORD
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.encryption.username

string

 

The user’s name for encryption. It is used as the alias name in the keystore to get the user’s public key for encryption. If this is not defined, then username is used instead. If that is also not specified, it uses the default alias set in the properties file referenced by encrypt.properties. If that’s also not set, and the keystore only contains a single key, that key will be used.

For the WS-Security web service provider, the useReqSigCert value can be used to accept (encrypt to) any client whose public key is in the service’s truststore (defined in encrypt.properties).

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENCRYPTION_USERNAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.callback-handler

string

 

A reference to a javax.security.auth.callback.CallbackHandler bean used to obtain passwords, for both outbound and inbound requests.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_CALLBACK_HANDLER
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.saml-callback-handler

string

 

A reference to a javax.security.auth.callback.CallbackHandler implementation used to construct SAML Assertions.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SAML_CALLBACK_HANDLER
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.signature.properties

Map<String,String>

 

The Crypto property configuration to use for signing, if signature.crypto is not set.

Example

[prefix].signature.properties."org.apache.ws.security.crypto.provider" =
org.apache.ws.security.components.crypto.Merlin
[prefix].signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].signature.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SIGNATURE_PROPERTIES
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.encryption.properties

Map<String,String>

 

The Crypto property configuration to use for encryption, if encryption.crypto is not set.

Example

[prefix].encryption.properties."org.apache.ws.security.crypto.provider" =
org.apache.ws.security.components.crypto.Merlin
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
[prefix].encryption.properties."org.apache.ws.security.crypto.merlin.file" = certs/alice.jks

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENCRYPTION_PROPERTIES
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.signature.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto bean to be used for signature. If not set, signature.properties will be used to configure a Crypto instance.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SIGNATURE_CRYPTO
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.encryption.crypto

string

 

A reference to a org.apache.wss4j.common.crypto.Crypto to be used for encryption. If not set, encryption.properties will be used to configure a Crypto instance.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENCRYPTION_CRYPTO
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.encryption.certificate

string

 

A message property for prepared X509 certificate to be used for encryption. If this is not defined, then the certificate will be either loaded from the keystore encryption.properties or extracted from request (when WS-Security is used and if encryption.username has value useReqSigCert.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENCRYPTION_CERTIFICATE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable-revocation

boolean

false

If true, Certificate Revocation List (CRL) checking is enabled when verifying trust in a certificate; otherwise it is not enabled.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_REVOCATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable-unsigned-saml-assertion-principal

boolean

false

If true, unsigned SAML assertions will be allowed as SecurityContext Principals; otherwise they won’t be allowed as SecurityContext Principals.

Signature

The label "unsigned" refers to an internal signature. Even if the token is signed by an external signature (as per the "sender-vouches" requirement), this boolean must still be configured if you want to use the token to set up the security context.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_UNSIGNED_SAML_ASSERTION_PRINCIPAL
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.validate-saml-subject-confirmation

boolean

true

If true, the SubjectConfirmation requirements of a received SAML Token (sender-vouches or holder-of-key) will be validated; otherwise they won’t be validated.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_VALIDATE_SAML_SUBJECT_CONFIRMATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.sc-from-jaas-subject

boolean

true

If true, security context can be created from JAAS Subject; otherwise it must not be created from JAAS Subject.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SC_FROM_JAAS_SUBJECT
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.audience-restriction-validation

boolean

true

If true, then if the SAML Token contains Audience Restriction URIs, one of them must match one of the values in audience.restrictions; otherwise the SAML AudienceRestriction validation is disabled.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_AUDIENCE_RESTRICTION_VALIDATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.saml-role-attributename

string

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role

The attribute URI of the SAML AttributeStatement where the role information is stored.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SAML_ROLE_ATTRIBUTENAME
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.subject-cert-constraints

string

 

A String of regular expressions (separated by the value specified in security.cert.constraints.separator) which will be applied to the subject DN of the certificate used for signature validation, after trust verification of the certificate chain associated with the certificate.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SUBJECT_CERT_CONSTRAINTS
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.cert-constraints-separator

string

,

The separator that is used to parse certificate constraints configured in security.subject.cert.constraints

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_CERT_CONSTRAINTS_SEPARATOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.actor

string

 

The actor or role name of the wsse:Security header. If this parameter is omitted, the actor name is not set.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ACTOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.validate.token

boolean

true

If true, the password of a received UsernameToken will be validated; otherwise it won’t be validated.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_VALIDATE_TOKEN
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.username-token.always.encrypted

boolean

true

Whether to always encrypt UsernameTokens that are defined as a SupportingToken. This should not be set to false in a production environment, as it exposes the password (or the digest of the password) on the wire.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_USERNAME_TOKEN_ALWAYS_ENCRYPTED
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.is-bsp-compliant

boolean

true

If true, the compliance with the Basic Security Profile (BSP) 1.1 will be ensured; otherwise it will not be ensured.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_IS_BSP_COMPLIANT
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable.nonce.cache

boolean

 

If true, the UsernameToken nonces will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching

Caching only applies when either a UsernameToken WS-SecurityPolicy is in effect, or the UsernameToken action has been configured for the non-security-policy case.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_NONCE_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable.timestamp.cache

boolean

 

If true, the Timestamp Created Strings (these are only cached in conjunction with a message Signature) will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching

Caching only applies when either a IncludeTimestamp policy is in effect, or the Timestamp action has been configured for the non-security-policy case.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_TIMESTAMP_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable.streaming

boolean

false

If true, the new streaming (StAX) implementation of WS-Security is used; otherwise the old DOM implementation is used.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_STREAMING
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.return.security.error

boolean

false

If true, detailed security error messages are sent to clients; otherwise the details are omitted and only a generic error message is sent.

The "real" security errors should not be returned to the client in production, as they may leak information about the deployment, or otherwise provide an "oracle" for attacks.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_RETURN_SECURITY_ERROR
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.must-understand

boolean

true

If true, the SOAP mustUnderstand header is included in security headers based on a WS-SecurityPolicy; otherwise the header is always omitted.

Works only with enable.streaming = true - see CXF-8940

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_MUST_UNDERSTAND
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.enable.saml.cache

boolean

 

If true and in case the token contains a OneTimeUse Condition, the SAML2 Token Identifiers will be cached for both message initiators and recipients; otherwise they won’t be cached for neither message initiators nor recipients. The default is true for message recipients, and false for message initiators.

Caching only applies when either a SamlToken policy is in effect, or a SAML action has been configured for the non-security-policy case.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ENABLE_SAML_CACHE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.store.bytes.in.attachment

boolean

 

Whether to store bytes (CipherData or BinarySecurityToken) in an attachment. The default is true if MTOM is enabled. Set it to false to BASE-64 encode the bytes and "inlined" them in the message instead. Setting this to true is more efficient, as it means that the BASE-64 encoding step can be skipped. This only applies to the DOM WS-Security stack.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_STORE_BYTES_IN_ATTACHMENT
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.swa.encryption.attachment.transform.content

boolean

false

If true, Attachment-Content-Only transform will be used when an Attachment is encrypted via a WS-SecurityPolicy expression; otherwise Attachment-Complete transform will be used when an Attachment is encrypted via a WS-SecurityPolicy expression.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SWA_ENCRYPTION_ATTACHMENT_TRANSFORM_CONTENT
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.use.str.transform

boolean

true

If true, the STR (Security Token Reference) Transform will be used when (externally) signing a SAML Token; otherwise the STR (Security Token Reference) Transform will not be used.

Some frameworks cannot process the SecurityTokenReference. You may set this false in such cases.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_USE_STR_TRANSFORM
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.add.inclusive.prefixes

boolean

true

If true, an InclusiveNamespaces PrefixList will be added as a CanonicalizationMethod child when generating Signatures using WSConstants.C14N_EXCL_OMIT_COMMENTS; otherwise the PrefixList will not be added.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ADD_INCLUSIVE_PREFIXES
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.disable.require.client.cert.check

boolean

false

If true, the enforcement of the WS-SecurityPolicy RequireClientCertificate policy will be disabled; otherwise the enforcement of the WS-SecurityPolicy RequireClientCertificate policy is enabled.

Some servers may not do client certificate verification at the start of the SSL handshake, and therefore the client certificates may not be available to the WS-Security layer for policy verification.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_DISABLE_REQUIRE_CLIENT_CERT_CHECK
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.expand.xop.include

boolean

 

If true, the xop:Include elements will be searched for encryption and signature (on the outbound side) or for signature verification (on the inbound side); otherwise the search won’t happen. This ensures that the actual bytes are signed, and not just the reference. The default is true if MTOM is enabled, otherwise the default is false.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_EXPAND_XOP_INCLUDE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.timestamp.timeToLive

string

300

The time in seconds to add to the Creation value of an incoming Timestamp to determine whether to accept it as valid or not.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_TIMESTAMP_TIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.timestamp.futureTimeToLive

string

60

The time in seconds in the future within which the Created time of an incoming Timestamp is valid. The default is greater than zero to avoid problems where clocks are slightly askew. Set this to 0 to reject all future-created `Timestamp`s.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_TIMESTAMP_FUTURETIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.usernametoken.timeToLive

string

300

The time in seconds to append to the Creation value of an incoming UsernameToken to determine whether to accept it as valid or not.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_USERNAMETOKEN_TIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.usernametoken.futureTimeToLive

string

60

The time in seconds in the future within which the Created time of an incoming UsernameToken is valid. The default is greater than zero to avoid problems where clocks are slightly askew. Set this to 0 to reject all future-created `UsernameToken`s.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_USERNAMETOKEN_FUTURETIMETOLIVE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.spnego.client.action

string

 

A reference to a org.apache.wss4j.common.spnego.SpnegoClientAction bean to use for SPNEGO. This allows the user to plug in a different implementation to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SPNEGO_CLIENT_ACTION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.nonce.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache UsernameToken nonces. A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_NONCE_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.timestamp.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache Timestamp Created Strings. A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_TIMESTAMP_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.saml.cache.instance

string

 

A reference to a org.apache.wss4j.common.cache.ReplayCache bean used to cache SAML2 Token Identifier Strings (if the token contains a OneTimeUse condition). A org.apache.wss4j.common.cache.EHCacheReplayCache instance is used by default.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SAML_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.cache.config.file

string

 

Set this property to point to a configuration file for the underlying caching implementation for the TokenStore. The default configuration file that is used is cxf-ehcache.xml in org.apache.cxf:cxf-rt-security JAR.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_CACHE_CONFIG_FILE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.token-store-cache-instance

string

 

A reference to a org.apache.cxf.ws.security.tokenstore.TokenStore bean to use for caching security tokens. By default this uses a instance.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_TOKEN_STORE_CACHE_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.cache.identifier

string

 

The Cache Identifier to use with the TokenStore. CXF uses the following key to retrieve a token store: org.apache.cxf.ws.security.tokenstore.TokenStore-<identifier>. This key can be used to configure service-specific cache configuration. If the identifier does not match, then it falls back to a cache configuration with key org.apache.cxf.ws.security.tokenstore.TokenStore.

The default <identifier> is the QName of the service in question. However to pick up a custom cache configuration (for example, if you want to specify a TokenStore per-client proxy), it can be configured with this identifier instead.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_CACHE_IDENTIFIER
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.role.classifier

string

 

The Subject Role Classifier to use. If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. If this value is not specified, then it tries to get roles using the DefaultSecurityContext in org.apache.cxf:cxf-core. Otherwise it uses this value in combination with the role.classifier.type to get the roles from the Subject.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ROLE_CLASSIFIER
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.role.classifier.type

string

prefix

The Subject Role Classifier Type to use. If one of the WSS4J Validators returns a JAAS Subject from Validation, then the WSS4JInInterceptor will attempt to create a SecurityContext based on this Subject. Currently accepted values are prefix or classname. Must be used in conjunction with the role.classifier.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ROLE_CLASSIFIER_TYPE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.asymmetric.signature.algorithm

string

 

This configuration tag allows the user to override the default Asymmetric Signature algorithm (RSA-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_ASYMMETRIC_SIGNATURE_ALGORITHM
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.symmetric.signature.algorithm

string

 

This configuration tag allows the user to override the default Symmetric Signature algorithm (HMAC-SHA1) for use in WS-SecurityPolicy, as the WS-SecurityPolicy specification does not allow the use of other algorithms at present.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SYMMETRIC_SIGNATURE_ALGORITHM
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.password.encryptor.instance

string

 

A reference to a org.apache.wss4j.common.crypto.PasswordEncryptor bean, which is used to encrypt or decrypt passwords in the Merlin Crypto implementation (or any custom Crypto implementations).

By default, WSS4J uses the org.apache.wss4j.common.crypto.JasyptPasswordEncryptor which must be instantiated with a password to use to decrypt keystore passwords in the Merlin Crypto definition. This password is obtained via the CallbackHandler defined via callback-handler

The encrypted passwords must be stored in the format "ENC(encoded encrypted password)".

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_PASSWORD_ENCRYPTOR_INSTANCE
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.delegated.credential

string

 

A reference to a Kerberos org.ietf.jgss.GSSCredential bean to use for WS-Security. This is used to retrieve a service ticket instead of using the client credentials.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_DELEGATED_CREDENTIAL
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.security.context.creator

string

 

A reference to a org.apache.cxf.ws.security.wss4j.WSS4JSecurityContextCreator bean that is used to create a CXF SecurityContext from the set of WSS4J processing results. The default implementation is org.apache.cxf.ws.security.wss4j.DefaultWSS4JSecurityContextCreator.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SECURITY_CONTEXT_CREATOR
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.security.token.lifetime

long

300000

The security token lifetime value (in milliseconds).

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_SECURITY_TOKEN_LIFETIME
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.request.credential.delegation

boolean

false

If true, credential delegation is requested in the KerberosClient; otherwise the credential delegation is not in the KerberosClient.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_REQUEST_CREDENTIAL_DELEGATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.use.credential.delegation

boolean

false

If true, GSSCredential bean is retrieved from the Message Context using the delegated.credential property and then it is used to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_USE_CREDENTIAL_DELEGATION
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.is.username.in.servicename.form

boolean

false

If true, the Kerberos username is in servicename form; otherwise the Kerberos username is not in servicename form.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_IS_USERNAME_IN_SERVICENAME_FORM
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.jaas.context

string

 

The JAAS Context name to use for Kerberos.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_JAAS_CONTEXT
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.spn

string

 

The Kerberos Service Provider Name (spn) to use.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_SPN
Since Quarkus CXF: 2.5.0

quarkus.cxf.endpoint."endpoints".security.kerberos.client

string

 

A reference to a org.apache.cxf.ws.security.kerberos.KerberosClient bean used to obtain a service ticket.

This option is experimental, because it is not covered by tests yet.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__SECURITY_KERBEROS_CLIENT
Since Quarkus CXF: 2.5.0

5.5. WS-ReliableMessaging

WS-ReliableMessaging (WS-RM) is a protocol ensuring a reliable delivery of messages in a distributed environment even in presence of software, system, or network failures.

This extension provides CXF framework’s WS-ReliableMessaging implementation.

5.5.1. Maven coordinates

Create a new project using quarkus-cxf-rt-ws-rm on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-rt-ws-rm</artifactId>
</dependency>

5.5.2. Supported standards

5.5.3. Usage

Once your application depends on quarkus-cxf-rt-ws-rm, WS-RM is enabled for all clients and service endpoints defined in application.properties. This is due to the fact that the quarkus.cxf.client.myClient.rm.enabled and quarkus.cxf.endpoint."/my-endpoint".rm.enabled properties are true by default.

Enabling WS-RM for a client or service endpoints means that WS-RM interceptors will be added to the given client or endpoint.

In addition to that you may want to set some of the configuration options or the following WS-Addressing options:

5.5.3.1. Runnable example

There is an integration test covering WS-RM with a decoupled endpoint in the Quarkus CXF source tree.

It is split into two separate applications that communicate with each other:

To run it, you need to install the server into your local Maven repository first

$ cd test-util-parent/test-ws-rm-server-jvm
$ mvn clean install

And then you can run the test scenario implemented in the client module:

$ cd ../../integration-tests/ws-rm-client
$ mvn clean test

The exchange of SOAP messages between the client, the server and the decoupled endpoint are shown in the console.

5.5.4. Configuration

lock Configuration property fixed at build time. All other configuration properties are overridable at runtime.

Configuration propertyTypeDefault

quarkus.cxf.rm.namespace

string

http://schemas.xmlsoap.org/ws/2005/02/rm

WS-RM version namespace: http://schemas.xmlsoap.org/ws/2005/02/rm/ or http://docs.oasis-open.org/ws-rx/wsrm/200702

Environment variable: QUARKUS_CXF_RM_NAMESPACE
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.wsa-namespace

string

http://schemas.xmlsoap.org/ws/2004/08/addressing

WS-Addressing version namespace: http://schemas.xmlsoap.org/ws/2004/08/addressing or http://www.w3.org/2005/08/addressing. Note that this property is ignored unless you are using the http://schemas.xmlsoap.org/ws/2005/02/rm/ RM namespace.

Environment variable: QUARKUS_CXF_RM_WSA_NAMESPACE
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.inactivity-timeout

long

 

A time duration in milliseconds after which the associated sequence will be closed if no messages (including acknowledgments and other control messages) were exchanged between the sender and receiver during that period of time. If not set, the associated sequence will never be closed due to inactivity.

Environment variable: QUARKUS_CXF_RM_INACTIVITY_TIMEOUT
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.retransmission-interval

long

3000

A time duration in milliseconds between successive attempts to resend a message that has not been acknowledged by the receiver.

Environment variable: QUARKUS_CXF_RM_RETRANSMISSION_INTERVAL
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.exponential-backoff

boolean

false

If true the retransmission interval will be doubled on every transmission attempt; otherwise the retransmission interval stays equal to quarkus.cxf.rm.retransmission-interval for every retransmission attempt.

Environment variable: QUARKUS_CXF_RM_EXPONENTIAL_BACKOFF
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.acknowledgement-interval

long

 

A time duration in milliseconds within which an acknowledgement for a received message is expected to be sent by a RM destination. If not specified, the acknowledgements will be sent immediately.

Environment variable: QUARKUS_CXF_RM_ACKNOWLEDGEMENT_INTERVAL
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.store

string

 

A reference to a org.apache.cxf.ws.rm.persistence.RMStore bean used to store source and destination sequences and message references.

Environment variable: QUARKUS_CXF_RM_STORE
Since Quarkus CXF: 2.7.0

quarkus.cxf.rm.feature-ref

string

#defaultRmFeature

A reference to a org.apache.cxf.ws.rm.feature.RMFeature bean to set on clients and service endpoint which have quarkus.cxf.[client|service]."name".rm.enabled = true.

If the value is #defaultRmFeature then Quarkus CXF creates and configures the bean for you.

Environment variable: QUARKUS_CXF_RM_FEATURE_REF
Since Quarkus CXF: 2.7.0

quarkus.cxf.client."clients".rm.enabled

boolean

true

If true then the WS-ReliableMessaging interceptors will be added to this client or service endpoint.

Environment variable: QUARKUS_CXF_CLIENT__CLIENTS__RM_ENABLED

quarkus.cxf.endpoint."endpoints".rm.enabled

boolean

true

If true then the WS-ReliableMessaging interceptors will be added to this client or service endpoint.

Environment variable: QUARKUS_CXF_ENDPOINT__ENDPOINTS__RM_ENABLED

5.6. Security Token Service (STS)

Issue, renew and validate security tokens in context of WS-Trust.

5.6.1. Maven coordinates

Create a new project using quarkus-cxf-services-sts on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-services-sts</artifactId>
</dependency>

5.6.2. Supported standards

5.6.3. Usage

Here are the key parts of a basic WS-Trust scenario:

  • WS-SecurityPolicy - except for defining security requirements, such as transport protocols, encryption and signing, it can also contain an <IssuedToken> assertion. It specifies the requirements and constraints for these security tokens that the client must adhere to when accessing the service.
  • Security Token Service (STS) - issues, validates, and renews security tokens upon request. It acts as a trusted authority that authenticates clients and issues tokens that assert the client’s identity and permissions.
  • Client - requests a token from the STS to access a web service. It must authenticate itself to the STS and provide details about the kind of token required.
  • Service - relies on the STS to authenticate clients and validate their tokens.

5.6.3.1. Runnable example

There is an integration test covering WS-Trust in the Quarkus CXF source tree. Let’s walk through it and see how the individual parts are set to work together.

5.6.3.1.1. WS-SecurityPolicy

The policy is located in asymmetric-saml2-policy.xml file. Its key part is the <IssuedToken> assertion requiring a SAML 2.0 token:

asymmetric-saml2-policy.xml

                            <sp:IssuedToken
                                sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                                <sp:RequestSecurityTokenTemplate>
                                    <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
                                    <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey</t:KeyType>
                                </sp:RequestSecurityTokenTemplate>
                                <wsp:Policy>
                                    <sp:RequireInternalReference />
                                </wsp:Policy>
                                <sp:Issuer>
                                    <wsaws:Address>http://localhost:8081/services/sts</wsaws:Address>
                                    <wsaws:Metadata xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
                                                    wsdli:wsdlLocation="http://localhost:8081/services/sts?wsdl">
                                        <wsaw:ServiceName xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
                                                        xmlns:stsns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
                                                        EndpointName="UT_Port">stsns:SecurityTokenService</wsaw:ServiceName>
                                    </wsaws:Metadata>
                                </sp:Issuer>
                            </sp:IssuedToken>

5.6.3.1.2. Security Token Service (STS)

The STS is implemented in Sts.java:

Sts.java

@WebServiceProvider(serviceName = "SecurityTokenService", portName = "UT_Port", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/", wsdlLocation = "ws-trust-1.4-service.wsdl")
public class Sts extends SecurityTokenServiceProvider {

    public Sts() throws Exception {
        super();

        StaticSTSProperties props = new StaticSTSProperties();
        props.setSignatureCryptoProperties("stsKeystore.properties");
        props.setSignatureUsername("sts");
        props.setCallbackHandlerClass(StsCallbackHandler.class.getName());
        props.setIssuer("SampleSTSIssuer");

        List<ServiceMBean> services = new LinkedList<ServiceMBean>();
        StaticService service = new StaticService();
        final Config config = ConfigProvider.getConfig();
        final int port = LaunchMode.current().equals(LaunchMode.TEST) ? config.getValue("quarkus.http.test-port", Integer.class)
                : config.getValue("quarkus.http.port", Integer.class);
        service.setEndpoints(Arrays.asList(
                "http://localhost:" + port + "/services/hello-ws-trust",
                "http://localhost:" + port + "/services/hello-ws-trust-actas",
                "http://localhost:" + port + "/services/hello-ws-trust-onbehalfof"));
        services.add(service);

        TokenIssueOperation issueOperation = new TokenIssueOperation();
        issueOperation.setServices(services);
        issueOperation.getTokenProviders().add(new SAMLTokenProvider());
        // required for OnBehalfOf
        issueOperation.getTokenValidators().add(new UsernameTokenValidator());
        // added for OnBehalfOf and ActAs
        issueOperation.getDelegationHandlers().add(new UsernameTokenDelegationHandler());
        issueOperation.setStsProperties(props);

        TokenValidateOperation validateOperation = new TokenValidateOperation();
        validateOperation.getTokenValidators().add(new SAMLTokenValidator());
        validateOperation.setStsProperties(props);

        this.setIssueOperation(issueOperation);
        this.setValidateOperation(validateOperation);
    }
}

and configured in application.properties:

application.properties

quarkus.cxf.endpoint."/sts".implementor = io.quarkiverse.cxf.it.ws.trust.sts.Sts
quarkus.cxf.endpoint."/sts".logging.enabled = pretty

quarkus.cxf.endpoint."/sts".security.signature.username = sts
quarkus.cxf.endpoint."/sts".security.signature.password = password
quarkus.cxf.endpoint."/sts".security.validate.token = false

quarkus.cxf.endpoint."/sts".security.signature.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.endpoint."/sts".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.endpoint."/sts".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.endpoint."/sts".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.file" = sts.pkcs12

5.6.3.1.3. Service

The service is implemented in TrustHelloServiceImpl.java:

TrustHelloServiceImpl.java

@WebService(portName = "TrustHelloServicePort", serviceName = "TrustHelloService", targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/ws-trust", endpointInterface = "io.quarkiverse.cxf.it.ws.trust.server.TrustHelloService")
public class TrustHelloServiceImpl implements TrustHelloService {
    @WebMethod
    @Override
    public String hello(String person) {
        return "Hello " + person + "!";
    }
}

The asymmetric-saml2-policy.xml mentioned above is set in the Service Endpoint Interface TrustHelloService.java:

TrustHelloServiceImpl.java

@WebService(targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/ws-trust")
@Policy(placement = Policy.Placement.BINDING, uri = "classpath:/asymmetric-saml2-policy.xml")
public interface TrustHelloService {
    @WebMethod
    @Policies({
            @Policy(placement = Policy.Placement.BINDING_OPERATION_INPUT, uri = "classpath:/io-policy.xml"),
            @Policy(placement = Policy.Placement.BINDING_OPERATION_OUTPUT, uri = "classpath:/io-policy.xml")
    })
    String hello(String person);
}

The service endpoint is configured in application.properties:

application.properties

quarkus.cxf.endpoint."/hello-ws-trust".implementor = io.quarkiverse.cxf.it.ws.trust.server.TrustHelloServiceImpl
quarkus.cxf.endpoint."/hello-ws-trust".logging.enabled = pretty

quarkus.cxf.endpoint."/hello-ws-trust".security.signature.username = service
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.password = password
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = service
quarkus.cxf.endpoint."/hello-ws-trust".security.signature.properties."org.apache.ws.security.crypto.merlin.file" = service.pkcs12

quarkus.cxf.endpoint."/hello-ws-trust".security.encryption.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.endpoint."/hello-ws-trust".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.endpoint."/hello-ws-trust".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.endpoint."/hello-ws-trust".security.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = service
quarkus.cxf.endpoint."/hello-ws-trust".security.encryption.properties."org.apache.ws.security.crypto.merlin.file" = service.pkcs12

5.6.3.1.4. Client

Finally, for the SOAP client to be able to communicate with the service, its STSClient needs to be configured. It can be done in application.properties:

application.properties

quarkus.cxf.client.hello-ws-trust.security.sts.client.wsdl = http://localhost:${quarkus.http.test-port}/services/sts?wsdl
quarkus.cxf.client.hello-ws-trust.security.sts.client.service-name = {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService
quarkus.cxf.client.hello-ws-trust.security.sts.client.endpoint-name = {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port
quarkus.cxf.client.hello-ws-trust.security.sts.client.username = client
quarkus.cxf.client.hello-ws-trust.security.sts.client.password = password
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.username = sts
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = client
quarkus.cxf.client.hello-ws-trust.security.sts.client.encryption.properties."org.apache.ws.security.crypto.merlin.keystore.file" = client.pkcs12
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.username = client
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.properties."org.apache.ws.security.crypto.provider" = org.apache.ws.security.components.crypto.Merlin
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.properties."org.apache.ws.security.crypto.merlin.keystore.type" = pkcs12
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.properties."org.apache.ws.security.crypto.merlin.keystore.password" = password
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.properties."org.apache.ws.security.crypto.merlin.keystore.alias" = client
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.properties."org.apache.ws.security.crypto.merlin.keystore.file" = client.pkcs12
quarkus.cxf.client.hello-ws-trust.security.sts.client.token.usecert = true

Tip

The properties for configuring the STS client are provided by the io.quarkiverse.cxf:quarkus-cxf-rt-ws-security extension and documented on its reference page.

Alternatively, the client can be set as a bean reference:

application.properties

quarkus.cxf.client.hello-ws-trust-bean.security.sts.client = #stsClientBean

In that case, the @Named bean needs to be produced programmatically, e.g. using @jakarta.enterprise.inject.Produces:

BeanProducers.java

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Named;

import org.apache.cxf.ws.security.SecurityConstants;

import io.quarkiverse.cxf.ws.security.sts.client.STSClientBean;

public class BeanProducers {

    /**
     * Create and configure an STSClient for use by the TrustHelloService client.
     */
    @Produces
    @ApplicationScoped
    @Named("stsClientBean")
    STSClientBean createSTSClient() {
        /*
         * We cannot use org.apache.cxf.ws.security.trust.STSClient as a return type of this bean producer method
         * because it does not have a no-args constructor. STSClientBean is a subclass of STSClient having one.
         */
        STSClientBean stsClient = STSClientBean.create();
        stsClient.setWsdlLocation("http://localhost:8081/services/sts?wsdl");
        stsClient.setServiceQName(new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "SecurityTokenService"));
        stsClient.setEndpointQName(new QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/", "UT_Port"));
        Map<String, Object> props = stsClient.getProperties();
        props.put(SecurityConstants.USERNAME, "client");
        props.put(SecurityConstants.PASSWORD, "password");
        props.put(SecurityConstants.ENCRYPT_PROPERTIES,
                Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
        props.put(SecurityConstants.ENCRYPT_USERNAME, "sts");
        props.put(SecurityConstants.STS_TOKEN_USERNAME, "client");
        props.put(SecurityConstants.STS_TOKEN_PROPERTIES,
                Thread.currentThread().getContextClassLoader().getResource("clientKeystore.properties"));
        props.put(SecurityConstants.STS_TOKEN_USE_CERT_FOR_KEYINFO, "true");
        return stsClient;
    }
}

5.7. HTTP Async Transport

Implement async SOAP Clients using Apache HttpComponents HttpClient 5.

5.7.1. Maven coordinates

Create a new project using quarkus-cxf-rt-transports-http-hc5 on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-rt-transports-http-hc5</artifactId>
</dependency>

5.7.2. Usage

Once the quarkus-cxf-rt-transports-http-hc5 dependency is available in the classpath, CXF will use HttpAsyncClient for asynchronous calls and will continue using HttpURLConnection for synchronous calls.

5.7.2.1. Generate async methods

Asynchronous client invocations require some additional methods in the service endpoint interface. That code is not generated by default.

To enable it, you need to create a JAX-WS binding file with enableAsyncMapping set to true:

Tip

The sample code snippets used in this section come from the HC5 integration test in the source tree of Quarkus CXF

src/main/resources/wsdl/async-binding.xml

<?xml version="1.0"?>
<bindings
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns="https://jakarta.ee/xml/ns/jaxws"
        wsdlLocation="CalculatorService.wsdl">
    <bindings node="wsdl:definitions">
        <enableAsyncMapping>true</enableAsyncMapping>
    </bindings>
</bindings>

This file should then be passed to wsdl2java through its additional-params property:

application.properties

quarkus.cxf.codegen.wsdl2java.includes = wsdl/*.wsdl
quarkus.cxf.codegen.wsdl2java.additional-params = -b,src/main/resources/wsdl/async-binding.xml

5.7.2.2. Asynchronous Clients and Mutiny

Once the asynchronous stubs are available, it is possible to wrap a client call in io.smallrye.mutiny.Uni as shown below:

package io.quarkiverse.cxf.hc5.it;

import java.util.concurrent.Future;

import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;

import org.jboss.eap.quickstarts.wscalculator.calculator.AddResponse;
import org.jboss.eap.quickstarts.wscalculator.calculator.CalculatorService;

import io.quarkiverse.cxf.annotation.CXFClient;
import io.smallrye.mutiny.Uni;

@Path("/hc5")
public class Hc5Resource {

    @Inject
    @CXFClient("myCalculator") // name used in application.properties
    CalculatorService myCalculator;

    @SuppressWarnings("unchecked")
    @Path("/add-async")
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public Uni<Integer> addAsync(@QueryParam("a") int a, @QueryParam("b") int b) {
        return Uni.createFrom()
                .future(
                        (Future<AddResponse>) myCalculator
                                .addAsync(a, b, res -> {
                                }))
                .map(addResponse -> addResponse.getReturn());
    }

}

5.7.2.3. Thread pool

Asynchronous clients delivered by this extension leverage ManagedExecutor with a thread pool provided by Quarkus. The thread pool can be configured using the quarkus.thread-pool.* family of options. As a consequence of this, the executor and thread pool related attributes of org.apache.cxf.transports.http.configuration.HTTPClientPolicy are not honored for async clients on Quarkus.

Tip

You can see more details about the CXF asynchronous client and how to tune it further in CXF documentation.

5.8. XJC Plugins

XJC plugins for wsdl2java code generation. You’ll need to add this extension if you want to use any of the following in quarkus.cxf.codegen.wsdl2java.additional-params:

  • -xjc-Xbg - generate getFoo() instead of isFoo() accessor methods for boolean fields.
  • -xjc-Xdv - let the generated getter methods return the default value defined in the schema unless the field is set explicitly.
  • -xjc-Xjavadoc - generate JavaDoc based on xs:documentation present in the schema.
  • -xjc-Xproperty-listener - add PropertyChangeListener support to the generated beans.
  • -xjc-Xts - generate toString() methods in model classes.
  • -xjc-Xwsdlextension - generate beans that can be used directly with WSDL4J as extensors in the WSDL.
Tip

Check the wsdl2java section of User guide for more details about wsdl2java.

5.8.1. Maven coordinates

Create a new project using quarkus-cxf-xjc-plugins on code.quarkus.redhat.com or add these coordinates to your existing project:

<dependency>
    <groupId>io.quarkiverse.cxf</groupId>
    <artifactId>quarkus-cxf-xjc-plugins</artifactId>
</dependency>
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.