From 3a6eeb5c5944f9694511405c6b6e205690326d6a Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 31 Jul 2020 11:27:30 -0700 Subject: [PATCH] feat: always export ID for CACertificate 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 --- file/writer.go | 1 - 1 file changed, 1 deletion(-) diff --git a/file/writer.go b/file/writer.go index ccd03b007..e903d3257 100644 --- a/file/writer.go +++ b/file/writer.go @@ -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)