THE BASE - FOSS Confidential Container SDK to ease the development
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 542 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/61464 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 2023314 / 542
2
5
10
14
15
16
22
24
27
29
31
36
43
48
56
63
74
78
83
87
89
95
96
99
104
106
107
117
119
121
122
125
126
128
130
132
134
135
136
141
143
146
148
152
155
157
159
161
165
166
168
170
173
176
180
181
185
191
194
196
197
198
199
206
207
209
210
211
212
216
219
220
227
228
229
231
232
233
236
250
252
256
258
260
263
264
267
271
273
275
276
278
282
286
292
293
298
299
300
302
312
316
321
322
324
339
341
342
343
344
351
352
354
355
356
357
359
369
370
372
373
376
378
379
380
382
383
387
390
394
395
401
405
406
410
411
413
415
416
421
426
430
437
438
440
441
443
444
445
446
448
449
450
451
458
464
468
472
475
476
479
481
493
494
498
499
502
509
513
516
517
520
522
524
525
531
534
535
537
538
541
00:00
Open sourceSoftware developerProjective planeCloud computingCartesian coordinate systemSuite (music)Computer
00:36
Goodness of fitComputerInformation securitySocial classCartesian coordinate systemOpen setProduct (business)ExistenceProjective planeInclined planeDefault (computer science)Point cloud
01:42
Point cloudPoint cloudLogicCloud computingField (computer science)PurchasingPresentation of a group2 (number)NeuroinformatikUsabilityMultiplication signLeakEncryptionCartesian coordinate systemEvoluteDefault (computer science)JSONComputer animation
03:11
Key (cryptography)CodeData integrityProcess (computing)Read-only memoryInternet service providerPoint cloudSystem administratorComputer networkInformation securityEncryptionNetzwerkschichtOrder (biology)Black boxMechanism designRun time (program lifecycle phase)Group actionSoftwareCloud computingCartesian coordinate systemVirtualizationRight anglePoint cloudWorkloadData structureArmRevision controlCuboidGene clusterEncryptionMobile appComputer animation
04:51
Point cloudRun time (program lifecycle phase)Semiconductor memoryEncryptionWorkloadJSONComputer animation
05:17
Key (cryptography)BefehlsprozessorComputer hardwareFunction (mathematics)AdditionEncryptionDynamic random-access memoryPhysical systemComputer programBootingRead-only memoryOpcodeResource allocationData storage deviceBuildingStructural loadComputer fileInclusion mapPublic key certificateFormal verificationOperations researchBinary codeCryptographyCommunications protocolRight angleExplosionCodeSign (mathematics)MeasurementTransport Layer SecurityIdentity managementPoint cloudSign (mathematics)Sound effectDependent and independent variablesBitLevel (video gaming)Software bugWorkstation <Musikinstrument>Integrated development environmentNeuroinformatikMultiplication signMemory managementDisk read-and-write headLogic gatePasswordRule of inferenceMedical imagingMachine visionInsertion lossData storage deviceInformation securitySpectrum (functional analysis)Extension (kinesiology)Process (computing)View (database)Remote procedure callKey (cryptography)Operator (mathematics)Point (geometry)NumberReverse engineeringWorkloadState observerSlide ruleData centerCellular automatonData integritySemiconductor memoryCartesian coordinate systemExecution unitSoftware testingComputer hardwareAdditionCiphertextMathematicsArithmetic meanCASE <Informatik>Axiom of choiceTerm (mathematics)SpacetimeEncryptionBasis <Mathematik>TheoryCryptographyBefehlsprozessorOperating systemProof theoryCommunications protocolBinary codeComputer fileAddress spaceInformationCoprocessorMinimal surfaceOrder (biology)Computer animation
11:51
Point cloudMereologyTheoryBitComputer hardwareCartesian coordinate systemBuildingComputer animation
12:38
Computer hardwareIntelBefehlsprozessorExtension (kinesiology)Information securityMultiplication sign
13:09
Cartesian coordinate systemServer (computing)Strategy gameComputer architectureBefehlsprozessorLine (geometry)Electric generator
14:03
IRIS-TProjective plane2 (number)Server (computing)BitGoodness of fitCore dumpVirtual machineMultilaterationPoint cloudConfiguration spaceOpen source40 (number)Service (economics)Different (Kate Ryan album)Local ringRow (database)Stack (abstract data type)
15:40
Device driverGamma functionFilm editingDevice driverExecution unitOperating systemDampingWordConfiguration spaceFlow separationSoftware repositoryIntegrated development environmentKernel (computing)
16:27
CuboidDevice driverOcean currentStreaming mediaPoint (geometry)Goodness of fitComputer animation
17:04
Vapor barrierDevice driverOpen source
17:29
Series (mathematics)Keyboard shortcutImplementationPhysical systemString (computer science)Operator (mathematics)Electronic visual displayDevice driverFunctional (mathematics)Operating systemBitRight angleOrder (biology)Configuration spaceVirtual machinePoint cloudCartesian coordinate systemComputer hardwareComputer animationXMLUML
19:31
Software development kitJava appletArmPurchasingCodeComputer hardwareProgramming languageOpen sourceDifferent (Kate Ryan album)Cartesian coordinate systemDampingReplication (computing)Functional (mathematics)Source codeJSONComputer animation
20:26
Mobile appBinary codeSpacetimeCartesian coordinate systemOpen sourceDampingNormal (geometry)CompilerPhysical systemLibrary (computing)Functional (mathematics)CryptographySign (mathematics)CodeOperator (mathematics)CASE <Informatik>Product (business)Automatic differentiationProjective planeInsertion lossBoss CorporationLimit (category theory)Arithmetic meanOperating systemStructural loadTraffic reportingSound effectSystem callBit rateComputer animation
22:39
Open sourceCartesian coordinate systemStandard deviationLimit (category theory)Projective planeWave packetProduct (business)Software developerFunctional (mathematics)Group actionOpen set
23:17
Demo (music)Group actionVideoconferencingOpen sourceComputer-generated imageryMobile appWordStructural loadCartesian coordinate systemOpen sourceKeyboard shortcutMilitary baseBitDemo (music)Internet der DingeService-oriented architectureStandard deviationSoftware repositoryAnalytic setPower (physics)Branch (computer science)Cloud computingProjective planeSoftware developerMedical imagingProcess (computing)Order (biology)DatabaseBasis <Mathematik>Information securityPlastikkarteBuildingSocial classMultiplication signInclined planeWordComputer animation
26:44
Data managementUsabilityTemplate (C++)Library (computing)Open sourceExecution unitKey (cryptography)Computer fileMultiplication signProjective planeNumerical digitData managementCartesian coordinate systemSpacetimeExtension (kinesiology)Hacker (term)Software developerComputing platformTemplate (C++)
28:07
Server (computing)Basis <Mathematik>Open sourceProjective planeLink (knot theory)Functional (mathematics)Cartesian coordinate systemXML
28:56
WorkloadOpen sourceCartesian coordinate systemMultiplication signProjective planePoint cloudOrder (biology)Functional (mathematics)Moment (mathematics)Configuration spaceIntegrated development environmentCloud computingDatabaseService (economics)ComputerWhiteboardInternet service provider
29:55
Element (mathematics)Point cloudMultiplication signProgram flowchart
Transcript: English(auto-generated)
00:06
Hi, I'm Sebastian, co-founder and CTO at Enclave and our mission is to make confidential cloud computing as simple as possible. This is also the subject of this talk.
00:21
It's about an open source project that we call the base and where we help the community to simplify the development of Enclave applications. So in this talk, I will bring you on a journey, somehow also with our journey,
00:45
where we first of all had to explore how to bring Enclave into existing products applications. So here comes the disclaimer. This talk is about lessons learned and in particular about a lot of pains that we discover.
01:06
And we hope that from our lessons, we can help the community to just find a much smoother way to develop confidential compute applications. So speaking of that, I think the main motivation why we started the whole project is we believe the cloud is super cool and the future is cloud.
01:33
So effectively everybody will develop in future applications in the cloud. But as a security guy, I also know that by default the cloud sees all the data, the application
01:48
codes, which is in particular critical for a lot of businesses because the business logic is leaked and so on. And that's somehow motivated the whole field of confidential cloud computing.
02:07
So people started to think already a long time ago, like decades ago, with approaches like fully monomorphic encryption or multiplayer party computation, how to compute in an encrypted way.
02:27
And confidential cloud computing is like the evolution of those ideas with applications to the cloud. And in particular to solving the problems that a cloud leaks by default.
02:45
So here comes another disclaimer. So whatever I'm now going to talk about relates to Intel SGX-based acclimation technology. There are also other approaches, most notably by AMD Ceph.
03:02
But for ease of use and presentation, this talk is related rather to Intel SGX approaches. So what is confidential cloud computing? It's quite easily explained. It's the idea of turning your workloads into enclaved workloads.
03:24
So the nice thing is, for example, if you have VM running with your Docker apps or Kubernetes cluster, you can, with this new concept, turn those applications, clusters, containers, into applications that run in a black box.
03:45
And by black box, we really mean through encryption mechanisms, the ability that even at runtime, your application, your data, your workloads is black box shielded, vaulted from the infrastructure.
04:06
And this is somehow cool because, as mentioned, it solves a lot of problems that we have right now with cloud applications. In particular, keep in mind that the cloud is designed in such a way that it shares resources.
04:21
And the only way how the resources are shared are through virtualization, and virtualization is with a hypervisor, rather implementing a soft software-based isolation mechanism. With enclave technology, we finally can use strong cryptographic mechanisms, which are based on well-studied cryptographic assumptions.
04:50
So let me just start with a short introduction, how the basic concepts work in order to give you a better feeling how those black boxes are designed.
05:04
And it's also an appetizer, what needs to be done whenever you want to develop those black boxes and put your workloads into enclaves. And I think that the main concept, which I personally find very revolutionary, is that runtime memory encryption.
05:26
Or you can now talk about data and use encryption or always encrypt it at any point in time. And this is possible thanks to an extension of existing CPUs. In particular, the extension in Intel-based CPU is called SGX.
05:51
You can think about that like a small security processor or an extension of the ideas of TPMs back in the days.
06:02
That gives the CPU additional cryptographic superpower to, among others, encrypt user space memory. This is called an enclave in terms of Intel SGX. And here the assumption is that the CPU is a trust anchor.
06:24
So we really assume that the CPU, who has, for example, the encryption-decryption keys, acts like a trusted anchor. And keys are not extractable from the hardware. This is the base assumption.
06:45
And with that help, you can just think about that whenever the memory management unit, for example, accesses some physical addresses. On the way, there is an encryption engine, typically the AES, that first of all allows to encrypt and decrypt those memory bits.
07:10
And another thing, which is somewhat related to the choice of the AES algorithm, is also
07:22
the fact that whatever now you write to memory is not only encrypted, but it's also authenticated. Meaning, for example, if someone alters the memory, changes the ciphertext, then of course this is detectable.
07:45
So integrity protection comes literally for free. And if you put that together and you assume that now with the CPU we have a trust anchor, something like a trusted third party inside our compute environment,
08:04
then another cool feature is remote attestation. Remote attestation is about now proving to a user, which, for example, has no access to the hardware, to the data center, to the cloud, that his workload runs in an enclave and no one has modified that.
08:30
And the way it is done is through a protocol called remote attestation. It's a bit like a challenge response protocol with the fact that the CPU acts like an auditor, like a trusted third party, that measures the enclave.
08:46
And on this basis issues and signs a report such that the user can easily verify that he deals now with an enclave that, for example, he has generated, he has signed, and he is now the cryptographic proof that no one has manipulated the workload.
09:17
And a last feature, which is quite innovative, and I really find cool, is key provisioning.
09:27
So an enclave is like any other application, first of all, called, that is somehow stored in the file system, which is loaded by the operating system. And of course, if we assume that anything is untrusted, except the CPU, then we, for example,
09:46
should think about that a malicious party has access to the binary and can, of course, manipulate it. So a very, very bad idea is to put any secrets, any passwords or whatever in that binary, simply because it may be reverse engineered.
10:11
And key provisioning is another protocol building on remote attestation that allows to provision all the secret
10:21
key material, all the environment variables, maybe passwords, secret keys for SSLTLS certificate, whatever you consider crucial. You can also think about, you know, adding additional files into the enclave, for example,
10:42
any documents, encrypted file systems, whatever you think is, as mentioned, worth to be protected. And secret key provisioning is a protocol that, first of all, allows the user to remotely attest
11:00
that he's now talking to an enclave and there is the application he knows he can trust. And before effectively starting the application, he can provision through a secure SSLTLS protected channel the secrets in order to parameterize, configure or maintain the application.
11:27
So this is like a live provisioning of secret information. And of course, it totally makes sense. And if, for example, your application is somewhere hosted by an untrusted environment, you just want to make sure that this environment has no access to your secrets.
11:49
So this is roughly the theory behind enclave technology. And now let's go on a mission or a journey, how one can get an application enclaved.
12:13
And this is also a bit part of our journey, because we started with a lot of approaches. And you can consider this
12:25
walkthrough a bit also, like, you know, and best practice advice, how I at least believe it's the easiest way to build enclave applications. So what kind of ingredients do you need? Of course, hardware. And as mentioned before, in this talk, it's all about
12:47
Intel SGX. So you definitely need a CPU, an Intel CPU, starting from Skylake onwards, that has been introduced around 2015. And this microarchitecture, for the very first time, contains the SGX security extensions.
13:11
So you might think, ah, maybe I have a laptop, you know, there's an Intel CPU inside, maybe it's not that old, so chances are high that you are lucky and your CPU supports that.
13:25
But I don't think that this is a good idea, because maybe you have read about that. The desktop line where SGX has been supported is now deprecated and stopped, simply because the SGX capabilities are strictly limited.
13:46
The enclave sizes that you can generate are, for example, too small for larger mainstream applications, and Intel has shifted strategy now towards server-based architecture.
14:04
So a good idea is, of course, to find a server blade which supports SGX, and here I think Ice Lake, and most notably in the recent introduction this year at Sapphire Rapids, it's like a better chance.
14:23
So these are high performance servers, you know, made for cloud applications, you know, with, I think, 48 cores or even more, I think Sapphire has even more cores. And the nice thing is that you can generate enclaves, I think, up to one terabyte.
14:47
The downside is that, of course, those machines are not so cheap, so they cost you roughly somewhere between 30 to 50k depending on what configuration you're interested in.
15:02
So this is already, you know, a small showstopper, I think, for someone who's just interested in, you know, developing, you know, small project at home, you know, contributing to open source projects, helping them, for example, to bring enclavation into their stack.
15:23
So later on, I'm gonna tell a bit how I think, I believe, one can bypass these huge investment costs for, you know, open source developments. So let's come to the second ingredient, second chapter. We definitely need drivers,
15:49
drivers that tell the operating system how to talk to the SGX units. So, of course, you can compile the drivers from scratch, you know, there's the GitHub repo where the drivers are available provided by Intel.
16:08
But this is also something I would recommend you from our experiences because there are a lot of configurations and you really need to know for what environment you want to compile the drivers and so on.
16:27
So there's a better idea. Simply use a Linux operating system that has kernel 5.11 onwards because the drivers have been upstreamed to the kernel, so they are ready to use.
16:48
So you literally have to do nothing. This is my advice. Yeah, and a good example is, for example, Ubuntu 22, which, you know, provides those drivers out of the box.
17:07
Yeah, so now we know, we have, you know, the requirements about hardware, we know that we need to install the drivers. So as an open source developer, the question is, so damn, how can I get the setup running? It sounds like, you know, a huge entry barrier.
17:30
And I think there is a nice shortcut to just, you know, get those two requirements implemented.
17:42
So one way I would, for example, to rent a bare metal machine and OVH, for example, offers the Advance One series, which is SGX enabled. So the functionality is available through the BIOS. So all you need is just to install an operating system with the matching drivers and my advice would be to just install Ubuntu 22.
18:12
Another approach is to have a look at the Azure cloud because Azure also offers confidential compute ready VMs.
18:24
So you can literally just book a VM, which is hourly charged. And yeah, so the operating system, the drivers are all in place. So you can literally start with development.
18:40
And here is a small disclaimer. So I have no strings attached neither to OVH or Azure. You know, I'm just putting that into the air simply because I know that finding the right hardware and that's the right prerequisites in order to implement NCLEX applications is not easy.
19:05
And this is something that, you know, we figure out something, an easier approach, at least what we believe. But there are, I guess, some other cloud providers, smaller and larger, that might offer you similar configurations.
19:25
Yeah. Cool. So now let's move on to the next ingredient. So if now the hardware prerequisites are met, we are now interested in implementing the software.
19:47
So we want now to enclave our code. I think a standard approach, and this is also historically motivated, is to use an SDK.
20:02
And there is an SDK provided by Intel, but a bunch of other open source projects, like Tclave, somehow maintained by the Apache Foundation or Conclave, offer SDKs in different programming languages.
20:26
This is definitely cool if you, for example, start developing your application from scratch or your application is small. Think about, for example, a small crypto wallet, which just needs a signing functionality you would like to put in an enclave.
20:45
I think this is a cool approach. But when you're in the situation that you have, for example, existing applications, applications the open source community has developed and maintains for decades, like a MariaDB or an Nginx X server,
21:04
I think this is not a good idea because this would require that you go into the code and you somehow rewrite it where necessary, taking the SGX functionality into account.
21:21
And here, my recommendation would be then to rather focus on existing lipos approaches. There are also a bunch of open source projects, for example, like the Grameen projects, Oclom or Mystikos, who develop lipos. Lipos is something like a user space library that emulates operating system functionality,
21:56
most notably syscalls. And the nice thing is that you actually do not need to rewrite the application and recompile it.
22:10
You can just load the binary into the enclave thanks to the lipos. The binary thinks that it runs like a normal application on top of the operating system,
22:28
but effectively it is within an enclave. This is the superpower of lipos approaches.
22:41
But those lipos approaches also have their limitations. I mean, they are open source projects, some of them are production ready, some are less, some are actively maintained, some are less, the standard situation of open source projects.
23:00
Of course, the functionality of this way is limited and they require some expertise and training. It's like any application or a development stack, you really need to understand what you do. So, what is the shortcut here? And that was also a bit the motivation of our work.
23:25
We developed and open sourced the base where we hope to give ready-to-use enclave application on a silver plate.
23:40
So, what is the base? 18 applications ranging from standard databases to backend technologies and also some applications, for example, Wordpress, Umami, which is an analytics tool, Mosquito like an IoT broker.
24:00
But the whole idea was that we ask ourselves, hey, what do I need typically on a daily basis as a developer? Definitely, you know, some of those applications. And why don't we just give those applications in enclave form?
24:22
So, in this project, for example, you find the Docker or Docker compose files, you can easily derive manifest files out of that for Kubernetes cluster or whatever cloud native tools you use on your daily basis. And simply use the recipes in order to enclave your cloud application.
24:45
And you don't really need to dive very much into the deepness of the underlying liposis, which we, for example, have already done just in order to save time and help you to just focus on the development of your applications
25:07
and not only in becoming a security engineer, understanding what do I need to do, how does it work to enclave it. We really just want to speed up the process and this way contribute to the fact that
25:25
enclavation technology becomes the next standard. So, the project comes with documentation, a lot of examples, how you, for example, can customize your enclaves and applications.
25:42
Some of those repos also have demo branches where, for example, created some kind of attacks showcasing the power of enclave application versus non-enclave. Some repos also have some demo videos, for example, if you first of all want to check out how SGX can help your application
26:05
and speed up a process because some of those applications need to be built and the build processes are time consuming. You know, there are images ready on Docker Hub.
26:21
And for those who just want to check out how it works, we also released the base on Azure Marketplace where you can just click the right VM, the application you want to try out and literally start with the development.
26:45
And for those people who still believe that this is still a hacky and time consuming approach, we recently started to contribute to the Portainer project.
27:01
Portainer is something like configuration, development, orchestration platform for Docker and Kubernetes based applications. And our contribution contains the extension of Portainer towards the support of enclave containers.
27:25
So what we envision is that people have just in this UI simple templates where they can choose, hey, I want a MariaDB or I want a MongoDB, they just configure it, they deploy it as usual with Portainer
27:45
and the extension just makes sure that the key management, the key provisioning is set up in place. So the whole idea with Portainer CC is to even further simplify the development of enclave applications.
28:08
Yeah, that's almost the end of my talk. So as mentioned, the base as well as Portainer CC, our open source project, and we're interested in growing the community, we're looking for people that want to contribute,
28:24
for example, with their own enclave applications or help to add additional functionality to Portainer CC. So if you're interested through GitHub, you'll find an invitation link to our Discord server.
28:41
So please join us even if you have questions or are interested in learning more about SGX or even AMD's counterpart technology. And if, on the other hand, you don't have the time to contribute to an open source project,
29:03
but you're interested in, for example, using enclave applications to protect your workload as an engineer because you're convinced that this tool will make sense, I recommend you to just go to enclave.cloud, which is the one stop shop for confidential cloud computing.
29:23
So here you really can, with a few clicks, configure the corresponding environment you're interested in, for example, VM or Kubernetes cluster or serverless function or managed database, choose your cloud provider, at least at the moment in time a cloud provider that supports confidential compute technology,
29:46
and then literally use that environment in order to build your cloud application. That's it. Thanks for your time and hope to see you. Bye bye.