Skip to content

Commit

Permalink
Chengjie8/file location fix (#1936)
Browse files Browse the repository at this point in the history
* fixed keystore/truststore file location

* removed logging

* address review comments
  • Loading branch information
chengjie8 authored Aug 17, 2023
1 parent 7873672 commit dc07bba
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ public void consume(ConsumerRecord<String, Object> record) {
messageValue = stringValue;
}

log.info("Topic name: {}", topicName);
log.info("Consumed message key: {}", record.key());
// TODO: Ensure no PII values are logged
log.info("Consumed message value (before) decode: {}", messageValue);

amqpMessageSender.send(
bieProperties.getKafkaTopicToAmqpExchangeMap().get(topicName), topicName, messageValue);
}
Expand Down
36 changes: 22 additions & 14 deletions svc-bie-kafka/src/main/resources/application-prod-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@ spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.prod.bip.va.gov:443}"
properties:
schema.registry.url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.prod.bip.va.gov:443}"
schema.registry.ssl.protocol: SSL
schema.registry.ssl.keystore.location: "file:${KEYSTORE_FILE}"
schema.registry.ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
schema.registry.ssl.keystore.type: "PKCS12"
schema.registry.ssl.truststore.location: "file:${TRUSTSTORE_FILE}"
schema.registry.ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
schema.registry.ssl.truststore.type: "PKCS12"
schema:
registry:
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.prod.bip.va.gov:443}"
ssl:
protocol: SSL
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-pre-vro}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl.keystore.type: PKCS12
ssl.keystore.location: "${KEYSTORE_FILE}"
ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
ssl.truststore.type: PKCS12
ssl.truststore.location: "${TRUSTSTORE_FILE}"
ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
kafka:
topic:
prefix: PRE
37 changes: 23 additions & 14 deletions svc-bie-kafka/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,35 @@ spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.prod.bip.va.gov:443}"
properties:
schema.registry.url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.prod.bip.va.gov:443}"
schema.registry.ssl.protocol: SSL
schema.registry.ssl.keystore.location: "file:${KEYSTORE_FILE}"
schema.registry.ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
schema.registry.ssl.keystore.type: "PKCS12"
schema.registry.ssl.truststore.location: "file:${TRUSTSTORE_FILE}"
schema.registry.ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
schema.registry.ssl.truststore.type: "PKCS12"
schema:
registry:
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.prod.bip.va.gov:443}"
ssl:
protocol: SSL
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-prod-vro}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl.keystore.type: PKCS12
ssl.keystore.location: "${KEYSTORE_FILE}"
ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
ssl.truststore.type: PKCS12
ssl.truststore.location: "${TRUSTSTORE_FILE}"
ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"

kafka:
topic:
prefix: PROD
36 changes: 22 additions & 14 deletions svc-bie-kafka/src/main/resources/application-qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@ spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.stage.bip.va.gov:443}"
properties:
schema.registry.url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.stage.bip.va.gov:443}"
schema.registry.ssl.protocol: SSL
schema.registry.ssl.keystore.location: "file:${KEYSTORE_FILE}"
schema.registry.ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
schema.registry.ssl.keystore.type: "PKCS12"
schema.registry.ssl.truststore.location: "file:${TRUSTSTORE_FILE}"
schema.registry.ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
schema.registry.ssl.truststore.type: "PKCS12"
schema:
registry:
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.stage.bip.va.gov:443}"
ssl:
protocol: SSL
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-ivv-vro}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl.keystore.type: PKCS12
ssl.keystore.location: "${KEYSTORE_FILE}"
ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
ssl.truststore.type: PKCS12
ssl.truststore.location: "${TRUSTSTORE_FILE}"
ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
kafka:
topic:
prefix: IVV
36 changes: 22 additions & 14 deletions svc-bie-kafka/src/main/resources/application-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@ spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.stage.bip.va.gov:443}"
properties:
schema.registry.url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.stage.bip.va.gov:443}"
schema.registry.ssl.protocol: SSL
schema.registry.ssl.keystore.location: "file:${KEYSTORE_FILE}"
schema.registry.ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
schema.registry.ssl.keystore.type: "PKCS12"
schema.registry.ssl.truststore.location: "file:${TRUSTSTORE_FILE}"
schema.registry.ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
schema.registry.ssl.truststore.type: "PKCS12"
schema:
registry:
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.stage.bip.va.gov:443}"
ssl:
protocol: SSL
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-uat-vro}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl.keystore.type: PKCS12
ssl.keystore.location: "${KEYSTORE_FILE}"
ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
ssl.truststore.type: PKCS12
ssl.truststore.location: "${TRUSTSTORE_FILE}"
ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
kafka:
topic:
prefix: UAT

0 comments on commit dc07bba

Please sign in to comment.