Skip to content

Commit

Permalink
[kafka] Fix SASL plain text validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak authored and Jozefiel committed Nov 14, 2023
1 parent 0071cb1 commit e7716ad
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
5 changes: 4 additions & 1 deletion misc/python/kafka/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# 1.0.0
- Upgrade pydantic version to v2
- Upgrade pydantic version to v2

# 1.0.1
- Remove validation for SASL plain text
25 changes: 25 additions & 0 deletions misc/python/kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,28 @@ Conductor Kafka producer workers for Frinx Machine
### Prerequisites

- Python 3.10+ is required to use this package.


### Workflow input example

```json
{
...
"tasks": [
{
"name": "Kafka_publish",
"taskReferenceName": "kafka_publish",
"type": "SIMPLE",
"inputParameters": {
"topic": "${workflow.input.topic}",
"key": "${workflow.input.key}",
"message": "${workflow.input.message}",
"bootstrap_servers": "kafka:9092",
"security": "SASL_PLAINTEXT",
"ssl_conf": "{\"sasl_plain_username\": \"user1\", \"sasl_plain_password\": \"password1\", \"sasl_mechanism\": \"PLAIN\"}"
}
}
]
...
}
```
4 changes: 0 additions & 4 deletions misc/python/kafka/frinx_worker/kafka/producer_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ class ProducerConfigSaslPlain(ProducerConfigCommon):
use_enum_values=True
)

@field_validator('sasl_plain_username', 'sasl_plain_password')
def read_passwd(cls, v: str) -> Any:
return construct_full_path(v, True)[1]


class KafkaProducerCache:
__ttl: int
Expand Down
2 changes: 1 addition & 1 deletion misc/python/kafka/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages = [{ include = "frinx_worker" }]
name = "frinx-kafka-worker"
description = "Conductor Kafka worker for Frinx Machine"
authors = ["Jozef Volak <[email protected]>"]
version = "1.0.1"
version = "1.0.2"
readme = ["README.md", "CHANGELOG.md"]
keywords = ["frinx-machine", "kafka", "worker"]
license = "Apache 2.0"
Expand Down

0 comments on commit e7716ad

Please sign in to comment.