-
Notifications
You must be signed in to change notification settings - Fork 9
Ensure decrypted internal keys never swapped #185
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ tde_shmem_startup(void) | |
AesInit(); | ||
|
||
TDEXLogShmemInit(); | ||
TDEXLogSmgrInit(); | ||
TDEXLogInit(); | ||
} | ||
|
||
void | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,28 @@ | |
|
||
$stdout = $node->safe_psql('postgres', "SELECT pg_drop_replication_slot('tde_slot');", extra_params => ['-a']); | ||
PGTDE::append_to_file($stdout); | ||
PGTDE::append_to_file("-- server restart with wal encryption and recovery with a lot of tde_heap relations"); | ||
$node->safe_psql('postgres', | ||
q{ | ||
SELECT pg_tde_add_key_provider_file('file-keyring-010-2','/tmp/pg_tde_test_keyring010_2.per'); | ||
SELECT pg_tde_set_principal_key('test-db-principal-key','file-keyring-010-2'); | ||
|
||
do $$ | ||
DECLARE idx integer; | ||
begin | ||
for idx in 0..700 loop | ||
EXECUTE format('CREATE TABLE t%s (c1 int) USING tde_heap', idx); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that it matters in tests but in real production code I would have done.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So should I change it? I took it from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Up to you. I just wanted to share how real production code looks like. |
||
end loop; | ||
end; $$; | ||
}); | ||
|
||
$rt_value = $node->restart(); | ||
ok($rt_value == 1, "Restart Server"); | ||
|
||
# TODO: add WAL content testing after the wal rework | ||
|
||
# DROP EXTENSION | ||
$stdout = $node->safe_psql('postgres', 'DROP EXTENSION pg_tde;', extra_params => ['-a']); | ||
$stdout = $node->safe_psql('postgres', 'DROP EXTENSION pg_tde CASCADE;', extra_params => ['-a']); | ||
PGTDE::append_to_file($stdout); | ||
# Stop the server | ||
$node->stop(); | ||
|
Uh oh!
There was an error while loading. Please reload this page.