Skip to content

Commit

Permalink
feat: always export ID for CACertificate
Browse files Browse the repository at this point in the history
mtls-auth credentials can be tied to CACertificate.
This leads to a probelm where mtls-auth credential can contain an ID of
a CACertificate but CACertificate is exported to state file without an
ID. Now, on a subsequent `sync` from scratch, the ID of CACertificate
will be auto generated. This breaks the link between mtls-auth
credential and CACertificate, and the sync fails.

With this patch, like Certificate entity, ID of CACertificate is always
exported, no matter what.

From #193
  • Loading branch information
hbagdi committed Jul 31, 2020
1 parent b1b6633 commit 3a6eeb5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion file/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ func KongStateToFile(kongState *state.KongState, config WriteConfig) error {
}
for _, c := range caCertificates {
c := FCACertificate{CACertificate: c.CACertificate}
zeroOutID(&c, c.Cert, config.WithID)
zeroOutTimestamps(&c)
utils.MustRemoveTags(&c.CACertificate, selectTags)
file.CACertificates = append(file.CACertificates, c)
Expand Down

0 comments on commit 3a6eeb5

Please sign in to comment.