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
{{ message }}
Repository navigation
Commit b258896
Browse filesBrowse the repository at this point in the historyBrowse files
feat(objectstore-plugin): trust the system roots and service DNS bundle for the issuer
The sidecar verified the actor JWT issuer with a CA file that ate-setup
picked by an exact match on the default issuer, so an equivalent spelling
such as https://idp.<ns>.svc:443 fell back to the system roots and stopped
the sidecar. Verify the issuer against the system roots plus
--actor-jwt-issuer-ca-file, which defaults to the service DNS trust bundle,
and drop the ATE_API_ACTOR_JWT_ISSUER_CA_FILE ConfigMap key.
Signed-off-by: Anish Ramasekar <[email protected]>
returnfmt.Errorf("actor JWT issuer serves a certificate that does not verify against --actor-jwt-issuer-ca-file, or the system roots when it is empty: %w", err)
116
+
returnfmt.Errorf("actor JWT issuer serves a certificate that does not verify against the system roots or %s: %w", caFile, err)
113
117
}
114
118
iferr!=nil {
115
119
slog.WarnContext(ctx, "Could not fetch actor JWT signing keys at start; exchanges retry the fetch", slog.String("issuer", issuer), slog.Any("err", err))
{"GCS needs the transfer account", exchangeConfig{issuer: issuer}, "--transfer-service-account"},
71
76
{"GCS needs a readable issuer CA file", exchangeConfig{issuer: issuer, issuerCAFile: filepath.Join(t.TempDir(), "absent.pem"), transferAccount: xfer}, "absent.pem"},
72
77
{"GCS needs certificates in the issuer CA file", exchangeConfig{issuer: issuer, issuerCAFile: emptyCA, transferAccount: xfer}, "contains no certificates"},
73
-
{"GCS needs an issuer certificate the CA file trusts", exchangeConfig{issuer: tlsIssuer.URL, transferAccount: xfer}, "--actor-jwt-issuer-ca-file"},
74
-
{"GCS needs an issuer certificate for the issuer's host", exchangeConfig{issuer: "https://localhost:"+tlsIssuerPort, issuerCAFile: tlsIssuerCA, transferAccount: xfer}, "--actor-jwt-issuer-ca-file"},
78
+
{"GCS needs the issuer CA file", exchangeConfig{issuer: issuer, transferAccount: xfer}, "--actor-jwt-issuer-ca-file"},
79
+
{"GCS needs an issuer certificate the CA file or system roots trust", exchangeConfig{issuer: tlsIssuer.URL, issuerCAFile: otherCA, transferAccount: xfer}, "the system roots or "+otherCA},
80
+
{"GCS needs an issuer certificate for the issuer's host", exchangeConfig{issuer: "https://localhost:"+tlsIssuerPort, issuerCAFile: tlsIssuerCA, transferAccount: xfer}, "the system roots or "+tlsIssuerCA},
flags.StringVar(&ncfg.Address, "exchange-address", net.JoinHostPort(apiHost, strconv.Itoa(exchange.DefaultPort)), "node mode on GCS: address of the credential exchange the control sidecar serves, where each transfer's actor JWT is traded for a token scoped to the actor")
73
-
flags.StringVar(&ncfg.CAFile, "exchange-ca-file", "/run/servicedns.podcert.ate.dev/trust-bundle.pem", "node mode on GCS: CA bundle used to verify the exchange")
77
+
flags.StringVar(&ncfg.CAFile, "exchange-ca-file", serviceDNSTrustBundle, "node mode on GCS: CA bundle used to verify the exchange")
74
78
flags.StringVar(&ncfg.ServerName, "exchange-server-name", apiHost, "node mode on GCS: DNS name expected on the exchange's certificate, the API Service in the pod's namespace")
75
79
varxcfgexchangeConfig
76
80
flags.StringVar(&xcfg.listen, "exchange-listen", "", "control mode: TCP address to serve the credential exchange on over TLS, for example :8445. Empty leaves it unserved.")
77
81
flags.StringVar(&xcfg.credBundle, "exchange-cred-bundle", "/run/servicedns.podcert.ate.dev/credential-bundle.pem", "control mode: PEM credential bundle the exchange serves with, the pod's service DNS certificate")
78
82
flags.StringVar(&xcfg.issuer, "actor-jwt-issuer", "", "control mode: issuer URL of the actor JWTs the exchange accepts, the value ate-api-server runs with")
79
-
flags.StringVar(&xcfg.issuerCAFile, "actor-jwt-issuer-ca-file", "", "control mode: CA bundle used to verify --actor-jwt-issuer when fetching its signing keys. Empty uses the system roots")
83
+
flags.StringVar(&xcfg.issuerCAFile, "actor-jwt-issuer-ca-file", serviceDNSTrustBundle, "control mode: CA bundle trusted in addition to the system roots when verifying --actor-jwt-issuer")
80
84
flags.StringVar(&xcfg.transferAccount, "transfer-service-account", "", "control mode on GCS: email of the Google service account snapshot transfers run as. The exchange impersonates it and downscopes its token per actor")
81
85
flags.StringVar(&xcfg.ateapi.Address, "ateapi-address", "127.0.0.1:443", "control mode: ate-api-server gRPC address, the loopback in the shared pod")
82
-
flags.StringVar(&xcfg.ateapi.CAFile, "ateapi-ca-file", "/run/servicedns.podcert.ate.dev/trust-bundle.pem", "control mode: CA bundle used to verify ate-api-server")
86
+
flags.StringVar(&xcfg.ateapi.CAFile, "ateapi-ca-file", serviceDNSTrustBundle, "control mode: CA bundle used to verify ate-api-server")
83
87
flags.StringVar(&xcfg.ateapi.ServerName, "ateapi-server-name", installdefaults.APIServiceHost(installdefaults.NamespaceFromPodEnv()), "control mode: DNS name expected on the ate-api-server certificate, the API Service in the pod's namespace")
84
88
flags.StringVar(&xcfg.ateapi.ClientCredBundle, "ateapi-client-cred-bundle", "/run/podidentity.podcert.ate.dev/credential-bundle.pem", "control mode: PEM credential bundle presented to ate-api-server, the pod identity certificate")
85
89
previewFlags:=flags.StringSlice("preview", nil, "Preview gates to enable.")
0 commit comments