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.
27 lines
429 B
Go
27 lines
429 B
Go
package copy
|
|
|
|
import (
|
|
"github.com/datarhei/core/v16/config/value"
|
|
"github.com/datarhei/core/v16/slices"
|
|
)
|
|
|
|
func StringMap(src map[string]string) map[string]string {
|
|
dst := make(map[string]string)
|
|
|
|
for k, v := range src {
|
|
dst[k] = v
|
|
}
|
|
|
|
return dst
|
|
}
|
|
|
|
func TenantSlice(src []value.Auth0Tenant) []value.Auth0Tenant {
|
|
dst := slices.Copy(src)
|
|
|
|
for i, t := range src {
|
|
dst[i].Users = slices.Copy(t.Users)
|
|
}
|
|
|
|
return dst
|
|
}
|