Created
August 3, 2022 17:16
-
-
Save sumanthkumarc/d5150dbc4ee37bd645a78f4a5bdaa9b8 to your computer and use it in GitHub Desktop.
Code to ensure dp token signing key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copied from https://github.com/kumahq/kuma/blob/master/pkg/defaults/mesh/mesh.go#L60 | |
created, err := ensureDataplaneTokenSigningKey(ctx, resManager, meshName) | |
if err != nil { | |
return errors.Wrap(err, "could not create default Dataplane Token Signing Key") | |
} | |
if created { | |
resKey := tokens.SigningKeyResourceKey(issuer.DataplaneTokenSigningKeyPrefix(meshName), tokens.DefaultSerialNumber, meshName) | |
log.Info("default Dataplane Token Signing Key created", "mesh", meshName, "name", resKey.Name) | |
} else { | |
log.Info("Dataplane Token Signing Key already exists", "mesh", meshName) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment