Skip to content

Add TLS support for Go Feature Server#6229

Draft
shuchu wants to merge 4 commits intofeast-dev:masterfrom
shuchu:feat/issue-6095
Draft

Add TLS support for Go Feature Server#6229
shuchu wants to merge 4 commits intofeast-dev:masterfrom
shuchu:feat/issue-6095

Conversation

@shuchu
Copy link
Copy Markdown
Collaborator

@shuchu shuchu commented Apr 5, 2026

What this PR does / why we need it:

Add TLS support for users who have enterprise security requirement

Which issue(s) this PR fixes:

Fix #6095

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Misc


Open with Devin

shuchu added 2 commits April 5, 2026 19:51
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
@shuchu shuchu requested a review from a team as a code owner April 5, 2026 23:59
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 7 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 ServerStarter interface not updated with StartHttpsServer, breaking the established abstraction pattern

The ServerStarter interface at go/main.go:40-43 defines StartHttpServer and StartGrpcServer but the new StartHttpsServer method was not added to it. The method was added to RealServerStarter at go/main.go:51-53 but not to the interface. This breaks the established pattern where the interface enumerates all server start methods, and means MockServerStarter in go/main_test.go:13 cannot be used to test the HTTPS code path. While the concrete type is used in main() so the code runs correctly, the interface contract is incomplete.

(Refers to lines 40-43)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +343 to +346
if certFile == "" || keyFile == "" {
return fmt.Errorf("TLS_CERT_FILE and TLS_KEY_FILE must be set")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Error message and comment incorrectly reference environment variables instead of CLI flags

The comment at go/main.go:343 says "Requires TLS_CERT_FILE and TLS_KEY_FILE env vars" and the error at go/main.go:346 says "TLS_CERT_FILE and TLS_KEY_FILE must be set", but the actual parameters come from CLI flags --tls-cert-file and --tls-key-file (defined at go/main.go:80-81). This will confuse users who see the error: they'll look for environment variables to set rather than the correct CLI flags.

Suggested change
if certFile == "" || keyFile == "" {
return fmt.Errorf("TLS_CERT_FILE and TLS_KEY_FILE must be set")
}
// StartHttpsServer starts HTTP server with TLS. Requires --tls-cert-file and --tls-key-file flags.
func StartHttpsServer(fs *feast.FeatureStore, host string, port int, metricsPort int, certFile string, keyFile string, writeLoggedFeaturesCallback logging.OfflineStoreWriteCallback, loggingOpts *logging.LoggingOptions) error {
if certFile == "" || keyFile == "" {
return fmt.Errorf("--tls-cert-file and --tls-key-file must be provided")
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@shuchu shuchu marked this pull request as draft April 6, 2026 00:36
Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add TLS configuration support to Go feature server

1 participant