Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
03d37f24
Unverified
Commit
03d37f24
authored
Mar 15, 2024
by
Dan Clark
Committed by
GitHub
Mar 15, 2024
Browse files
[Fix] Add args for mTLS support (#3430)
Co-authored-by:
declark1
<
daniel.clark@ibm.com
>
parent
a7c87168
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
vllm/entrypoints/api_server.py
vllm/entrypoints/api_server.py
+7
-4
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+14
-1
No files found.
vllm/entrypoints/api_server.py
View file @
03d37f24
...
...
@@ -8,6 +8,7 @@ change `vllm/entrypoints/openai/api_server.py` instead.
import
argparse
import
json
import
ssl
from
typing
import
AsyncGenerator
from
fastapi
import
FastAPI
,
Request
...
...
@@ -86,10 +87,12 @@ if __name__ == "__main__":
type
=
str
,
default
=
None
,
help
=
"The CA certificates file"
)
parser
.
add_argument
(
"--ssl-cert-reqs"
,
parser
.
add_argument
(
"--ssl-cert-reqs"
,
type
=
int
,
default
=
0
,
help
=
"Whether client certificate is required"
)
default
=
int
(
ssl
.
CERT_NONE
),
help
=
"Whether client certificate is required (see stdlib ssl module's)"
)
parser
.
add_argument
(
"--root-path"
,
type
=
str
,
...
...
vllm/entrypoints/openai/api_server.py
View file @
03d37f24
...
...
@@ -5,6 +5,7 @@ from contextlib import asynccontextmanager
import
os
import
importlib
import
inspect
import
ssl
from
prometheus_client
import
make_asgi_app
import
fastapi
...
...
@@ -124,6 +125,16 @@ def parse_args():
type
=
str
,
default
=
None
,
help
=
"The file path to the SSL cert file"
)
parser
.
add_argument
(
"--ssl-ca-certs"
,
type
=
str
,
default
=
None
,
help
=
"The CA certificates file"
)
parser
.
add_argument
(
"--ssl-cert-reqs"
,
type
=
int
,
default
=
int
(
ssl
.
CERT_NONE
),
help
=
"Whether client certificate is required (see stdlib ssl module's)"
)
parser
.
add_argument
(
"--root-path"
,
type
=
str
,
...
...
@@ -262,4 +273,6 @@ if __name__ == "__main__":
log_level
=
args
.
uvicorn_log_level
,
timeout_keep_alive
=
TIMEOUT_KEEP_ALIVE
,
ssl_keyfile
=
args
.
ssl_keyfile
,
ssl_certfile
=
args
.
ssl_certfile
)
ssl_certfile
=
args
.
ssl_certfile
,
ssl_ca_certs
=
args
.
ssl_ca_certs
,
ssl_cert_reqs
=
args
.
ssl_cert_reqs
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment