Skip to content

Commit

Permalink
Merge pull request #1071 from ayeshLK/kafkahub-mtls-dev
Browse files Browse the repository at this point in the history
Update package version and fix runtime issues with IdP configurations
  • Loading branch information
ayeshLK authored Jan 10, 2025
2 parents 4b1fcd5 + 7644e10 commit 146f505
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions examples/kafka-hub/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 'kafkahub'

services:
hub-1:
image: 'ayeshalmeida/kafkahub:11.0.0'
image: 'ayeshalmeida/kafkahub:12.0.0'
hostname: hub1
container_name: hub-1
ports:
Expand All @@ -26,16 +26,14 @@ services:
IDP_TOKEN_AUDIENCE: "ballerina"
IDP_TOKEN_SCOPE_KEY: "scope"
IDP_JWKS_ENDPOINT: "https://idp:9443/oauth2/jwks"
IDP_CLIENT_TRUSTSTORE_FILENAME: "client-truststore.jks"
IDP_CLIENT_TRUSTSTORE_FILEPATH: "./resources/client-truststore.jks"
IDP_CLIENT_TRUSTSTORE_PASSWORD: "wso2carbon"
# Consumer group name uses for `websub-events` consumer
WEBSUB_EVENTS_CONSUMER_GROUP: "websub-events-receiver-hub-1"
# Update following enviornment variable to set the client truststore name
TRUSTSTORE_FILE_NAME: "client-truststore.jks"
# Update following enviornment variable to set the client truststore password
TRUSTSTORE_PASSWORD: "password"
# Update following enviornment variable to set the client keystore name
KEYSTORE_FILE_NAME: "client-keystore.jks"
# Update following enviornment variable to set the client keystore password
KEYSTORE_PASSWORD: "password"
# Maximum number of records returned in a single call to consumer-poll
Expand Down
2 changes: 1 addition & 1 deletion examples/kafka-hub/hub/Cloud.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[container.image]
repository="ballerina"
name="kafkahub"
tag="11.0.0"
tag="12.0.0"

[[container.copy.files]]
sourceFile="./resources"
Expand Down
2 changes: 1 addition & 1 deletion examples/kafka-hub/hub/Config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MESSAGE_DELIVERY_RETRYABLE_STATUS_CODES = [500, 502, 503]
issuer = "https://localhost:9443/oauth2/token"
audience = "ballerina"
jwksUrl = "https://localhost:9443/oauth2/jwks"
trustStore = "client-truststore.jks"
trustStore = "./resources/client-truststore.jks"
trustStorePassword = "wso2carbon"

# The MTLS configurations related to Kafka connection
Expand Down
2 changes: 1 addition & 1 deletion examples/kafka-hub/hub/modules/security/security.bal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final http:ListenerJwtAuthHandler handler = new({
clientConfig: {
secureSocket: {
cert: {
path: string `"./resources/${getIdpConfig("IDP_CLIENT_TRUSTSTORE_FILENAME", config:OAUTH2_CONFIG.trustStore)}`,
path: getIdpConfig("IDP_CLIENT_TRUSTSTORE_FILEPATH", config:OAUTH2_CONFIG.trustStore),
password: getIdpConfig("IDP_CLIENT_TRUSTSTORE_PASSWORD", config:OAUTH2_CONFIG.trustStorePassword)
}
}
Expand Down

0 comments on commit 146f505

Please sign in to comment.