Add CORE_TLS_SECRET configuration

This secret will be used to encrypt automatically obtained secrets at
rest, i.e. in a storage. They will be decrypted on demand. If the
secret is wrong, stored certificates can't be decrypted. For changing
the secret, the stored certificated must be deleted first in order
to obtain new ones that will be encrypted with the new secret.
This commit is contained in:
Ingo Oppermann
2023-07-03 16:02:39 +02:00
parent c4d9d8afcb
commit adcbd98467
25 changed files with 972 additions and 354 deletions

17
slices/diff_test.go Normal file
View File

@@ -0,0 +1,17 @@
package slices
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestDiff(t *testing.T) {
a := []string{"c", "d", "e", "f"}
b := []string{"a", "b", "c", "d"}
added, removed := Diff(a, b)
require.Equal(t, []string{"e", "f"}, added)
require.Equal(t, []string{"a", "b"}, removed)
}