-
Notifications
You must be signed in to change notification settings - Fork 49
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
Adapting attested_tls example #1017
Comments
@jxyang will follow up with you to investigate. |
Just curious, did you sign or package your application using a newly generated private key? That will modify the MRSIGNER and cause the You can find the MRSIGNER of your signed or packaged application with:
The MRSIGNED value needs to be plugged in here:
|
Thanks @jxyang for your quick reply, I am in the testing part, I just include the client part in the example inside my code, comment in the example the client part, and just build & run the server inside OE, get the MRSIGNER generated with make in OE, copy inside my app for build the |
@jxyang if you want to reply my case, you can follow the next steps:
That should give the same error |
Or if you thing I am missing any step let me know |
@stdevMac The attest_tls example uses mutual attestation. The error message indicates the server (the executable based on OE) rejected the attestation report from the client (the app running with Mystikos), but seems the attestation of the other direction succeeded. That implies the manual steps of obtaining/copying MRSIGNER from the OE app work as expected. BTW, the sample's Makefile shows how to automate this error-prone process. I will try to repro with your application later. Thanks for the instructions. |
We have not forgotten about this and will get back to you when we have a change to look at this. We are currently busy trying to get a new release out so all of the devs are busy until the end of the month. |
Hi @stdevMac , I finally get time to run your application. It takes a long time to run appbuilder, mostly spent in building grpc. But eventually, step 10 failed with this error:
Alternatively we can get more print outs from the failing OE app by replacing fprintf with printf on the lines like here. From your description, I think you did everything correctly, and there is no reason to fail. Hopefully more messages will give us more hint to debug. |
Hello guys, thanks for all your replies! @vtikoo I am running this test on the exact same machine, without any connection with any other machine. Thanks, @paulcallen For your response! @jxyang Yeah, It takes a lot of time to build, sorry for that! the error you are getting is a little weird, if you run I am going to try to build from scratch Mystikos and see which log we get. Guys, I really appreciate your quick reply and all the work you are doing here, thanks for your support, I think we are close to solving an important problem thanks to all your previous work here!! Thanks!!! |
I will come in a few hours with my log or any other error I could get building Mystikos, we really need this functionality finished |
Hello guys, I have tried several ways, but still at the end getting the same error sadly. Do you have any idea about what error |
I believe -29312 is the mbedtls error https://tls.mbed.org/api/ssl_8h.html#ab82e0253b53fa62fab94b98ef9eb97f9 But the connection might be closed due to failure of hand shake, which doesn't tell us something we didn't know. |
@stdevMac I tried again, and still fail at step 10, albeit with a different error message:
Are you able to get more information with my suggestion above?
|
Is weird, let me check if everything is updated Yes, I get more details, but running with The important I think is:
|
@jxyang Sorry, I update the repo, you should not have any problem now |
I mean building the app |
Thanks @stdevMac . I am able to build silkworm rootfs now. My debugging shows the client prematurely closed the socket before the server gets a chance to verify the client credentials. That explains the error code -29312 ( On the client side, mbedtls didn't print the error until I run it inside myst-gdb. Here are the relevant error messages:
In case you are curious, error code -69 is |
The solution attested_tls uses Alpine Linux as the base image, and a musl-based mbedtls library, as shown in https://github.com/deislabs/mystikos/blob/main/solutions/attested_tls/app-dockerfile. You may want to try the solution with Ubuntu/glibc to confirm it still works. If it does, you could copy the code under attested_tls/app into your application as it was to isolate the causes of the failure. |
FYI I have converted attested_tls to be a Ubuntu app, and made some simplifications. It works. https://github.com/jxyang/mystikos/blob/attested_tls_ubuntu/solutions/attested_tls/Makefile |
mmm. Thanks @jxyang, cool the changes for running inside Ubuntu, I didn't notice that part, totally my bad. Maybe can be a difference between the library we are using for mbedtls inside C++ code....I am going to make some changes to that, what do you think? can this be the cause? |
Yes, I noticed that the mbedtls version included in your project is earlier than the one included in Mystikos. I think it would be a good idea to link your application with libmbedtls-dev rather than building it from source. |
@jxyang Effectively it was the error, I didn't reply earlier trying to send some info from one side to the other on the enclave. I am getting the next error:
The only change that I do is try to call the method Do you have any idea about the error I am getting? Thank you!!! The first one is solved, we were able to make attestation! Let's go for the next goal! |
@stdevMac Unfortunately this is a very generic error message. There could be multiple reasons behind it. Could you generate a STRACE and ETRACE for the execution? The command would be like:
|
Hey I manage to make it work, it was an error from my side building the message, thank you! |
I am glad it works for you now. @stdevMac |
Hi guys!
This time I am trying to adapt the attested_tls example into my application, but I continue getting this error:
OE
Client
Do you have any idea about what's happening there?
The text was updated successfully, but these errors were encountered: