Skip to content

Commit 8320e23

Browse files
feat: Removing the tls_verify_client flag from feast cli for offline server. (feast-dev#4842)
* Removing the tls_verify_client flag for offline server from feast application code. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> * fixing lint errors. formatted the code. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --------- Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com>
1 parent 88a92cf commit 8320e23

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

sdk/python/feast/cli.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -1133,23 +1133,13 @@ def serve_registry_command(
11331133
show_default=False,
11341134
help="path to TLS certificate public key. You need to pass --key as well to start server in TLS mode",
11351135
)
1136-
@click.option(
1137-
"--verify_client",
1138-
"-v",
1139-
"tls_verify_client",
1140-
type=click.BOOL,
1141-
default="True",
1142-
show_default=True,
1143-
help="Verify the client or not for the TLS client certificate.",
1144-
)
11451136
@click.pass_context
11461137
def serve_offline_command(
11471138
ctx: click.Context,
11481139
host: str,
11491140
port: int,
11501141
tls_key_path: str,
11511142
tls_cert_path: str,
1152-
tls_verify_client: bool,
11531143
):
11541144
"""Start a remote server locally on a given host, port."""
11551145
if (tls_key_path and not tls_cert_path) or (not tls_key_path and tls_cert_path):
@@ -1158,7 +1148,7 @@ def serve_offline_command(
11581148
)
11591149
store = create_feature_store(ctx)
11601150

1161-
store.serve_offline(host, port, tls_key_path, tls_cert_path, tls_verify_client)
1151+
store.serve_offline(host, port, tls_key_path, tls_cert_path)
11621152

11631153

11641154
@cli.command("validate")

sdk/python/feast/feature_store.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1964,14 +1964,11 @@ def serve_offline(
19641964
port: int,
19651965
tls_key_path: str = "",
19661966
tls_cert_path: str = "",
1967-
tls_verify_client: bool = True,
19681967
) -> None:
19691968
"""Start offline server locally on a given port."""
19701969
from feast import offline_server
19711970

1972-
offline_server.start_server(
1973-
self, host, port, tls_key_path, tls_cert_path, tls_verify_client
1974-
)
1971+
offline_server.start_server(self, host, port, tls_key_path, tls_cert_path)
19751972

19761973
def serve_transformations(self, port: int) -> None:
19771974
"""Start the feature transformation server locally on a given port."""

sdk/python/feast/offline_server.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def __init__(
4545
location: str,
4646
host: str = "localhost",
4747
tls_certificates: List = [],
48-
verify_client=False,
4948
**kwargs,
5049
):
5150
super(OfflineServer, self).__init__(
@@ -54,7 +53,7 @@ def __init__(
5453
str_to_auth_manager_type(store.config.auth_config.type)
5554
),
5655
tls_certificates=tls_certificates,
57-
verify_client=verify_client,
56+
verify_client=False, # this is needed for when we don't need mTLS
5857
**kwargs,
5958
)
6059
self._location = location
@@ -568,7 +567,6 @@ def start_server(
568567
port: int,
569568
tls_key_path: str = "",
570569
tls_cert_path: str = "",
571-
tls_verify_client: bool = True,
572570
):
573571
_init_auth_manager(store)
574572

@@ -591,7 +589,6 @@ def start_server(
591589
location=location,
592590
host=host,
593591
tls_certificates=tls_certificates,
594-
verify_client=tls_verify_client,
595592
)
596593
try:
597594
logger.info(f"Offline store server serving at: {location}")

sdk/python/tests/integration/feature_repos/universal/data_sources/file.py

-3
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ def setup(self, registry: RegistryConfig):
452452
str(tls_key_path),
453453
"--cert",
454454
str(self.tls_cert_path),
455-
# This is needed for the self-signed certificate, disabled verify_client for integration tests.
456-
"--verify_client",
457-
str(False),
458455
]
459456
self.proc = subprocess.Popen(
460457
cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL

0 commit comments

Comments
 (0)