# Confluent

{% hint style="success" %}
Only one Schema Registry connection is allowed.

Name must be schema-registry.

See [JSON schema](https://docs.lenses.io/latest/devx/6.0/deployment/configuration/overview#json-schema-support) for support.&#x20;

Environment variables are supported; escape the dollar sign

```yaml
sslKeystorePassword:
  value: "\${ENV_VAR_NAME}"
```

{% endhint %}

### **Simple configuration, with JMX metrics**

The URLs (nodes) should always have **a scheme** defined (http\:// or https\://).

```yaml
confluentSchemaRegistry:
  - name: schema-registry
    tags: ["tag1"]
    version: 1      
    configuration:
      schemaRegistryUrls:
        value:
          - http://my-sr.host1:8081
          - http://my-sr.host2:8081
      ## all metrics properties are optional
      metricsPort: 
        value: 9581
      metricsType: 
        value: JMX
      metricsSsl: 
        value: false
```

### **Basic authentication**

For Basic Authentication, define `username` and `password` properties.

```yaml
confluentSchemaRegistry:
- name: schema-registry
  tags: ["tag1"]
  version: 1    
  configuration:
    schemaRegistryUrls:
      value:
        - http://my-sr.host1:8081
        - http://my-sr.host2:8081
    username: 
      value: my-username
    password: 
      value: my-password
```

### **TLS with custom truststore**

A custom truststore is needed when the Schema Registry is served over TLS (encryption-in-transit) and the Registry’s certificate is not signed by a trusted CA.

```yaml
confluentSchemaRegistry:
  - name: schema-registry
    tags: ["tag1"]
    version: 1      
    configuration:
      schemaRegistryUrls:
        value:
          - https://my-sr.host1:8081
          - https://my-sr.host2:8081
      sslTruststore:
        file: schema-truststore.jks
      sslTruststorePassword: 
        value: myPassword
```

### **TLS with client authentication**

A custom truststore might be necessary too (see above).

```yaml
confluentSchemaRegistry:
  - name: schema-registry
    tags: ["tag1"]
    version: 1      
    configuration:
      schemaRegistryUrls:
        value:
          - https://my-sr.host1:8081
          - https://my-sr.host2:8081
      sslKeystore:
        file: schema-keystore.jks
      sslKeystorePassword: 
        value: myPassword
```

### **Hard or soft delete**

By default, Lenses will use hard delete for Schema Registry. To use soft delete, add the following property:

```yaml
confluentSchemaRegistry:
  - name: schema-registry
    tags: ["tag1"]
    version: 1      
    configuration:
      schemaRegistryUrls:
        value:
          - http://my-sr.host1:8081
          - http://my-sr.host2:8081
      hardDelete:
        value: true      
```
