First Check
Commit to Help
Example Code
@app.get("/")
async def get_root(request:Request):
# how do I obtain the DN from the SSL client cert?
return "hello"
Description
uvicorn provides the SSL front end and manages client certificates, i.e.
uvicorn.run(
"main:app", host="0.0.0.0", port=8443,
ssl_cert_reqs=2,
ssl_ca_cert="/path/to/certs.cert",
ssl_keyfile="/path/to/keyfile",
ssl_certfile="/path/to/certfile"
)
But there appears to be no way to extract the Distinguised Name from the client certifcate within FastAPI, which I assume means uvicorn does not pass it.
Operating System
Linux
Operating System Details
Ubuntu, but any.
FastAPI Version
0.79.0
Python Version
3.7
Additional Context
uvicorn 0.18.2.
First Check
Commit to Help
Example Code
Description
uvicorn provides the SSL front end and manages client certificates, i.e.
But there appears to be no way to extract the Distinguised Name from the client certifcate within FastAPI, which I assume means uvicorn does not pass it.
Operating System
Linux
Operating System Details
Ubuntu, but any.
FastAPI Version
0.79.0
Python Version
3.7
Additional Context
uvicorn 0.18.2.