-
Notifications
You must be signed in to change notification settings - Fork 28
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
Make attest-server a flask app #166
Conversation
Multiple changes; - The python implementation is converted to a Flask app. - The attestation API is altered. There remains a single input tarball and single output tarball, but rather than the request body _being_ the input tarball, we now expect an HTTP POST request encoded in conventional form (multipart/form-data) that includes a field called "quote" containing the input tarball (a source filename attribute is expected). I.e. the encoded form should contain a section like; Content-Disposition: form-data; name="quote"; filename="whatever" To use from 'curl', you would; curl -X -POST -F quote=@"mytarball.tar" <URL> whereas previously you would have been using; curl -X -POST --data-binary @"mytarball.tar" <URL> - sbin/tpm2-attest (i.e. the client) is adjusted in the manner described in the previous point. - The extra required package (python3-flask) is added to the "requirements" target of the top-level Makefile. Signed-off-by: Geoff Thorpe <geoffrey@twosigma.com>
If the client's EK isn't enrolled, it manifests as an obscure failure to open a directory. This changes it to catch the unenrolled-EK case and report it as such. Signed-off-by: Geoff Thorpe <geoffrey@twosigma.com>
Signed-off-by: Geoff Thorpe <geoffrey@twosigma.com>
Signed-off-by: Geoff Thorpe <geoffrey@twosigma.com>
tries=0 | ||
mypath=${tmp}/socket | ||
|
||
# swtpm --daemon exits immediately, which can be too soon. |
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.
swtpm --daemon
should be fixed in new releases. Did you also want to update the submodules?
PCR list, Eventlog and other details. It performs three actions: | ||
This is a python flask server implementing a single API end-point on /, which | ||
expects a POST request encoded in conventional form (multipart/form-data) that | ||
includes a field called "quote" containing an input tarball (a source filename |
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.
Should we remove the tar file entirely and instead post the individual components as named form fields?
I've started a separate tree to split the attestation code out from the safeboot code (#167 ) and based the initial version on the Flask version from this PR. https://github.com/osresearch/safeboot-attest |
Signed-off-by: Geoff Thorpe <geoffrey@twosigma.com>
13958a8 sbin/attest-server: respect BINDIR for sbin paths
0aaad58 sbin/attest-enroll: locally, use unix sockets, not TCP
8665580 sbin/attest-verify: better error-handling
f06a165 sbin/attest-server: convert to a Flask app/API
8648640 gencert: Support use of OpenSSL for cert issuance