Skip to content

Commit 3428669

Browse files
Merge pull request #52 from glassflow/kerberos-support
ETL-291: add kerberos parameters
2 parents 43d0a46 + dbaf063 commit 3428669

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.0
1+
3.4.0

src/glassflow/etl/models/source.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class KafkaMechanism(CaseInsensitiveStrEnum):
1717
SCRAM_SHA_256 = "SCRAM-SHA-256"
1818
SCRAM_SHA_512 = "SCRAM-SHA-512"
1919
PLAIN = "PLAIN"
20+
GSSAPI = "GSSAPI"
2021

2122

2223
class SchemaField(BaseModel):
@@ -135,6 +136,10 @@ class KafkaConnectionParams(BaseModel):
135136
username: Optional[str] = Field(default=None)
136137
password: Optional[str] = Field(default=None)
137138
root_ca: Optional[str] = Field(default=None)
139+
kerberos_service_name: Optional[str] = Field(default=None)
140+
kerberos_keytab: Optional[str] = Field(default=None)
141+
kerberos_realm: Optional[str] = Field(default=None)
142+
kerberos_config: Optional[str] = Field(default=None)
138143
skip_auth: bool = Field(default=False)
139144

140145
@model_validator(mode="before")

tests/test_pipeline.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def test_create_success(self, pipeline, mock_success):
2121
mock_request.assert_called_once_with(
2222
"POST",
2323
pipeline.ENDPOINT,
24-
json=pipeline.config.model_dump(mode="json", by_alias=True),
24+
json=pipeline.config.model_dump(
25+
mode="json", by_alias=True, exclude_none=True
26+
),
2527
)
2628
assert result == pipeline
2729
assert pipeline.status == models.PipelineStatus.CREATED
@@ -325,7 +327,7 @@ def test_from_json(self, pipeline):
325327
def test_to_dict(self, pipeline):
326328
"""Test pipeline to dictionary."""
327329
assert pipeline.to_dict() == pipeline.config.model_dump(
328-
mode="json", by_alias=True
330+
mode="json", by_alias=True, exclude_none=True
329331
)
330332

331333
pipeline = Pipeline(host="http://localhost:8080", pipeline_id="test-pipeline")

0 commit comments

Comments
 (0)