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

2023-12-13 Thread acosentino
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-18590-eventhubs
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f5a021fbb31edad658557e5329db55200d445cf7
Author: Andrea Cosentino 
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 
---
 .../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) 04/04: CAMEL-18590 - Camel-Azure components: Define a unique configuration for authentication - Azure Eventhubs - Docs

2023-12-13 Thread acosentino
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 
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 
---
 .../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)