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

[kafka] Fix SASL plain text validation #20

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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