[MDEV-17529] Document internal details of data-at-rest encryption Created: 2018-10-23 Updated: 2023-12-13 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Documentation - Support, Encryption, Storage Engine - InnoDB |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Critical |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Ian Gilfillan |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
Some users would like to have internal details of MariaDB's data-at-rest encryption documented. For example: InnoDB
Answer:
Answer:
AriaInformation about Aria is still needed. That information might have to come from serg or monty.
Binary Logs and Relay Logs
Events are encrypted when they are written to the IO_CACHE, regardless of whether the IO_CACHE is in memory or on disk (whether it is in memory or on disk depends on the transaction size and the values of binlog_cache_size/binlog_stmt_cache_size). This means that events are encrypted even before they are written to the physical binary log or relay log file.
Events are decrypted as they are read if a START_ENCRYPTION_EVENT is encountered in the binary log or relay log. In encrypted binary logs *and* relay logs, this START_ENCRYPTION_EVENT is the second event in the log file, right after the FORMAT_DESCRIPTION_EVENT. |
| Comments |
| Comment by Geoff Montee (Inactive) [ 2018-10-23 ] |
|
jplindst may be able to provide feedback on this. |
| Comment by Jacob Moorman (Inactive) [ 2019-04-12 ] |
|
Geoff to pull notes from developer interview to this ticket, to facilitate clean update of the docs from primary source material; developers will be asked to review the changes. |
| Comment by Jacob Moorman (Inactive) [ 2019-04-23 ] |
|
Kenneth: Geoff's notes have been merged to the ticket so this should now be ready for action. |
| Comment by Andrei Elkin [ 2019-04-26 ] |
|
To the binlog encryption questions, > When is the binary log encrypted? >Is it when the transaction is written to the physical binary log file? > Are the binlog events in their decrypted form when they are in the in-memory buffers? |
| Comment by Geoff Montee (Inactive) [ 2019-04-26 ] |
|
Hi Elkin,
Thanks for the feedback. That tells us how to configure encryption for binary logs. We're already familiar with that process. This question was asking something a bit different. It is asking when the binary log events get encrypted, as in, at what point does MariaDB encrypt the binary log events?
I'm also a bit confused about some of the edits that you made to the issue description regarding relay logs:
You say "yes" to the claim that the START_ENCRYPTION_EVENT is still expected to be the second event in encrypted relay logs, but you also say "right" that this event occurs further in than in encrypted binary logs. If the START_ENCRYPTION_EVENT is the second event in encrypted binary logs, then how can both of these be true? Do you mean to say that the START_ENCRYPTION_EVENT is still expected to be the second event in encrypted relay logs, but that it might not be the second event in some scenarios, because encrypted relay logs can contain additional optional metadata that is not in encrypted binary logs? Thanks! |