-
Notifications
You must be signed in to change notification settings - Fork 2
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
Usage examples? #13
Comments
Dear @hugusmaximus, thanks for your interest. Does #16 satisfy your needs, or is there something unclear / missing? Indeed, this project is vastly underdocumented, and currently build around a specific use-case (where we use a wildcard certificate from let's encrypt, and store that certificate in DNS). If you have a different use-case / a favourite way to pass your X.509 certificate, please let us know. We could also revise/adapt this project to e.g. provision and store the X.509 certificate directly with let's encrypt (but we'll need a DNS server with dynamic updates since wildcard certificates are only available via the DNS challenge). |
Definitely yes, this satisfy my needs. Thanks a lot! Anyway, I would add few more bytes of text explaining what "solo5-hvt" is (I had to google it...) may be with a link to this "hypervisor middleware ??". |
I think this is slightly deeper, to avoid re-iteration of documentation (how to deploy a MirageOS unikernel), we should centralise this somewhere (including network configuration, ...) -- i.e. finally get this operator documentation / book out.
Yes, so the extension is indicating the target -- being it hvt (KVM), spt (seccomp), virtio, xen, or no ending (unix executable). From a security perspective, I still prefer KVM (due to attack surface).
A MirageOS unikernel does not have access to the file system (in the general case) -- and together with the goal of providing generic reporoducible builds (i.e. shipping the identical binary to all customers), we need some way to push the certificate to the unikernel. Using a file and including it in the unikernel binary is the old way, but contradicts the generic reproducible builds concept. Another path could be to use a block device of the certificate chain & private key - maybe loosening the requirements to be sector-aligned (or pre-process the files appending comment markers). But then the update process (certificate renewal) will be slighlty cumbersome [something needs to update the files, and the unikernel needs to reload them]. But I think this is doable, and would be an easy way to load the certificates. From my viewpoint, we developed DNS services and a let's encrypt client, and just use DNS as a key-value store with the certificates present. While this is suitable if all you want is MirageOS unikernels on your domain, it may be inconvenient for a migration from legacy systems to MirageOS unikernels. I think I understand your requirements, but will need some time to provide a suitable solution. Thanks for the discussion. |
Sure, I'm just trying on a standard Linux box to test usability. My (mid-term) intention is to run it virtualized on top of seL4. Not sure if this is possible as have no idea if MirageOS is using GICv2 or GICv3 and if anyone ever tried this... but if it can run on seL4 it will run on seL4, which is formally verified (so attack surface is the smaller possible, moreover if seL4 runs on bare metal).
Ok, this is exactly was I was looking for, just embedding the certs at compile time...
Yes, I understand your point of view, and it makes sense on environments where you want generic reproducible concept. But it makes this software dependent on "third party" solutions (such dns servers...). I like more the concept of just a binary with everything it requires built in, but of course, this is just a personal opinion and I get the value of reproducible builds.
How much it takes this unikernel to boot...? If you use some block device maybe you can make it load the certs only at boot time. Whenever a reload of certs is required just reboot the unikernel. If you make it at compile time (my preferred option) then you just need to recompile the binary. To me this is not a problem, I'm from the old school and used to compile custom Linux Kernels on very old hardware... so an unikernel looks like an amazingly fast compilation to me and certs only change once a year and is a single server, not a distributed environment (where DNS option looks very clever). I have no idea what will be best option, but I think the easier you make it possible, the wider audience you will reach. Still you will have the option of DNS deployment, but I bet many people would love to just load certificates in some trivial way, either at compile time either from a block device... whatever.
That's it...
My pleasure. |
I created a branch named "mirage-kv" on this repository for exactly this use-case. You have to put your server.pem (certificate chain) and server.key (private key) in the Let me know if this is useful for you, or if you struggle with getting it to work. Thanks. This is not merged into the main branch, that will take some more thoughts (enabling multiple use cases).
It boots in milliseconds. The underlying issue are potentially active connections that are then dropped (in the current state of MirageOS without notifying the other side(s)). |
Wow... thanks a lot! I'll give a try ASAP and will come back with feedback! |
I tried to compile the new branch but I got:
|
could you try, as written in the mirage docs, https://mirage.io/docs/hello-world, a "make depend" after your configure (or a "mirage configure" followed by "make")? |
Ops... I'm really sorry. I was asleep for too long and missed the "make depend". Yes, it compiles perfectly.
not sure what the program expects as I can't see any command line argument option to solve this nor in the usage example... may this issue be specific to the unix build? |
there's a default value for the configuration store, which is named "disk.img". A |
Yes, now it doesn't complain anymore about "disk.img", but I get a bind() error:
I manually checked I can bind to this address:
I tried with different interfaces/IPs but I got the same error, so, I'm lost here... |
Thanks for testing, and sorry that you encounter these issues. Since a The EADDRNOTAVAIL is an exception raised by the call to You can also not specify But have a try for |
It's working!
I was setting a wrong private address. I have been able to run the tlstunnel and to add, remove and list routes and also to test with a real environment (backend web server). It is wonderful. I'm just getting this error some times:
if you are interested I can try to debug. The config utility works fine, anyway, maybe some static file loaded at compile time (same as certificates) would make it even easier to use. Overall, I'm pretty happy with the result. I'm going to stress it a bit to check how it behaves under load. |
Great that it works for you!
That's likely rather innocent -> when a write() fails, this may (currently) result in the file descriptor being closed -- while still there's a read ongoing. There's some ongoing work to revise the "FLOW close" API (starting at mirage/mirage-flow#48, with documentation in mirage/mirage-flow#49 and mirage/mirage-flow#51). Then, on the TLS layer there's mirleft/ocaml-tls#485 and also work in progress to include shutdown (and at the same time have a stable semantics for close and whether the underlying TCP FLOW is closed as well -- see mirleft/ocaml-tls#488). I hope to have these changes finalized and merged and released before the end of this month.
And here, similar to our previous discussion about TLS certificates, my point is that clearly you can "simplify" this unikernel by avoiding (a) block device (b) any management channel and just hardcode the |
I wonder if it would be possible to have some documentation about usage examples (beyond the "tlstunnel --help").
This software looks wonderful. Would be nice to have some doc on how to use it. Even (general public) early adopters need some help.... :-)
The text was updated successfully, but these errors were encountered: