// Metadata created by nebel
// ParentAssemblies: assemblies/getting-started/assembly-using-the-registry-client.adoc

[id="registry-client-config_{context}"]
= {registry} Java client configuration

[role="_abstract"]
The {registry} Java client includes the following configuration options, based on the client factory:

.{registry} Java client configuration options
[%header,cols="1,2,1"]
|===
|Option
|Description
|Arguments
|Plain client
|Basic REST client used to interact with a running registry.
|`baseUrl`
|Client with custom configuration
|Registry client using the configuration provided by the user. 
|`baseUrl`, `Map<String Object> configs`
|Client with custom configuration and authentication
| Registry client that accepts a map containing custom configuration. For example, this is useful to add custom headers to the calls. 
You must also provide an authentication server to authenticate the requests. 
ifdef::rh-openshift-sr[]
The {org-name} Single Sign-On authentication server is `{sso-token-url}`.
endif::[]
|`baseUrl, Map<String Object> configs, Auth auth`
|===

[discrete]
== Custom header configuration
To configure custom headers, you must add the `apicurio.registry.request.headers` prefix to the `configs` map key. For example, a key of `apicurio.registry.request.headers.Authorization` with a value of `Basic: xxxxx` results in a header of `Authorization` with value of `Basic: xxxxx`.

[discrete]
== TLS configuration options
You can configure Transport Layer Security (TLS) authentication for the {registry} Java client using the following properties:

* `apicurio.registry.request.ssl.truststore.location`
* `apicurio.registry.request.ssl.truststore.password`
* `apicurio.registry.request.ssl.truststore.type`
* `apicurio.registry.request.ssl.keystore.location`
* `apicurio.registry.request.ssl.keystore.password`
* `apicurio.registry.request.ssl.keystore.type`
* `apicurio.registry.request.ssl.key.password`


[role="_additional-resources"]
.Additional resources
* For details on how to configure authentication for {registry} Kafka client serializers/deserializers (SerDes), see 
ifdef::apicurio-registry,rh-service-registry[]
{kafka-client-serdes}
endif::[]
ifdef::rh-openshift-sr[]
link:https://access.redhat.com/documentation/en-us/red_hat_integration/2021.q3/html/service_registry_user_guide/configuring-kafka-client-serdes[Red Hat Integration Service Registry Kafka client SerDes configuration].
endif::[]
