You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the setup scaffolding workflow, update Fulcio to use the Static CT
log TesseraCT instead of the Trillian-based ct_server.
The createtree job is obsolete, so it is removed.
TesseraCT does not use a config file, all parameters are passed in via
command line, so remove the CT config map and the config field from the
secret.
TesseraCT does not support encrypting the private key, so remove support
for supplying a password.
Signed-off-by: Colleen Murphy <[email protected]>
// Key in the configmap holding the value of the tree.
48
-
treeKey="treeID"
49
-
configKey="config"
50
45
privateKey="private"
51
46
publicKey="public"
52
47
bitSize=4096
53
48
)
54
49
55
50
var (
56
-
cmname=flag.String("configmap", "ctlog-config", "Name of the configmap where the treeID lives")
57
-
privateKeySecret=flag.String("private-secret", "", "If there's an existing private key that should be used, read it from this secret, decrypt with the key-password and use it instead of creating a new one.")
58
-
secretName=flag.String("secret", "ctlog-secrets", "Name of the secret to create for the keyfiles")
59
-
pubKeySecretName=flag.String("pubkeysecret", "ctlog-public-key", "Name of the secret to create containing only the public key")
60
-
ctlogPrefix=flag.String("log-prefix", "sigstorescaffolding", "Prefix to append to the url. This is basically the name of the log.")
61
-
fulcioURL=flag.String("fulcio-url", "http://fulcio.fulcio-system.svc", "Where to fetch the fulcio Root CA from")
62
-
trillianServerAddr=flag.String("trillian-server", "log-server.trillian-system.svc:80", "Address of the gRPC Trillian Admin Server (host:port)")
63
-
// TODO: Support ed25519
64
-
keyType=flag.String("keytype", "ecdsa", "Which private key to generate [rsa,ecdsa]")
65
-
curveType=flag.String("curvetype", "p256", "Curve type to use [p256, p384,p521]")
66
-
keyPassword=flag.String("key-password", "test", "Password for encrypting the PEM key")
51
+
privateKeySecret=flag.String("private-secret", "", "If there's an existing private key that should be used, read it from this secret.")
52
+
secretName=flag.String("secret", "ctlog-secrets", "Name of the secret to create for the keyfiles")
53
+
pubKeySecretName=flag.String("pubkeysecret", "ctlog-public-key", "Name of the secret to create containing only the public key")
54
+
fulcioURL=flag.String("fulcio-url", "http://fulcio.fulcio-system.svc", "Where to fetch the fulcio Root CA from")
55
+
keyType=flag.String("keytype", "ecdsa", "Which private key to generate [rsa,ecdsa]")
56
+
curveType=flag.String("curvetype", "p256", "Curve type to use [p256, p384,p521]")
67
57
68
58
// Supported elliptic curve functions.
69
59
supportedCurves=map[string]elliptic.Curve{
@@ -100,25 +90,6 @@ func main() {
100
90
iferr!=nil {
101
91
logging.FromContext(ctx).Panicf("Failed to get clientset: %v", err)
102
92
}
103
-
cm, err:=clientset.CoreV1().ConfigMaps(ns).Get(ctx, *cmname, metav1.GetOptions{})
104
-
iferr!=nil {
105
-
logging.FromContext(ctx).Panicf("Failed to get the configmap %s/%s: %v", ns, *cmname, err)
Copy file name to clipboardExpand all lines: cmd/ctlog/managectroots/main.go
+5-42Lines changed: 5 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,9 @@ import (
18
18
"flag"
19
19
"net/url"
20
20
"os"
21
-
"strings"
22
21
23
22
fulcioclient "github.com/sigstore/fulcio/pkg/api"
24
23
"github.com/sigstore/scaffolding/pkg/ctlog"
25
-
corev1 "k8s.io/api/core/v1"
26
24
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27
25
"k8s.io/client-go/kubernetes"
28
26
"k8s.io/client-go/rest"
@@ -31,19 +29,10 @@ import (
31
29
"sigs.k8s.io/release-utils/version"
32
30
)
33
31
34
-
const (
35
-
// Key in the configmap holding the value of the tree.
36
-
treeKey="treeID"
37
-
configKey="config"
38
-
bitSize=4096
39
-
)
40
-
41
32
var (
42
-
cmname=flag.String("configmap", "ctlog-config", "Name of the configmap where the treeID lives. if configInSecret is false, ctlog config gets added here also.")
43
-
configInSecret=flag.Bool("config-in-secret", false, "If set to true, fetch / update the ctlog configuration proto into a secret specified in ctlog-secrets under key 'config'.")
44
-
secretName=flag.String("secret", "ctlog-secrets", "Name of the secret to fetch private key for CTLog.")
45
-
fulcioURL=flag.String("fulcio-url", "http://fulcio.fulcio-system.svc", "Where to fetch the fulcio Root CA from.")
46
-
operation=flag.String("operation", "", "Operation to perform for the specified fulcio [add,remove]")
33
+
secretName=flag.String("secret", "ctlog-secrets", "Name of the secret to fetch private key for CTLog.")
34
+
fulcioURL=flag.String("fulcio-url", "http://fulcio.fulcio-system.svc", "Where to fetch the fulcio Root CA from.")
35
+
operation=flag.String("operation", "", "Operation to perform for the specified fulcio [add,remove]")
47
36
)
48
37
49
38
typectRootOpstring
@@ -107,27 +96,7 @@ func main() {
107
96
current["private"] =secrets.Data["private"]
108
97
current["public"] =secrets.Data["public"]
109
98
current["rootca"] =secrets.Data["rootca"]
110
-
fork, v:=rangesecrets.Data {
111
-
ifstrings.HasPrefix(k, "fulcio-") {
112
-
current[k] =v
113
-
}
114
-
}
115
-
// If the config is stored in the secret, we don't need to deal with the
116
-
// configmap.
117
-
varcm*corev1.ConfigMap
118
-
if!*configInSecret {
119
-
varerrerror
120
-
cm, err=clientset.CoreV1().ConfigMaps(ns).Get(ctx, *cmname, metav1.GetOptions{})
121
-
iferr!=nil {
122
-
logging.FromContext(ctx).Panicf("Failed to get the configmap %s/%s: %v", ns, *cmname, err)
0 commit comments