Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2530 Enable SASL for bie kafka #2624

Merged
merged 86 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
114b31d
Initial attempt currently failing on sasl handshake
agile-josiah Feb 15, 2024
7f53b79
Enables sasl_ssl for our kafka broker and clients
agile-josiah Feb 15, 2024
a6646b1
More changes
agile-josiah Feb 15, 2024
bbd1d23
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Feb 15, 2024
348190b
Fix for integration test
agile-josiah Feb 15, 2024
1e3f44b
Remove comments and unnecessary duplication of ssl
agile-josiah Feb 20, 2024
a3fb2b3
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Feb 20, 2024
41e0bcc
Merge branch 'develop' into josiah/#2530/kafka-sasl
chengjie8 Feb 23, 2024
6c99c6f
Automated commit: Unpin versions of updated images
abd-vro-machine Feb 23, 2024
ddce338
Bump org.springframework.boot:spring-boot-autoconfigure from 3.2.2 to…
dependabot[bot] Feb 23, 2024
cda1eb7
EP Merge: Special Issue Code workaround for testing (#2645)
dfitchett Feb 23, 2024
3c61b66
Update QA BGS URL (#2622)
msnwatson Feb 23, 2024
8fa6684
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 1, 2024
a789218
Update to use vault values, added to dev and integration test yamls
agile-josiah Mar 4, 2024
834c0f6
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 4, 2024
72f6975
Update the remaining environments
agile-josiah Mar 4, 2024
fd0d605
Merge branch 'develop' into josiah/#2530/kafka-sasl
agile-josiah Mar 6, 2024
0e473b8
Updating the names of the topics and add the tls certs needed for com…
agile-josiah Mar 6, 2024
f22ff11
Add the var initialization to setenv.sh
agile-josiah Mar 6, 2024
c69d567
Update urls to dev from tst
agile-josiah Mar 9, 2024
bde7df4
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 9, 2024
00ece5f
Update Contention Event to use new updated topic names
agile-josiah Mar 11, 2024
20ca944
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 11, 2024
f37a3fe
Update BieMessagePayload to use new updated topic names
agile-josiah Mar 11, 2024
0ded0a7
Updating Login config to only include Kafka user and no default value
agile-josiah Mar 11, 2024
84f6166
Bump org.eclipse.jgit:org.eclipse.jgit from 6.8.0.202311291450-r to 6…
dependabot[bot] Mar 11, 2024
e978c45
Bump com.fasterxml.jackson.core:jackson-databind from 2.16.1 to 2.16.…
dependabot[bot] Mar 11, 2024
878f042
Bump org.apache.commons:commons-compress from 1.26.0 to 1.26.1 (#2727)
dependabot[bot] Mar 11, 2024
84633ee
Bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 from 2.16…
dependabot[bot] Mar 12, 2024
be61a82
EP Merge: Updated logging of errors and warnings (#2733)
dfitchett Mar 12, 2024
2699f40
Simplify EP Merge integration test sorter (#2683)
nanotone Mar 12, 2024
8b66796
Github action version rollback (#2737)
Ponnia-M Mar 12, 2024
d039e80
EPMerge: Fix serialization issue resulting in bad request response fr…
dfitchett Mar 13, 2024
39dfc58
mock-bip-claims-api: Updated mocks for new EE EP Merge End2End tests.…
dfitchett Mar 13, 2024
66cca25
EP Merge: add checks for get EP400 claim details (#2747)
dfitchett Mar 13, 2024
d6c0ccc
bump pydantic version for Contention Classification App (#2674)
lukey-luke Mar 14, 2024
84f58ff
#2749: PROD FIX, Increase rabbitmq container memory (#2750)
agile-josiah Mar 14, 2024
3b630fd
Update SpringBootStarterWeb (#2752)
agile-josiah Mar 14, 2024
b75b81c
Upgrade spring-boot-starter-web package version (#2754)
chengjie8 Mar 14, 2024
230db9b
remove all versioning (#2741)
msnwatson Mar 14, 2024
8eb6336
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 19, 2024
9b6b0a0
Update the substring env instead of a prefix for bia kafka topics.
agile-josiah Mar 19, 2024
baae844
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 22, 2024
703b253
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 25, 2024
3837add
Experiment with bie-kafka-end2end-test.yml
agile-josiah Mar 25, 2024
3b25bea
Experiment with bie-kafka-end2end-test.yml
agile-josiah Mar 25, 2024
746d1df
Experiment with bie-kafka-end2end-test.yml
agile-josiah Mar 26, 2024
3c35aad
Update group-id
agile-josiah Mar 28, 2024
fc8e419
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 28, 2024
f2234bb
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Mar 28, 2024
4c20a59
Add V02 to the end of topic names
agile-josiah Mar 28, 2024
30e1a1a
Update the escaped ""
agile-josiah Apr 1, 2024
70f79ce
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Apr 1, 2024
4b86b6c
Changes to the key and value -deserializer
agile-josiah Apr 1, 2024
eb800c6
Changes to the key and value -deserializer
agile-josiah Apr 2, 2024
bf4f10e
Add deserializer delegate class
agile-josiah Apr 2, 2024
44ec917
Add deserializer delegate class
agile-josiah Apr 2, 2024
a19f753
Fix integration test attempt #1
agile-josiah Apr 2, 2024
5c48b9d
Update kafka cert generation script to only generate the truststore.
agile-josiah Apr 2, 2024
60bfef7
Add yes back
agile-josiah Apr 2, 2024
5156123
Revert config
agile-josiah Apr 2, 2024
f46dad4
Update application yamls
agile-josiah Apr 2, 2024
58dcceb
Debug application integration test yaml
agile-josiah Apr 3, 2024
39cde8a
Changes to bie kafka docker vars
agile-josiah Apr 3, 2024
37b6254
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Apr 3, 2024
c698664
Changes to bie kafka docker vars
agile-josiah Apr 3, 2024
0a8a671
Changes to bie kafka docker vars
agile-josiah Apr 3, 2024
23e76ad
Add truststore back
agile-josiah Apr 3, 2024
58d8003
Edits to ssl/sasl connection
agile-josiah Apr 3, 2024
4a2d126
Updates to docker-entryprep.sh to ignore the keystore creation/verifi…
agile-josiah Apr 5, 2024
0be6866
Remove references to keystore file
agile-josiah Apr 5, 2024
0ae5791
Add a ssl piece to the properties file
agile-josiah Apr 8, 2024
38ab6c6
Add ssl truststore everywhere.
agile-josiah Apr 8, 2024
14a2989
Change shape of schema.registry.truststore.*
agile-josiah Apr 8, 2024
4065cfc
Add in USER_INFO basic auth for schema registry
agile-josiah Apr 8, 2024
c408ab7
Revert higher environments for RBAC to match develop
agile-josiah Apr 8, 2024
b608c50
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Apr 8, 2024
fed6802
Small nits and update to infix from env
agile-josiah Apr 9, 2024
b187a30
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Apr 9, 2024
781f8c0
rm unnecessary Kafka cert gen
agile-josiah Apr 9, 2024
3b4e831
Add qa and sandbox as well
agile-josiah Apr 9, 2024
3c60d98
Revert mock BIE kafka to existing state
agile-josiah Apr 9, 2024
4e4b2d8
Merge remote-tracking branch 'origin/develop' into josiah/#2530/kafka…
agile-josiah Apr 9, 2024
268577e
Revert local config
agile-josiah Apr 9, 2024
fa020b8
RBAC user id password are not needed for local test
chengjie8 Apr 15, 2024
d8d2eea
Merge branch 'develop' into josiah/#2530/kafka-sasl
chengjie8 Apr 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,7 @@ services:
BIE_KAFKA_KEYSTORE_PASSWORD: ${BIE_KAFKA_KEYSTORE_PASSWORD}
BIE_KAFKA_TRUSTSTORE_INBASE64: ${BIE_KAFKA_TRUSTSTORE_INBASE64}
BIE_KAFKA_TRUSTSTORE_PASSWORD: ${BIE_KAFKA_TRUSTSTORE_PASSWORD}
BIE_KAFKA_RBAC_USERNAME: ${BIE_KAFKA_RBAC_USERNAME}
BIE_KAFKA_RBAC_PASSWORD: ${BIE_KAFKA_RBAC_PASSWORD}
networks:
- vro_intranet
2 changes: 2 additions & 0 deletions scripts/setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,5 @@ exportSecretIfUnset BIP_KEYSTORE
exportSecretIfUnset BIP_PASSWORD
exportSecretIfUnset BIP_CLAIM_URL
exportSecretIfUnset BIP_EVIDENCE_URL
export BIE_KAFKA_RBAC_USERNAME=USERNAME
export BIE_KAFKA_RBAC_PASSWORD=PASSWORD
Original file line number Diff line number Diff line change
Expand Up @@ -34,60 +34,60 @@ public class BieMessagePayload {

// populated from kafka topic payload
@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private String benefitClaimTypeCode;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private String actorStation;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private String details;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private Long veteranParticipantId;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private String contentionClassificationName;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private String diagnosticTypeCode;

@TargetEvents({"CONTENTION_BIE_CONTENTION_UPDATED_V02"})
@TargetEvents({"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"})
private String journalStatusTypeCode;

@TargetEvents({
"CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"CONTENTION_BIE_CONTENTION_CLASSIFIED_V02",
"CONTENTION_BIE_CONTENTION_UPDATED_V02"
"BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02",
"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"
})
private Long dateAdded;

@TargetEvents({"CONTENTION_BIE_CONTENTION_UPDATED_V02"})
@TargetEvents({"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"})
private Long dateCompleted;

@TargetEvents({"CONTENTION_BIE_CONTENTION_UPDATED_V02"})
@TargetEvents({"BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"})
private Long dateUpdated;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import java.util.Arrays;

public enum ContentionEvent {
CONTENTION_ASSOCIATED_TO_CLAIM("CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02"),
CONTENTION_UPDATED("CONTENTION_BIE_CONTENTION_UPDATED_V02"),
CONTENTION_CLASSIFIED("CONTENTION_BIE_CONTENTION_CLASSIFIED_V02"),
CONTENTION_COMPLETED("CONTENTION_BIE_CONTENTION_COMPLETED_V02"),
CONTENTION_DELETED("CONTENTION_BIE_CONTENTION_DELETED_V02");
CONTENTION_ASSOCIATED_TO_CLAIM("BIA_SERVICES_BIE_CATALOG_CONTENTION_ASSOCIATED_TO_CLAIM_V02"),
CONTENTION_UPDATED("BIA_SERVICES_BIE_CATALOG_CONTENTION_UPDATED_V02"),
CONTENTION_CLASSIFIED("BIA_SERVICES_BIE_CATALOG_CONTENTION_CLASSIFIED_V02"),
CONTENTION_COMPLETED("BIA_SERVICES_BIE_CATALOG_CONTENTION_COMPLETED_V02"),
CONTENTION_DELETED("BIA_SERVICES_BIE_CATALOG_CONTENTION_DELETED_V02");

private final String topicName;

Expand All @@ -20,13 +20,13 @@ public String getTopicName() {
}

public static ContentionEvent mapTopicToEvent(String topic) {
// remove first word prefix from topic seperated by _
String noPrefixTopic = topic.substring(topic.indexOf("_") + 1);
String subString = "CATALOG_.*?_CONTENTION";
String noSubStringTopic = topic.replaceAll(subString, "CATALOG_CONTENTION");

return Arrays.stream(ContentionEvent.values())
.filter(event -> event.getTopicName().equals(noPrefixTopic))
.filter(event -> event.getTopicName().equals(noSubStringTopic))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("Unrecognized topic: " + noPrefixTopic));
.orElseThrow(() -> new IllegalArgumentException("Unrecognized topic: " + noSubStringTopic));
}

public static String rabbitMqExchangeName(String topic) {
Expand Down
8 changes: 0 additions & 8 deletions svc-bie-kafka/docker-entryprep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@ getEnvVarValue(){
}

for ENV_VAR in \
BIE_KAFKA_KEYSTORE_INBASE64 BIE_KAFKA_KEYSTORE_PASSWORD \
BIE_KAFKA_TRUSTSTORE_INBASE64 BIE_KAFKA_TRUSTSTORE_PASSWORD; do
if [ "$(getEnvVarValue "$ENV_VAR")" = "" ]; then
>&2 echo "ERROR: Missing expected environment variable: $ENV_VAR"
fi
done

export KEYSTORE_FILE="$PWD/keystore.p12"
echo "$BIE_KAFKA_KEYSTORE_INBASE64" | base64 -d > "$KEYSTORE_FILE"
echo -e "\nVerifying keystore ($KEYSTORE_FILE) and its password..."
if ! keytool -list -v -keystore "$KEYSTORE_FILE" -storepass "$BIE_KAFKA_KEYSTORE_PASSWORD" | grep "Alias name:"; then
>&2 echo "ERROR: with keystore"
fi

export TRUSTSTORE_FILE="$PWD/truststore.p12"
echo "$BIE_KAFKA_TRUSTSTORE_INBASE64" | base64 -d > "$TRUSTSTORE_FILE"
echo -e "\nVerifying truststore ($TRUSTSTORE_FILE) and its password..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
@Setter
public class BieProperties {

@Getter String kakfaTopicPrefix;
@Getter String kafkaTopicInfix;

public String[] topicNames() {
return Arrays.stream(ContentionEvent.values())
.map(contention -> kakfaTopicPrefix + contention.getTopicName())
.map(
contention -> {
String subString = "CATALOG_" + kafkaTopicInfix + "_CONTENTION";
return contention.getTopicName().replaceAll("CATALOG_CONTENTION", subString);
})
.toArray(String[]::new);
}
}
44 changes: 26 additions & 18 deletions svc-bie-kafka/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.dev.bip.va.gov:443}"
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:bip-kafka.dev.bip.va.gov:443}"
properties:
schema.registry.url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://schemaregistry.dev.bip.va.gov:443}"
schema.registry.ssl.protocol: SSL
schema.registry.ssl.keystore.location: "${KEYSTORE_FILE}"
schema.registry.ssl.keystore.password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
schema.registry.ssl.keystore.type: "PKCS12"
schema.registry.ssl.truststore.location: "${TRUSTSTORE_FILE}"
schema.registry.ssl.truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
schema.registry.ssl.truststore.type: "PKCS12"
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
schema.registry:
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://bip-schemaregistry.dev.bip.va.gov}"
ssl:
truststore.location: "${TRUSTSTORE_FILE}"
truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
truststore.type: "PKCS12"
security.protocol: SASL_SSL
sasl:
mechanism: PLAIN
jaas:
config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"${BIE_KAFKA_RBAC_USERNAME}\" password=\"${BIE_KAFKA_RBAC_PASSWORD}\";"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-tst-vro-1}"
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:EXT_VRO_TST}"
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}"
security:
protocol: SASL_SSL
ssl:
trust-store-location: "file:${TRUSTSTORE_FILE}"
trust-store-password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
trust-store-type: "PKCS12"

bie:
kafka-topic-infix: "TST"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

spring:
kafka:
# To prevent java.net.UnknownHostException mock-bie-kafka, use mock Kafka's 'EXTERNAL' port 9094
Expand Down
51 changes: 24 additions & 27 deletions svc-bie-kafka/src/main/resources/application-qa.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.stage.bip.va.gov:443}"
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:bip-kafka.qa.bip.va.gov:443}"
properties:
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}"
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
schema.registry:
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:https://bip-schemaregistry.dev.bip.va.gov}"
ssl:
truststore.location: "${TRUSTSTORE_FILE}"
truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
truststore.type: "PKCS12"
security.protocol: SASL_SSL
sasl:
mechanism: PLAIN
jaas:
config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"${BIE_KAFKA_RBAC_USERNAME}\" password=\"${BIE_KAFKA_RBAC_PASSWORD}\";"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-ivv-vro}"
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:EXT_VRO_QA}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
security:
protocol: SASL_SSL
ssl:
trust-store-location: "file:${TRUSTSTORE_FILE}"
trust-store-password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
trust-store-type: "PKCS12"

bie:
kakfa-topic-prefix: "IVV_"
kafka-topic-infix: "QA"
51 changes: 24 additions & 27 deletions svc-bie-kafka/src/main/resources/application-sandbox.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
spring:
kafka:
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:kafka.stage.bip.va.gov:443}"
bootstrap-servers: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:bip-kafka.stage.bip.va.gov:443}"
properties:
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}"
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
schema.registry:
basic.auth.credentials.source: USER_INFO
basic.auth.user.info: "${BIE_KAFKA_RBAC_USERNAME}:${BIE_KAFKA_RBAC_PASSWORD}"
url: "${BIE_KAFKA_PLACEHOLDERS_BROKERS:bip-schemaregistry.stage.bip.va.go}"
ssl:
truststore.location: "${TRUSTSTORE_FILE}"
truststore.password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
truststore.type: "PKCS12"
security.protocol: SASL_SSL
sasl:
mechanism: PLAIN
jaas:
config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"${BIE_KAFKA_RBAC_USERNAME}\" password=\"${BIE_KAFKA_RBAC_PASSWORD}\";"
consumer:
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:vro-bie-uat-vro}"
group-id: "${BIE_KAFKA_PLACEHOLDERS_GROUP_ID:EXT_VRO_IVV}"
key-deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
value-deserializer: "io.confluent.kafka.serializers.KafkaAvroDeserializer"
properties:
security.protocol: SSL
ssl:
keystore:
type: PKCS12
location: "${KEYSTORE_FILE}"
password: "${BIE_KAFKA_KEYSTORE_PASSWORD}"
truststore:
type: PKCS12
location: "${TRUSTSTORE_FILE}"
password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
security:
protocol: SASL_SSL
ssl:
trust-store-location: "file:${TRUSTSTORE_FILE}"
trust-store-password: "${BIE_KAFKA_TRUSTSTORE_PASSWORD}"
trust-store-type: "PKCS12"

bie:
kakfa-topic-prefix: "UAT_"
kafka-topic-infix: "IVV"
2 changes: 1 addition & 1 deletion svc-bie-kafka/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spring:

## Specify bie properties
bie:
kakfa-topic-prefix: "TST_"
kafka-topic-infix: "TST"

## Actuator for health check, liveness, and readiness
management:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class ContentionEventTest {

@ParameterizedTest
@CsvSource({
"TST_CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02, CONTENTION_ASSOCIATED_TO_CLAIM",
"TST_CONTENTION_BIE_CONTENTION_UPDATED_V02, CONTENTION_UPDATED",
"TST_CONTENTION_BIE_CONTENTION_CLASSIFIED_V02, CONTENTION_CLASSIFIED",
"TST_CONTENTION_BIE_CONTENTION_COMPLETED_V02, CONTENTION_COMPLETED",
"TST_CONTENTION_BIE_CONTENTION_DELETED_V02, CONTENTION_DELETED"
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_ASSOCIATED_TO_CLAIM_V02, CONTENTION_ASSOCIATED_TO_CLAIM",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_UPDATED_V02, CONTENTION_UPDATED",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_CLASSIFIED_V02, CONTENTION_CLASSIFIED",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_COMPLETED_V02, CONTENTION_COMPLETED",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_DELETED_V02, CONTENTION_DELETED"
})
public void testMapTopicToEvent_validTopics(String inputTopic, ContentionEvent expectedEvent) {
assertEquals(expectedEvent, mapTopicToEvent(inputTopic));
Expand All @@ -35,11 +35,11 @@ public void testMapTopicToEvent_unrecognizedTopic() {

@ParameterizedTest
@CsvSource({
"TST_CONTENTION_BIE_CONTENTION_ASSOCIATED_TO_CLAIM_V02, bie-events-contention-associated-to-claim",
"TST_CONTENTION_BIE_CONTENTION_UPDATED_V02, bie-events-contention-updated",
"TST_CONTENTION_BIE_CONTENTION_CLASSIFIED_V02, bie-events-contention-classified",
"TST_CONTENTION_BIE_CONTENTION_COMPLETED_V02, bie-events-contention-completed",
"TST_CONTENTION_BIE_CONTENTION_DELETED_V02, bie-events-contention-deleted"
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_ASSOCIATED_TO_CLAIM_V02, bie-events-contention-associated-to-claim",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_UPDATED_V02, bie-events-contention-updated",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_CLASSIFIED_V02, bie-events-contention-classified",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_COMPLETED_V02, bie-events-contention-completed",
"BIA_SERVICES_BIE_CATALOG_TST_CONTENTION_DELETED_V02, bie-events-contention-deleted"
})
public void testGenerateRabbitMQChannelName_channelNames(String inputTopic, String bieChannel) {
assertEquals(bieChannel, ContentionEvent.rabbitMqExchangeName(inputTopic));
Expand Down
Loading