-
Notifications
You must be signed in to change notification settings - Fork 331
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.
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
feat: Support basic auth #3061
feat: Support basic auth #3061
Conversation
src/phoenix/server/main.py
Outdated
@@ -189,6 +189,7 @@ def _get_pid_file() -> Path: | |||
|
|||
# If the host is "::", the convention is to bind to all interfaces. However, uvicorn | |||
# does not support this directly unless the host is set to None. | |||
display_host = host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anticorrelator this was broken I think
const graphQLPath = | ||
`${window.location.protocol}//${window.location.host}${getSanitizedPath(window.Config.basename)}` + | ||
"/graphql"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed because basic auth comes in as http://{user}:{pass}asdfas.com but this needs to be stripped from the graphQL path
src/phoenix/server/main.py
Outdated
display_host = host | ||
if ":" in host: | ||
# format IPv6 hosts in brackets | ||
display_host = f"[{host}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was mypy
not catching this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are merging without checking CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be.
@@ -250,7 +251,7 @@ def _get_pid_file() -> Path: | |||
initial_spans=fixture_spans, | |||
initial_evaluations=fixture_evals, | |||
) | |||
server = Server(config=Config(app, host=host, port=port)) | |||
server = Server(config=Config(app, host=host, port=port)) # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed an issue @anticorrelator - this seems strange to force a none type in here: #3062
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the context behind this solution that Dustin had found: encode/uvicorn#1529 (reply in thread)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anticorrelator could we add a comment linking this issue?
* feat: add the ability to use basic auth * mypy * force fix
Changes the url for graphql so that basic auth can be properly initialized