Skip to content

Commit

Permalink
* fix code and styling. (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlenko-cv authored Dec 31, 2024
1 parent e1f289b commit 47df4f9
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ schema.registry.url={{globals['schema.registry.url']}}
kafka.security.protocol=SASL_SSL
kafka.ssl.truststore.location={{globals['ssl.client.truststore.location']}}
kafka.ssl.truststore.password={{globals['ssl.client.truststore.password']}}
kafka.sasl.jaas.config=com.sun.security.auth.module.Krb5LoginModule required debug=true \
useKeyTab=true storeKey=true keyTab="{{'{{CMF_CONF_DIR}}/cybersec.keytab'}}" \
principal="{{ globals['cybersec.service.principal'] }}";
kafka.sasl.kerberos.service.name={{ globals['kafka_principal_name'] }}

schema.registry.client.ssl.trustStorePath={{globals['ssl.client.truststore.location']}}
schema.registry.client.ssl.trustStorePassword={{globals['ssl.client.truststore.password']}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,19 @@ spring.kafka.external-clusters.{{ obj['name'] }}.consumer.key-deserializer={{ gl
spring.kafka.external-clusters.{{ obj['name'] }}.consumer.value-deserializer={{ globals['spring.kafka.consumer.value-deserializer'] }}
spring.kafka.external-clusters.{{ obj['name'] }}.producer.key-serializer={{ globals['spring.kafka.producer.key-deserialize'] }}
spring.kafka.external-clusters.{{ obj['name'] }}.producer.value-serializer={{ globals['spring.kafka.producer.value-serializer'] }}

{% if globals['kerberos.auth.enable'] %}

spring.kafka.security.protocol=SASL_SSL
spring.kafka.properties.sasl.kerberos.service.name={{ globals['kafka_principal_name'] }}
spring.kafka.properties.sasl.jaas.config=com.sun.security.auth.module.Krb5LoginModule required debug=true \
useKeyTab=true storeKey=true keyTab="{{'{{CONF_DIR}}/cybersec.keytab'}}" \
principal="{{ globals['cybersec.service.principal'] }}";
spring.kafka.ssl.trustStoreLocation=file:{{ globals['security.ssl.rest.truststore'] }}
spring.kafka.ssl.keyStoreLocation=file:{{ globals['ssl.server.keystore.location'] }}
spring.kafka.ssl.trustStorePassword={{ globals['security.ssl.rest.truststore-password'] }}
spring.kafka.ssl.keyStorePassword={{ globals['ssl.server.keystore.password'] }}
spring.kafka.ssl.keyPassword={{ globals['ssl.server.keystore.keypassword'] }}

{% endif %}
{% endfor %}
7 changes: 4 additions & 3 deletions flink-cyber/cyber-csd/src/main/descriptor/service.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"kerberosPrincipals": [
{
"name": "cybersec_service_principal",
"propertyName": "cybersec.service.principal",
"primary": "${principal}",
"instance": "${host}"
},
Expand All @@ -390,10 +391,10 @@
"sslServer": {
"keyIdentifier": "parser_ui_chaining",
"enabledConfigName": "ssl_enabled",
"keystoreLocationConfigName": "ssl_server_keystore_location",
"keystorePasswordConfigName": "ssl_server_keystore_password",
"keystoreLocationConfigName": "ssl.server.keystore.location",
"keystorePasswordConfigName": "ssl.server.keystore.password",
"keyPasswordOptionality": "required",
"keystoreKeyPasswordConfigName": "ssl_server_keystore_keypassword",
"keystoreKeyPasswordConfigName": "ssl.server.keystore.keypassword",
"autoTlsMode": "auto"
},
"sslClient": {
Expand Down
2 changes: 1 addition & 1 deletion flink-cyber/cyber-parcel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ under the License.
<cybersec.basedir>${project.parent.basedir}</cybersec.basedir>
<parcel.basename>CYBERSEC-${cybersec.full.version}</parcel.basename>
<parcel.tar.gz.filename>${parcel.basename}.tar.gz</parcel.tar.gz.filename>
<parcel.filename>${parcel.basename}-el7.parcel</parcel.filename>
<parcel.filename>${parcel.basename}-el8.parcel</parcel.filename>
<flink.tar.gz.url>file://${cybersec.basedir}/cyber-jobs/target/cyber-jobs-${project.parent.version}.tar.gz</flink.tar.gz.url>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ private ResolvedSchema createTableIfNotExists(StreamTableEnvironment tableEnv, S

protected String getTransformation(DataType tableColumnDataType, MappingColumnDto mapping) {
String transformation = mapping.getTransformation();
if (transformation == null && isNonDefaultColumn(mapping.getName()) && (DataTypes.BOOLEAN().equals(tableColumnDataType) || tableColumnDataType.getLogicalType().is(LogicalTypeFamily.NUMERIC))) {
if (transformation == null && isNonDefaultColumn(mapping.getName())
&& (DataTypes.BOOLEAN().equals(tableColumnDataType)
|| tableColumnDataType.getLogicalType().is(LogicalTypeFamily.NUMERIC))) {
transformation = String.format("TRY_CAST(%%s AS %s)", tableColumnDataType.getLogicalType().getTypeRoot().name());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,18 @@ export class PipelineStepperComponent {
}
}).afterClosed().subscribe((data: { id: string, name: string }) => {
if (data) {
const tmp: Map<string, CustomChip> = new Map();
tmp.set(chainId, {name: data.name, allowMapping: false, selected: true, removable: false});
this.topicMap.set(index, tmp);
if (this.topicMap.get(index)) {
this.topicMap.get(index).set(chainId, {
name: data.name,
allowMapping: false,
selected: true,
removable: false
});
} else {
const tmp: Map<string, CustomChip> = new Map();
tmp.set(chainId, {name: data.name, allowMapping: false, selected: true, removable: false});
this.topicMap.set(index, tmp);
}
}
});
}
Expand All @@ -203,4 +212,4 @@ export class PipelineStepperComponent {
}
}

type PipedChainModel = ChainModel & { pipeline: string}
type PipedChainModel = ChainModel & { pipeline: string }

0 comments on commit 47df4f9

Please sign in to comment.