GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Adding TLS support for offline server. by lokeshrangineni · Pull Request #4744 · feast-dev/feast

feat: Adding TLS support for offline server. #4744

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.

Sign up for GitHub

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

Merged
dmartinol merged 6 commits into feast-dev:master from lokeshrangineni:feature/tls-offline-server
Nov 8, 2024

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat: Adding TLS support for offline server. #4744

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit Hold shift + click to select a range
b090e86
* Adding TLS support for offline server.
lokeshrangineni Nov 6, 2024
dd9dca0
* Fixing the lint error and also integration tests.
lokeshrangineni Nov 7, 2024
f92d26b
* Added documentation for the offline server and moved to how to guide.
lokeshrangineni Nov 7, 2024
033e065
* Added documentation for the offline server and moved to how to guide.
lokeshrangineni Nov 7, 2024
c60c07a
* fixing the integration test by adding extra flag verify_client
lokeshrangineni Nov 7, 2024
0f9dc98
* Adding alias names for the host in self-signed certificate.
lokeshrangineni Nov 7, 2024
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
* Adding alias names for the host in self-signed certificate.
Signed-off-by: lrangine <[email protected]>
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@lokeshrangineni
lokeshrangineni committed Nov 7, 2024
commit 0f9dc98c38066f7e72e905554447a84e1d5c6b4f

There are no files selected for viewing

13 changes: 7 additions & 6 deletions 13 sdk/python/feast/infra/offline_stores/remote.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,23 @@ def build_arrow_flight_client(
scheme: str, host: str, port, auth_config: AuthConfig, cert: str = ""
):
arrow_scheme = "grpc+tcp"
if scheme == "https":
if cert:
logger.info(
"Scheme is https so going to connect offline server in SSL(TLS) mode."
)
arrow_scheme = "grpc+tls"

if auth_config.type != AuthType.NONE.value:
middlewares = [FlightAuthInterceptorFactory(auth_config)]
return FeastFlightClient(
f"{arrow_scheme}://{host}:{port}", middleware=middlewares
)
kwargs = {}
if cert:
with open(cert, "rb") as root_certs:
kwargs["tls_root_certs"] = root_certs.read()

if auth_config.type != AuthType.NONE.value:
middlewares = [FlightAuthInterceptorFactory(auth_config)]
return FeastFlightClient(
f"{arrow_scheme}://{host}:{port}", middleware=middlewares, **kwargs
)

return FeastFlightClient(f"{arrow_scheme}://{host}:{port}", **kwargs)


Expand Down
14 changes: 10 additions & 4 deletions 14 sdk/python/tests/utils/generate_self_signed_certifcate_util.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ipaddress
import logging
from datetime import datetime, timedelta

Expand Down Expand Up @@ -36,6 +37,14 @@ def generate_self_signed_cert(
]
)

# Define the certificate's Subject Alternative Names (SANs)
alt_names = [
x509.DNSName("localhost"), # Hostname
x509.IPAddress(ipaddress.IPv4Address("127.0.0.1")), # Localhost IP
x509.IPAddress(ipaddress.IPv4Address("0.0.0.0")), # Bind-all IP (optional)
]
san = x509.SubjectAlternativeName(alt_names)

certificate = (
x509.CertificateBuilder()
.subject_name(subject)
Expand All @@ -47,10 +56,7 @@ def generate_self_signed_cert(
# Certificate valid for 1 year
datetime.utcnow() + timedelta(days=365)
)
.add_extension(
x509.SubjectAlternativeName([x509.DNSName(common_name)]),
critical=False,
)
.add_extension(san, critical=False)
.sign(key, hashes.SHA256(), default_backend())
)

Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.