Skip to content

fix(server): clarify loopback auth warning#332

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-serve-loopback-auth-warning
Open

fix(server): clarify loopback auth warning#332
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-serve-loopback-auth-warning

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#49784.

Summary

  • Parse the listen address before emitting disabled-auth warnings.
  • Use a local-only exposure warning for loopback binds such as 127.0.0.1 and ::1.
  • Keep the existing network-wide warning for non-loopback binds such as 0.0.0.0.
  • Add regression coverage for loopback and network bind warning text.

Validation

  • cargo +1.90.0 fmt --package cortex-app-server --check
  • git diff --check

Targeted cargo +1.90.0 test -p cortex-app-server test_auth_disabled_exposure_warning_for_loopback_and_network_binds -- --nocapture is blocked in this Windows/MSVC environment before crate tests run by the existing aws-lc-sys C build failure.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG][v0.0.7] cortex serve on default 127.0.0.1 prints misleading warning: "Anyone on the network can access this server."

1 participant