File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -369,8 +369,9 @@ type ReplicaConfig struct {
369
369
370
370
// Encryption identities and recipients
371
371
Age struct {
372
- Identities []string `yaml:"identities"`
373
- Recipients []string `yaml:"recipients"`
372
+ IdentityFiles []string `yaml:"identity-files"`
373
+ Identities []string `yaml:"identities"`
374
+ Recipients []string `yaml:"recipients"`
374
375
} `yaml:"age"`
375
376
}
376
377
@@ -398,6 +399,19 @@ func NewReplicaFromConfig(c *ReplicaConfig, db *litestream.DB) (_ *litestream.Re
398
399
if v := c .ValidationInterval ; v != nil {
399
400
r .ValidationInterval = * v
400
401
}
402
+ for _ , path := range c .Age .IdentityFiles {
403
+ buf , err := os .ReadFile (path )
404
+ if err != nil {
405
+ return nil , err
406
+ }
407
+
408
+ identities , err := age .ParseIdentities (strings .NewReader (string (buf )))
409
+ if err != nil {
410
+ return nil , err
411
+ }
412
+
413
+ r .AgeIdentities = append (r .AgeIdentities , identities ... )
414
+ }
401
415
for _ , str := range c .Age .Identities {
402
416
identities , err := age .ParseIdentities (strings .NewReader (str ))
403
417
if err != nil {
You can’t perform that action at this time.
0 commit comments