Data-in-use Encryption with MariaDB
This is a modal window.
Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.
Formale Metadaten
Titel |
| |
Serientitel | ||
Anzahl der Teile | 542 | |
Autor | ||
Mitwirkende | ||
Lizenz | CC-Namensnennung 2.0 Belgien: Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen. | |
Identifikatoren | 10.5446/61711 (DOI) | |
Herausgeber | ||
Erscheinungsjahr | ||
Sprache |
Inhaltliche Metadaten
Fachgebiet | ||
Genre | ||
Abstract |
|
FOSDEM 2023517 / 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
ChiffrierungTLSROM <Informatik>ComputerPunktwolkeVirtuelle RealitätTopologieNummerungIntelKernel <Informatik>Physikalisches SystemMini-DiscOffene MengeCodierungDatenverwaltungFlächentheorieHash-AlgorithmusTrigonometrische FunktionBefehlsprozessorCodierungGenerator <Informatik>Perfekte GruppeKontextbezogenes SystemMereologieNummerungSystemaufrufBefehl <Informatik>Arithmetisches MittelHardwareEinfach zusammenhängender RaumBootstrap-AggregationComputersicherheitBootenVerschiebungsoperatorSoftwareschwachstelleBefehlsprozessorSchlüsselverwaltungNeuroinformatikDatenbankInverser LimesInterrupt <Informatik>PunktInformationsspeicherungExpertensystemPhysikalisches SystemKernel <Informatik>FirmwareFlächentheorieHalbleiterspeicherLaufzeitfehlerNetzbetriebssystemInterface <Schaltung>Digitales ZertifikatKonfiguration <Informatik>Kartesische KoordinatenBitCASE <Informatik>Interaktives FernsehenRechenschieberDiagrammComputeranimation
08:51
IntelChiffrierungOpen SourceMereologieVerschiebungsoperatorUmwandlungsenthalpieNeuroinformatikTabellep-BlockDatenbankEndliche ModelltheorieProgrammierumgebungComputeranimation
10:22
IntelSimulationCodierungHash-AlgorithmusPunktwolkeFormation <Mathematik>BootenData Encryption StandardCOMFirmwareVerschlingungFinite-Elemente-MethodeMenütechnikChiffrierungTLSVirtuelle RealitätComputerNummerungTopologieROM <Informatik>Kernel <Informatik>BEEPImpulsRechenschieberVirtuelle MaschineRichtungCASE <Informatik>HypercubeComputersicherheitRechter WinkelBildgebendes VerfahrenSchlüsselverwaltungCoprozessorKette <Mathematik>Prozess <Informatik>MikrokernelFirmwareMereologieHalbleiterspeicherProgrammverifikationAggregatzustandEinflussgrößeBefehl <Informatik>SystemaufrufDatensatzObjekt <Kategorie>Hash-AlgorithmusWeb-SeiteBefehlsprozessorBootenHardwareROM <Informatik>Kontextbezogenes SystemCloud ComputingLastLaufzeitfehlerOpen SourceMinkowski-MetrikElektronische UnterschriftTermBitPunktwolkeErwartungswertAutorisierungGruppenoperationDatenbankStrömungsrichtungZusammenhängender GraphDateiverwaltungTypentheorieInformationTelekommunikationWorkstation <Musikinstrument>Einfach zusammenhängender RaumComputeranimation
20:06
Kernel <Informatik>NeuroinformatikEinflussgrößeAggregatzustandInterrupt <Informatik>Prozess <Informatik>UmwandlungsenthalpieAdditionCoprozessorCASE <Informatik>SystemaufrufMinkowski-MetrikKontextbezogenes SystemRPCBefehl <Informatik>Computeranimation
22:08
ComputeranimationFlussdiagramm
Transkript: Englisch(automatisch erzeugt)
03:48
No better, okay Yeah, perfect and then let's say the newer generations they move to this VM based Scheme where you have an entire VM isolated from the from you use we cut at the hypervisor you create
04:06
A completely isolated VM and everything that's inside like the firmware the BIOS the kernel and so forth is everything is part of that confidential context Means of course more code that needs to be trusted that's running in the same kind of privilege layer
04:21
But you don't have the problem of this restricted system interface, so you can directly access do any kind of syscalls pretty much Behave like any other application inside any other operating system And those are these these two worlds and both could be an option for protecting or IODB at runtime
04:43
As I said rebuild interface In in case of the confidential VMS and There's nothing really we have to change and in case of the the into SGX the process-based world we have this weird thing where we need to forward those syscalls to the host and I
05:05
Guess it's it's fair to say that the the right side is probably a lot faster But you have this bit more of a stack that you need to trust That has that's running inside the same same context Yeah, so so SGX and process-based
05:23
limitations It's currently. I think it's fair to say it's an Intel only solution. You're pretty much locked in with Intel at that point Any kind of context switch is expensive that means I always is expensive any other interrupt is expensive and
05:42
In ODB, I have to say I'm not a MarioDB expert whatsoever, but For some reason I know that in ODB is a problem people use different kinds of Storage backends like RocksDB for example
06:00
so You can just move the I guess the the off-the-shelf MarioDB into an SGX enclave There are some some things you have need to fiddle with and then you can make it work The upside is you have a very small Trusted computing base a very small amount of code that you need to trust that runs inside this this context
06:20
On the other hand SEV confidential VM larger TCB for that That means you are more it's more lift and shift and Yeah, Intel is currently not an it doesn't really have an a solution out there that you can use But there's Intel TDX coming that's more or less the same as as AMD SEV
06:42
There's other stuff coming from armor and and and risk V and so forth Huge attack surface just means yeah, you have the kernel you have the firmware the bootloader everything inside the inside that that context So if you have any kind of vulnerabilities there, you can be potentially attacked even though you're isolated
07:02
right Apart from memory encryption, I think an important aspect of confidential computing is is attestation That means for motor station just means you get an a statement from the chip from the CPU about what's running What code was loaded inside your enclave? your or your confidential VM and
07:22
That you that's that's signed with a key from the CPU and this key has a certificate chain back to the hardware vendor so that You can send such a statement about for example This is a myriodb enclave a myriodb container that was loaded inside this enclave. You can send it to a
07:41
To remote party and establish a secure channel for example exchanging a key Bootstrapping a TLS connection and then you have a secure channel through that so the database you can exchange data to your select statements and so forth and With SGX this needs for example, you can do that by by having like a small
08:03
Small step that runs before your before your actual code or next to your actual code that does that interaction with the CPU and provides You with a attestation statement and then you can use that Felix gave a talk last year. Felix was at the myriodb death room about edgeless DB. That's essentially a
08:25
That builds up on myriodb and tries to Bring that confidential computing concept even even even closer or even More into the the use case After slides from Felix, let me quickly
08:48
Because what what we've seen so far is essentially just lift and shift of myriodb On top of SGX or top of AMD SCB. What edgeless DB does
09:01
Essentially it uses rocks DB for the reasons mentioned and also for That has some neat features about the encryption. So The way it writes blocks Makes it very good for the for the confidential computer attacker model. You can switch things around you can't do any any modifications
09:23
and the interesting part is why I'm showing this they added a confidential computing front-end, that means You not only have attestation that your myriodb runs inside confidential computing environment. They also give you an attestation About what the database is and who has access to it. Essentially
09:40
When you when you set it up you define a small manifest It just gives the initial database layout like the users the initial tables who can modify what with access to what tables and they add that to the to the attestation statement, so then you can give to a remote attestation and you know This is exit. This is not only myriodb running there, but this is myriodb with those user credentials those tables. I think that's
10:07
integrating this concept of confidential computing more with the The concept of a confidential database if you will. So interesting SSDB is also open source so you can check it out if that's that's interesting for you, but it's SGX specific
10:23
You go back to Arvid's slides Yes, his slides, his emojis responsibility, but yeah the problem with SCV and and confidential VMs currently is that you can
10:42
You can just lift and shift myriodb inside. It will work. The problem with the current way hypervisors and other cloud providers Offer confidential VMs is that they don't give you full access to the entire stack that runs inside the confidential VM That means they have a firmware shim You don't know you can't really verify that loads your bootloader us
11:03
And then myriodb that breaks the chain of verification from the hardware essentially. That's what the slide tries to tell you and What we'd like to have is having the full chain inside this in this VM Verifiable from the from the firmware like from the hyper statement to the firmware and then up to myriodb itself
11:25
So yeah, this is a practical problem right now, but hopefully gonna be solved soon
11:41
Currently you can for example on Azure you can start on a AMD SCV machine on hyper V. They they set the firmware But there's a preview where you can define your own firmware You can either use direct Linux boot or you define your own UAFI based firmware
12:02
Yeah, and then you boot the image the image should starts myriodb and then you go from there Yeah, if you want to try that Yeah, of course there's the AMD documentation and stuff AVID's company called cloud offers confidential VMs based on SCV
12:26
Apparently, there's some some solution to try it out and yeah, HSDB is open source. You can also try that. I Think that's the last slide. So not sure if I hit those 20 minutes, but yeah Any any questions?
12:41
What type of users do you see using this? The yeah Mostly people that currently want to process sensitive regulated data in the cloud like healthcare Telecommunication this kind of stuff they store They do that on-prem with with the database. They want to move that to the cloud, but then they can't because
13:06
It's not enough the data is protected at rest and in transit They also need to protect data at runtime or as the HSDB case makes it Give guarantees on who has access to the data Yeah
13:33
To be honest, I am not the best person to answer the question, but I think It's part of the syscalls that
13:41
That that happened when when you do use InnoDB I'm not sure what but what syscalls aren't the problem and then you have this context switches and you have a lot more context Which is then when you use rocks DB and that makes it super slow. That's at least one problem Well, I don't know it in detail, but I would assume that it was synchronous IO for writing those LSM trees, so it could be simpler syscalls.
14:06
Yeah, yeah, yeah, I think that's there was something on Felix slides along those lines but yeah, by the way, if you I think this is from last year. I think there's a recording and Felix speaks about Why rocks DB is more is a better performance than the InnoDB
14:41
To be honest, I Don't I don't know this will be a great question for for Avid Here something right? Yeah Yeah, I'm not sure if Avid is in the chat Or if there's a chat, but maybe he can answer that question
15:05
From the end there was an object called SP Yes On the bottom right What is it? Which one this SP?
15:21
Okay, so this is specific for how AMD implements that essentially they add a a chip the secure processor Yeah, yeah And this this basically holds the keys holds the information and then you communicate as the guest you communicate encrypt You can establish a secure connection to that go through the hypervisor to the SP and obtain a station statement for example
15:47
So this is implicitly explicitly trusted, right? So the SP has a firmware if the firmware has a buck you could potentially exploit it and so forth Okay, okay
16:09
So yeah in in the case of a confidential VM Depending on the hardware you essentially can verify You you create measurements of the entire boot chain, so it's similar to a TPM case
16:27
Like a measured boot where you have a statement of the initial memory layout the firmware and then a statement of all the other components in the boot chain And the statement just says this was was this is an isolated
16:41
VM this was the boot chain and this is signed by AMD and this is what you get Yeah
17:00
Yeah, so from process space exactly so the Your your untrusted host creates the create the process loads the memory pages and then says, okay, I'm done and then
17:21
secure processor that's part of the CPU will create a hash over those pages and Compare that to the to the expected measurement that's signed by us the author of the of the enclave so you sign you when you build an enclave you essentially build the
17:42
Expected memory layout to sign that and part of the attestation statement is always this measurement of the of the initial memory layout plus your signature Yeah Right
18:03
I Mean yeah, that's part of why you buy you buy you can say this is a more This is a bit more fuzzy in terms of what the attestation attestation statement says, right?
18:28
Potentially you can anything that happens after this boot and modifying the memory layout Modifying what's what's running there? You can only derive from the initial statement so what people do is they'd use a read-only file system a
18:42
Immutable image this kind of stuff to make it more locked down for example, if you just want Mariah to be you could bring this to a microkernel that just is able to run a Mariah DB container for example Still there's a lot of things that can happen at runtime, but trying to minimize the the TCP or the trust
19:06
I Mean
19:23
Yeah, yeah, I mean If you can derive all the states you will end up in from the from the initial state you would have perfect Verification, but this is not feasible, of course The the main memory if you if you're referring to caches, I'm not sure which caches
19:50
Yes So in the confidential VM case anything Of that VM right from the from the firmware layer upwards anything that's above the hypervisor
20:01
For for the process space anything that's part of that process Yeah for process based With the latest generation, I think it's like around like 10% Something like that the bigger problem are the context switches by far for the right-hand side AMD
20:21
Did did measurements and I think they are but around worst case like four to eight percent
20:46
You you you mean if I want to
21:01
Yeah, so on a process base what will just happen if let's say you do a write syscall the You will the processors will trap you will have an interrupt and it will automatically
21:21
Save your your your registers your state encrypted and then clear those registers there were some problems in the past but clear those registers and go to to to to kernel space and Yeah for the for the VM There are some they both have additional instructions for doing those confidential computing specifics like getting a remote attestation statement or
21:45
for the confidential VM Connecting through the secure processor. There's an instruction set addition