You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/12/13 13:29:38 UTC

(camel) branch main updated (fc2567db83e -> 1bd5cf0c2a9)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from fc2567db83e CAMEL-20233: camel-jbang - camel catalog other does not list kotlin-dsl
     new b181817d494 CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs
     new ec8909a62e4 CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Migration docs
     new 4f2660c588a CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Test
     new 1bd5cf0c2a9 CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Docs

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/components/azure-eventhubs.json  | 14 ++++---
 .../eventhubs/EventHubsComponentConfigurer.java    |  6 +++
 .../eventhubs/EventHubsEndpointConfigurer.java     |  6 +++
 .../eventhubs/EventHubsEndpointUriFactory.java     |  3 +-
 .../component/azure/eventhubs/azure-eventhubs.json | 14 ++++---
 .../src/main/docs/azure-eventhubs-component.adoc   | 16 ++++++--
 .../component/azure/eventhubs}/CredentialType.java | 12 ++++--
 .../azure/eventhubs/EventHubsConfiguration.java    | 16 ++++++++
 .../eventhubs/client/EventHubsClientFactory.java   | 44 ++++++++++++++++------
 .../azure/eventhubs/EventHubsComponentTest.java    | 19 ++++++++++
 .../azure/eventhubs/EventProcessorTest.java        |  1 +
 .../ROOT/pages/camel-4x-upgrade-guide-4_4.adoc     |  8 ++++
 12 files changed, 127 insertions(+), 32 deletions(-)
 copy components/camel-azure/{camel-azure-cosmosdb/src/main/java/org/apache/camel/component/azure/cosmosdb => camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs}/CredentialType.java (84%)


(camel) 04/04: CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1bd5cf0c2a9ce624860bbab509c7094919586e58
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 13 13:45:14 2023 +0100

    CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/docs/azure-eventhubs-component.adoc         | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc b/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
index 2e68bc4da17..4922aa632c7 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
+++ b/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
@@ -66,17 +66,27 @@ include::partial$component-endpoint-options.adoc[]
 
 == Authentication Information
 
+You have three different Credential Types: AZURE_IDENTITY, TOKEN_CREDENTIAL and CONNECTION_STRING. You can also provide a client instance yourself.
 To use this component, you have 3 options in order to provide the required Azure authentication information:
 
+CONNECTION_STRING:
 - Provide `sharedAccessName` and `sharedAccessKey` for your Azure Event Hubs account. The sharedAccessKey can
 be generated through your Event Hubs Azure portal.
 - Provide `connectionString` string, if you provide the connection string, you don't supply `namespace`, `eventHubName`, `sharedAccessKey` and `sharedAccessName`
 as these data already included in the `connectionString`, therefore is the simplest option to get started. Learn more https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string[here] on how to generate the connection string.
-- Provide a https://docs.microsoft.com/en-us/java/api/com.azure.messaging.eventhubs.eventhubproducerasyncclient?view=azure-java-stable[EventHubProducerAsyncClient] instance which can be
-provided into `producerAsyncClient`. However, this is *only possible for camel producer*, for the camel consumer, is not possible to inject the client due to some design constraint by the `EventProcessorClient`.
+
+TOKEN_CREDENTIAL:
 - Provide an implementation of `com.azure.core.credential.TokenCredential` into the Camel's Registry, e.g. using the `com.azure.identity.DefaultAzureCredentialBuilder().build();` API.
 See the documentation https://docs.microsoft.com/en-us/azure/active-directory/authentication/overview-authentication[here about Azure-AD authentication].
 
+AZURE_IDENTITY:
+- This will use `com.azure.identity.DefaultAzureCredentialBuilder().build();` instance. This will follow the Default Azure Credential Chain.
+See the documentation https://docs.microsoft.com/en-us/azure/active-directory/authentication/overview-authentication[here about Azure-AD authentication].
+
+Client instance:
+- Provide a https://docs.microsoft.com/en-us/java/api/com.azure.messaging.eventhubs.eventhubproducerasyncclient?view=azure-java-stable[EventHubProducerAsyncClient] instance which can be
+provided into `producerAsyncClient`. However, this is *only possible for camel producer*, for the camel consumer, is not possible to inject the client due to some design constraint by the `EventProcessorClient`.
+
 == Checkpoint Store Information
 A checkpoint store stores and retrieves partition ownership information and checkpoint details for each partition in a given consumer group of an event hub instance. Users are not meant to implement an CheckpointStore.
 Users are expected to choose existing implementations of this interface, instantiate it, and pass it to the component through `checkpointStore` option.
@@ -174,7 +184,7 @@ public com.azure.core.credential.TokenCredential myTokenCredential() {
 }
 
 from("direct:start")
-.to("azure-eventhubs:namespace/eventHubName?tokenCredential=#myTokenCredential)"
+.to("azure-eventhubs:namespace/eventHubName?tokenCredential=#myTokenCredential&credentialType=TOKEN_CREDENTIAL)"
 ----
 
 === Development Notes (Important)


(camel) 03/04: CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Test

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4f2660c588aec04668188dc90f82022aa8740d9d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 13 13:36:41 2023 +0100

    CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Test
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../azure/eventhubs/EventHubsComponentTest.java       | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentTest.java b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentTest.java
index dffb896ddf5..0b294de006c 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentTest.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentTest.java
@@ -139,6 +139,25 @@ class EventHubsComponentTest extends CamelTestSupport {
         assertEquals(1000, endpoint.getConfiguration().getCheckpointBatchTimeout());
     }
 
+    @Test
+    public void testCreateEndpointWithConfigAzureIdentity() {
+        final String uri = "azure-eventhubs:namespace/hubName?sharedAccessName=DummyAccessKeyName"
+                           + "&sharedAccessKey=DummyKey"
+                           + "&consumerGroupName=testConsumer&prefetchCount=100"
+                           + "&checkpointBatchSize=100&checkpointBatchTimeout=1000"
+                           + "&credentialType=AZURE_IDENTITY";
+
+        final EventHubsEndpoint endpoint = context.getEndpoint(uri, EventHubsEndpoint.class);
+
+        assertEquals("namespace", endpoint.getConfiguration().getNamespace());
+        assertEquals("hubName", endpoint.getConfiguration().getEventHubName());
+        assertEquals("testConsumer", endpoint.getConfiguration().getConsumerGroupName());
+        assertEquals(CredentialType.AZURE_IDENTITY, endpoint.getConfiguration().getCredentialType());
+        assertEquals(100, endpoint.getConfiguration().getPrefetchCount());
+        assertEquals(100, endpoint.getConfiguration().getCheckpointBatchSize());
+        assertEquals(1000, endpoint.getConfiguration().getCheckpointBatchTimeout());
+    }
+
     private String getErrorMessage(final String uri) {
         ResolveEndpointFailedException exception
                 = assertThrows(ResolveEndpointFailedException.class, () -> context.getEndpoint(uri));


(camel) 01/04: CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b181817d494a15949e48ef4fa64fcc2537e0d59b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 13 13:26:05 2023 +0100

    CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../camel/catalog/components/azure-eventhubs.json  | 14 ++++---
 .../eventhubs/EventHubsComponentConfigurer.java    |  6 +++
 .../eventhubs/EventHubsEndpointConfigurer.java     |  6 +++
 .../eventhubs/EventHubsEndpointUriFactory.java     |  3 +-
 .../component/azure/eventhubs/azure-eventhubs.json | 14 ++++---
 .../component/azure/eventhubs/CredentialType.java  | 39 +++++++++++++++++++
 .../azure/eventhubs/EventHubsConfiguration.java    | 16 ++++++++
 .../eventhubs/client/EventHubsClientFactory.java   | 44 ++++++++++++++++------
 .../azure/eventhubs/EventProcessorTest.java        |  1 +
 9 files changed, 118 insertions(+), 25 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-eventhubs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-eventhubs.json
index 6a599499281..8cfe7eba98a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-eventhubs.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-eventhubs.json
@@ -42,9 +42,10 @@
     "producerAsyncClient": { "index": 17, "kind": "property", "displayName": "Producer Async Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.messaging.eventhubs.EventHubProducerAsyncClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Sets the Eve [...]
     "autowiredEnabled": { "index": 18, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching  [...]
     "connectionString": { "index": 19, "kind": "property", "displayName": "Connection String", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Instead of supplying namespace, sharedAccessKey, sharedAccessName ... etc, you can  [...]
-    "sharedAccessKey": { "index": 20, "kind": "property", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
-    "sharedAccessName": { "index": 21, "kind": "property", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
-    "tokenCredential": { "index": 22, "kind": "property", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying namesp [...]
+    "credentialType": { "index": 20, "kind": "property", "displayName": "Credential Type", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.eventhubs.CredentialType", "enum": [ "AZURE_IDENTITY", "CONNECTION_STRING", "TOKEN_CREDENTIAL" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CONNECTION_STRING", "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfigur [...]
+    "sharedAccessKey": { "index": 21, "kind": "property", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
+    "sharedAccessName": { "index": 22, "kind": "property", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
+    "tokenCredential": { "index": 23, "kind": "property", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying namesp [...]
   },
   "headers": {
     "CamelAzureEventHubsPartitionKey": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) Overrides the hashing key to be provided for the batch of events, which instructs the Event Hubs service to map this key to a specific partition. (consumer) It sets the partition hashing key if it was set when originally  [...]
@@ -79,8 +80,9 @@
     "producerAsyncClient": { "index": 19, "kind": "parameter", "displayName": "Producer Async Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.messaging.eventhubs.EventHubProducerAsyncClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Sets the Ev [...]
     "lazyStartProducer": { "index": 20, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
     "connectionString": { "index": 21, "kind": "parameter", "displayName": "Connection String", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Instead of supplying namespace, sharedAccessKey, sharedAccessName ... etc, you can [...]
-    "sharedAccessKey": { "index": 22, "kind": "parameter", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
-    "sharedAccessName": { "index": 23, "kind": "parameter", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
-    "tokenCredential": { "index": 24, "kind": "parameter", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying names [...]
+    "credentialType": { "index": 22, "kind": "parameter", "displayName": "Credential Type", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.eventhubs.CredentialType", "enum": [ "AZURE_IDENTITY", "CONNECTION_STRING", "TOKEN_CREDENTIAL" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CONNECTION_STRING", "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfigu [...]
+    "sharedAccessKey": { "index": 23, "kind": "parameter", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
+    "sharedAccessName": { "index": 24, "kind": "parameter", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
+    "tokenCredential": { "index": 25, "kind": "parameter", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying names [...]
   }
 }
diff --git a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentConfigurer.java b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentConfigurer.java
index 28297cca101..33cffaf6d17 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentConfigurer.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsComponentConfigurer.java
@@ -55,6 +55,8 @@ public class EventHubsComponentConfigurer extends PropertyConfigurerSupport impl
         case "connectionString": getOrCreateConfiguration(target).setConnectionString(property(camelContext, java.lang.String.class, value)); return true;
         case "consumergroupname":
         case "consumerGroupName": getOrCreateConfiguration(target).setConsumerGroupName(property(camelContext, java.lang.String.class, value)); return true;
+        case "credentialtype":
+        case "credentialType": getOrCreateConfiguration(target).setCredentialType(property(camelContext, org.apache.camel.component.azure.eventhubs.CredentialType.class, value)); return true;
         case "eventposition":
         case "eventPosition": getOrCreateConfiguration(target).setEventPosition(property(camelContext, java.util.Map.class, value)); return true;
         case "lazystartproducer":
@@ -112,6 +114,8 @@ public class EventHubsComponentConfigurer extends PropertyConfigurerSupport impl
         case "connectionString": return java.lang.String.class;
         case "consumergroupname":
         case "consumerGroupName": return java.lang.String.class;
+        case "credentialtype":
+        case "credentialType": return org.apache.camel.component.azure.eventhubs.CredentialType.class;
         case "eventposition":
         case "eventPosition": return java.util.Map.class;
         case "lazystartproducer":
@@ -165,6 +169,8 @@ public class EventHubsComponentConfigurer extends PropertyConfigurerSupport impl
         case "connectionString": return getOrCreateConfiguration(target).getConnectionString();
         case "consumergroupname":
         case "consumerGroupName": return getOrCreateConfiguration(target).getConsumerGroupName();
+        case "credentialtype":
+        case "credentialType": return getOrCreateConfiguration(target).getCredentialType();
         case "eventposition":
         case "eventPosition": return getOrCreateConfiguration(target).getEventPosition();
         case "lazystartproducer":
diff --git a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointConfigurer.java b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointConfigurer.java
index 84bb8959606..53b4bcde182 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointConfigurer.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointConfigurer.java
@@ -45,6 +45,8 @@ public class EventHubsEndpointConfigurer extends PropertyConfigurerSupport imple
         case "connectionString": target.getConfiguration().setConnectionString(property(camelContext, java.lang.String.class, value)); return true;
         case "consumergroupname":
         case "consumerGroupName": target.getConfiguration().setConsumerGroupName(property(camelContext, java.lang.String.class, value)); return true;
+        case "credentialtype":
+        case "credentialType": target.getConfiguration().setCredentialType(property(camelContext, org.apache.camel.component.azure.eventhubs.CredentialType.class, value)); return true;
         case "eventposition":
         case "eventPosition": target.getConfiguration().setEventPosition(property(camelContext, java.util.Map.class, value)); return true;
         case "exceptionhandler":
@@ -103,6 +105,8 @@ public class EventHubsEndpointConfigurer extends PropertyConfigurerSupport imple
         case "connectionString": return java.lang.String.class;
         case "consumergroupname":
         case "consumerGroupName": return java.lang.String.class;
+        case "credentialtype":
+        case "credentialType": return org.apache.camel.component.azure.eventhubs.CredentialType.class;
         case "eventposition":
         case "eventPosition": return java.util.Map.class;
         case "exceptionhandler":
@@ -157,6 +161,8 @@ public class EventHubsEndpointConfigurer extends PropertyConfigurerSupport imple
         case "connectionString": return target.getConfiguration().getConnectionString();
         case "consumergroupname":
         case "consumerGroupName": return target.getConfiguration().getConsumerGroupName();
+        case "credentialtype":
+        case "credentialType": return target.getConfiguration().getCredentialType();
         case "eventposition":
         case "eventPosition": return target.getConfiguration().getEventPosition();
         case "exceptionhandler":
diff --git a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointUriFactory.java b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointUriFactory.java
index 40facb71afa..3c03c4d1878 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointUriFactory.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/generated/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpointUriFactory.java
@@ -21,7 +21,7 @@ public class EventHubsEndpointUriFactory extends org.apache.camel.support.compon
     private static final Set<String> SECRET_PROPERTY_NAMES;
     private static final Set<String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(25);
+        Set<String> props = new HashSet<>(26);
         props.add("amqpRetryOptions");
         props.add("amqpTransportType");
         props.add("blobAccessKey");
@@ -34,6 +34,7 @@ public class EventHubsEndpointUriFactory extends org.apache.camel.support.compon
         props.add("checkpointStore");
         props.add("connectionString");
         props.add("consumerGroupName");
+        props.add("credentialType");
         props.add("eventHubName");
         props.add("eventPosition");
         props.add("exceptionHandler");
diff --git a/components/camel-azure/camel-azure-eventhubs/src/generated/resources/org/apache/camel/component/azure/eventhubs/azure-eventhubs.json b/components/camel-azure/camel-azure-eventhubs/src/generated/resources/org/apache/camel/component/azure/eventhubs/azure-eventhubs.json
index 6a599499281..8cfe7eba98a 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/generated/resources/org/apache/camel/component/azure/eventhubs/azure-eventhubs.json
+++ b/components/camel-azure/camel-azure-eventhubs/src/generated/resources/org/apache/camel/component/azure/eventhubs/azure-eventhubs.json
@@ -42,9 +42,10 @@
     "producerAsyncClient": { "index": 17, "kind": "property", "displayName": "Producer Async Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.messaging.eventhubs.EventHubProducerAsyncClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Sets the Eve [...]
     "autowiredEnabled": { "index": 18, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching  [...]
     "connectionString": { "index": 19, "kind": "property", "displayName": "Connection String", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Instead of supplying namespace, sharedAccessKey, sharedAccessName ... etc, you can  [...]
-    "sharedAccessKey": { "index": 20, "kind": "property", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
-    "sharedAccessName": { "index": 21, "kind": "property", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
-    "tokenCredential": { "index": 22, "kind": "property", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying namesp [...]
+    "credentialType": { "index": 20, "kind": "property", "displayName": "Credential Type", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.eventhubs.CredentialType", "enum": [ "AZURE_IDENTITY", "CONNECTION_STRING", "TOKEN_CREDENTIAL" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CONNECTION_STRING", "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfigur [...]
+    "sharedAccessKey": { "index": 21, "kind": "property", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
+    "sharedAccessName": { "index": 22, "kind": "property", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
+    "tokenCredential": { "index": 23, "kind": "property", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying namesp [...]
   },
   "headers": {
     "CamelAzureEventHubsPartitionKey": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) Overrides the hashing key to be provided for the batch of events, which instructs the Event Hubs service to map this key to a specific partition. (consumer) It sets the partition hashing key if it was set when originally  [...]
@@ -79,8 +80,9 @@
     "producerAsyncClient": { "index": 19, "kind": "parameter", "displayName": "Producer Async Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.messaging.eventhubs.EventHubProducerAsyncClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Sets the Ev [...]
     "lazyStartProducer": { "index": 20, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
     "connectionString": { "index": 21, "kind": "parameter", "displayName": "Connection String", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Instead of supplying namespace, sharedAccessKey, sharedAccessName ... etc, you can [...]
-    "sharedAccessKey": { "index": 22, "kind": "parameter", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
-    "sharedAccessName": { "index": 23, "kind": "parameter", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
-    "tokenCredential": { "index": 24, "kind": "parameter", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying names [...]
+    "credentialType": { "index": 22, "kind": "parameter", "displayName": "Credential Type", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.eventhubs.CredentialType", "enum": [ "AZURE_IDENTITY", "CONNECTION_STRING", "TOKEN_CREDENTIAL" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "CONNECTION_STRING", "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfigu [...]
+    "sharedAccessKey": { "index": 23, "kind": "parameter", "displayName": "Shared Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The generated value for the SharedAccessName." },
+    "sharedAccessName": { "index": 24, "kind": "parameter", "displayName": "Shared Access Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "The name you chose for your EventHubs SAS keys." },
+    "tokenCredential": { "index": 25, "kind": "parameter", "displayName": "Token Credential", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "com.azure.core.credential.TokenCredential", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.eventhubs.EventHubsConfiguration", "configurationField": "configuration", "description": "Still another way of authentication (beside supplying names [...]
   }
 }
diff --git a/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/CredentialType.java b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/CredentialType.java
new file mode 100644
index 00000000000..f3d9bff9b58
--- /dev/null
+++ b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/CredentialType.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.azure.eventhubs;
+
+public enum CredentialType {
+    /**
+     * Eventhubs Connection String
+     */
+    CONNECTION_STRING,
+    /**
+     * Includes:
+     * <uL>
+     * <li>Service principal with secret</li>
+     * <li>Service principal with certificate</li>
+     * <li>username and password</li>
+     * </uL>
+     *
+     * @see com.azure.identity.DefaultAzureCredentialBuilder
+     */
+    AZURE_IDENTITY,
+    /**
+     * Eventhubs Token Credential
+     */
+    TOKEN_CREDENTIAL,
+}
diff --git a/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsConfiguration.java b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsConfiguration.java
index e320685bcc8..f6786f09b31 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsConfiguration.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsConfiguration.java
@@ -34,6 +34,8 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 
+import static org.apache.camel.component.azure.eventhubs.CredentialType.CONNECTION_STRING;
+
 @UriParams
 public class EventHubsConfiguration implements Cloneable {
 
@@ -80,6 +82,9 @@ public class EventHubsConfiguration implements Cloneable {
     private String partitionKey;
     @UriParam(label = "producer")
     private String partitionId;
+    @UriParam(label = "security", enums = "AZURE_IDENTITY,CONNECTION_STRING,TOKEN_CREDENTIAL",
+              defaultValue = "CONNECTION_STRING")
+    private CredentialType credentialType = CONNECTION_STRING;
 
     /**
      * EventHubs namespace created in Azure Portal.
@@ -351,6 +356,17 @@ public class EventHubsConfiguration implements Cloneable {
         this.checkpointBatchTimeout = checkpointBatchTimeout;
     }
 
+    public CredentialType getCredentialType() {
+        return credentialType;
+    }
+
+    /**
+     * Determines the credential strategy to adopt
+     */
+    public void setCredentialType(CredentialType credentialType) {
+        this.credentialType = credentialType;
+    }
+
     public EventHubsConfiguration copy() {
         try {
             return (EventHubsConfiguration) super.clone();
diff --git a/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/client/EventHubsClientFactory.java b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/client/EventHubsClientFactory.java
index a448f113040..48543642ab3 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/client/EventHubsClientFactory.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/client/EventHubsClientFactory.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.azure.eventhubs.client;
 import java.util.Locale;
 import java.util.function.Consumer;
 
+import com.azure.identity.DefaultAzureCredentialBuilder;
 import com.azure.messaging.eventhubs.CheckpointStore;
 import com.azure.messaging.eventhubs.EventHubClientBuilder;
 import com.azure.messaging.eventhubs.EventHubConsumerAsyncClient;
@@ -31,6 +32,7 @@ import com.azure.messaging.eventhubs.models.EventContext;
 import com.azure.storage.blob.BlobContainerAsyncClient;
 import com.azure.storage.blob.BlobContainerClientBuilder;
 import com.azure.storage.common.StorageSharedKeyCredential;
+import org.apache.camel.component.azure.eventhubs.CredentialType;
 import org.apache.camel.component.azure.eventhubs.EventHubsConfiguration;
 import org.apache.camel.util.ObjectHelper;
 
@@ -47,17 +49,23 @@ public final class EventHubsClientFactory {
                 .transportType(configuration.getAmqpTransportType())
                 .retryOptions(configuration.getAmqpRetryOptions());
 
-        if (ObjectHelper.isEmpty(configuration.getTokenCredential())) {
+        if (configuration.getCredentialType().equals(CredentialType.CONNECTION_STRING)) {
             return eventHubClientBuilder
                     .connectionString(buildConnectionString(configuration))
                     .buildAsyncProducerClient();
-        }
+        } else if (configuration.getCredentialType().equals(CredentialType.TOKEN_CREDENTIAL)) {
 
-        checkTokenCredentialConfiguration(configuration);
+            checkTokenCredentialConfiguration(configuration);
+            return eventHubClientBuilder
+                    .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
+                    .eventHubName(configuration.getEventHubName())
+                    .credential(configuration.getTokenCredential())
+                    .buildAsyncProducerClient();
+        }
         return eventHubClientBuilder
                 .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
                 .eventHubName(configuration.getEventHubName())
-                .credential(configuration.getTokenCredential())
+                .credential(new DefaultAzureCredentialBuilder().build())
                 .buildAsyncProducerClient();
     }
 
@@ -68,17 +76,23 @@ public final class EventHubsClientFactory {
                 .transportType(configuration.getAmqpTransportType())
                 .retryOptions(configuration.getAmqpRetryOptions());
 
-        if (ObjectHelper.isEmpty(configuration.getTokenCredential())) {
+        if (configuration.getCredentialType().equals(CredentialType.CONNECTION_STRING)) {
             return eventHubClientBuilder
                     .connectionString(buildConnectionString(configuration))
                     .buildAsyncConsumerClient();
-        }
+        } else if (configuration.getCredentialType().equals(CredentialType.TOKEN_CREDENTIAL)) {
 
-        checkTokenCredentialConfiguration(configuration);
+            checkTokenCredentialConfiguration(configuration);
+            return eventHubClientBuilder
+                    .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
+                    .eventHubName(configuration.getEventHubName())
+                    .credential(configuration.getTokenCredential())
+                    .buildAsyncConsumerClient();
+        }
         return eventHubClientBuilder
                 .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
                 .eventHubName(configuration.getEventHubName())
-                .credential(configuration.getTokenCredential())
+                .credential(new DefaultAzureCredentialBuilder().build())
                 .buildAsyncConsumerClient();
     }
 
@@ -94,17 +108,23 @@ public final class EventHubsClientFactory {
                 .processError(processError)
                 .processEvent(processEvent);
 
-        if (ObjectHelper.isEmpty(configuration.getTokenCredential())) {
+        if (configuration.getCredentialType().equals(CredentialType.CONNECTION_STRING)) {
             return eventProcessorClientBuilder
                     .connectionString(buildConnectionString(configuration))
                     .buildEventProcessorClient();
-        }
+        } else if (configuration.getCredentialType().equals(CredentialType.TOKEN_CREDENTIAL)) {
 
-        checkTokenCredentialConfiguration(configuration);
+            checkTokenCredentialConfiguration(configuration);
+            return eventProcessorClientBuilder
+                    .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
+                    .eventHubName(configuration.getEventHubName())
+                    .credential(configuration.getTokenCredential())
+                    .buildEventProcessorClient();
+        }
         return eventProcessorClientBuilder
                 .fullyQualifiedNamespace(getFullyQualifiedNamespace(configuration))
                 .eventHubName(configuration.getEventHubName())
-                .credential(configuration.getTokenCredential())
+                .credential(new DefaultAzureCredentialBuilder().build())
                 .buildEventProcessorClient();
     }
 
diff --git a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventProcessorTest.java b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventProcessorTest.java
index 03c875d2325..64fbee96dbf 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventProcessorTest.java
+++ b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventProcessorTest.java
@@ -70,6 +70,7 @@ public class EventProcessorTest {
         assertNotNull(EventHubsClientFactory.createEventProcessorClient(configuration, onEvent, onError));
 
         configuration.setTokenCredential(new IntelliJCredentialBuilder().tenantId("tenantId").build());
+        configuration.setCredentialType(CredentialType.TOKEN_CREDENTIAL);
         assertThrows(IllegalArgumentException.class,
                 () -> EventHubsClientFactory.createEventProcessorClient(configuration, onEvent, onError));
 


(camel) 02/04: CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Migration docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ec8909a62e4141a890181877a09b05c71386ed3c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 13 13:29:12 2023 +0100

    CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Migration docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_4.adoc            | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_4.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_4.adoc
index 136a310b11e..ed29cc15f57 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_4.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_4.adoc
@@ -15,3 +15,11 @@ use the default constructor if necessary.
 
 The useDefaultIdentity parameter has been removed in favor of the credentialType parameter. Now user should select between SHARED_ACCOUNT_KEY and AZURE_IDENTITY.
 This is part of the effort explained in CAMEL-18590.
+
+=== camel-azure-eventhubs
+
+The credentialType parameter has been introduced with three possible values: AZURE_IDENTITY, CONNECTION_STRING and TOKEN_CREDENTIAL.
+With the CONNECTION_STRING mode the user could explicitly set the connectionString parameters or use the sharedAccessName and sharedAccessKey to automatically build the connection string.
+With the TOKEN_CREDENTIAL mode the user could pass a TokenCredential instance.
+With the AZURE_IDENTITY mode the user will be able to use the Default Azure Credentials Chain.
+This is part of the effort explained in CAMEL-18590.