Skip to content

Commit

Permalink
[v7] Backport #10871 (#11122)
Browse files Browse the repository at this point in the history
* Fix goroutine and memory leak in watchCertAuthorities (#10871)

The CA Watcher was blocking both on writing to a channel when the watcher
was closed and on HTTP calls that had no request timeout or context passed
to cause cancellation.

All resourceWatcher implementations that had a bug which may cause them to block
on writing to a channel forever were fixed by selecting on the write and ctx.Done.

Adding context.Context to all Get/Put/Post/Delete methods on the auth HTTPClient to
force callers to propagate context. Prior all calls used context.TODO which
prevents requests from being properly cancelled.

Add context propagation to RotateCertAuthority, RotateExternalCertAuthority,
GetCertAuthority, GetCertAuthorities. This is needed to get the correct ctx
from the CertAtuhorityWatcher all the way down to the HTTPClient that makes
the call.

Closes #10648
  • Loading branch information
rosstimothy authored Mar 15, 2022
1 parent 03bb0a7 commit 0d18409
Show file tree
Hide file tree
Showing 58 changed files with 556 additions and 414 deletions.
2 changes: 1 addition & 1 deletion e
Submodule e updated from 989876 to 2d97ec
2 changes: 1 addition & 1 deletion integration/app_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ func (p *pack) ensureAuditEvent(t *testing.T, eventType string, checkEvent func(
// initCertPool initializes root cluster CA pool.
func (p *pack) initCertPool(t *testing.T) {
authClient := p.rootCluster.GetSiteAPI(p.rootCluster.Secrets.SiteName)
ca, err := authClient.GetCertAuthority(types.CertAuthID{
ca, err := authClient.GetCertAuthority(context.Background(), types.CertAuthID{
Type: types.HostCA,
DomainName: p.rootCluster.Secrets.SiteName,
}, false)
Expand Down
2 changes: 1 addition & 1 deletion integration/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ func setupDatabaseTest(t *testing.T, options ...testOptionFunc) *databasePack {
p.setupUsersAndRoles(t)

// Update root's certificate authority on leaf to configure role mapping.
ca, err := p.leaf.cluster.Process.GetAuthServer().GetCertAuthority(types.CertAuthID{
ca, err := p.leaf.cluster.Process.GetAuthServer().GetCertAuthority(context.Background(), types.CertAuthID{
Type: types.UserCA,
DomainName: p.root.cluster.Secrets.SiteName,
}, false)
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func GenerateUserCreds(req UserCredsRequest) (*UserCreds, error) {
if err != nil {
return nil, trace.Wrap(err)
}
ca, err := a.GetCertAuthority(types.CertAuthID{
ca, err := a.GetCertAuthority(context.Background(), types.CertAuthID{
Type: types.HostCA,
DomainName: clusterName.GetClusterName(),
}, false)
Expand Down
20 changes: 10 additions & 10 deletions integration/hsm/hsm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (t *teleportService) waitForLocalAdditionalKeys(ctx context.Context) error
return trace.Wrap(ctx.Err(), "timed out waiting for %s to have local additional keys", t.name)
case <-time.After(250 * time.Millisecond):
}
ca, err := t.process.GetAuthServer().GetCertAuthority(hostCAID, true)
ca, err := t.process.GetAuthServer().GetCertAuthority(ctx, hostCAID, true)
if err != nil {
return trace.Wrap(err)
}
Expand Down Expand Up @@ -336,7 +336,7 @@ func TestHSMRotation(t *testing.T) {
teleportServices = append(teleportServices, proxy)

log.Debug("TestHSMRotation: sending rotation request init")
err = auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: types.RotationPhaseInit,
Mode: types.RotationModeManual,
Expand All @@ -345,7 +345,7 @@ func TestHSMRotation(t *testing.T) {
require.NoError(t, teleportServices.waitForPhaseChange(ctx))

log.Debug("TestHSMRotation: sending rotation request update_clients")
err = auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: types.RotationPhaseUpdateClients,
Mode: types.RotationModeManual,
Expand All @@ -354,7 +354,7 @@ func TestHSMRotation(t *testing.T) {
require.NoError(t, teleportServices.waitForRestart(ctx))

log.Debug("TestHSMRotation: sending rotation request update_servers")
err = auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: types.RotationPhaseUpdateServers,
Mode: types.RotationModeManual,
Expand All @@ -363,7 +363,7 @@ func TestHSMRotation(t *testing.T) {
require.NoError(t, teleportServices.waitForRestart(ctx))

log.Debug("TestHSMRotation: sending rotation request standby")
err = auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: types.RotationPhaseStandby,
Mode: types.RotationModeManual,
Expand Down Expand Up @@ -513,7 +513,7 @@ func TestHSMDualAuthRotation(t *testing.T) {
// do a full rotation
for _, stage := range stages {
log.Debugf("TestHSMDualAuthRotation: Sending rotate request %s", stage.targetPhase)
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: stage.targetPhase,
Mode: types.RotationModeManual,
Expand Down Expand Up @@ -553,7 +553,7 @@ func TestHSMDualAuthRotation(t *testing.T) {
// Do another full rotation from the new auth server
for _, stage := range stages {
log.Debugf("TestHSMDualAuthRotation: Sending rotate request %s", stage.targetPhase)
require.NoError(t, auth2.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
require.NoError(t, auth2.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: stage.targetPhase,
Mode: types.RotationModeManual,
Expand Down Expand Up @@ -668,7 +668,7 @@ func TestHSMDualAuthRotation(t *testing.T) {
}
for _, stage := range stages {
log.Debugf("TestHSMDualAuthRotation: Sending rotate request %s", stage.targetPhase)
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: stage.targetPhase,
Mode: types.RotationModeManual,
Expand Down Expand Up @@ -828,7 +828,7 @@ func TestHSMMigrate(t *testing.T) {
// do a full rotation
for _, stage := range stages {
log.Debugf("TestHSMMigrate: Sending rotate request %s", stage.targetPhase)
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: stage.targetPhase,
Mode: types.RotationModeManual,
Expand Down Expand Up @@ -856,7 +856,7 @@ func TestHSMMigrate(t *testing.T) {
// do a full rotation
for _, stage := range stages {
log.Debugf("TestHSMMigrate: Sending rotate request %s", stage.targetPhase)
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
require.NoError(t, auth1.process.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
Type: types.HostCA,
TargetPhase: stage.targetPhase,
Mode: types.RotationModeManual,
Expand Down
53 changes: 27 additions & 26 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1664,28 +1664,28 @@ func testMapRoles(t *testing.T, suite *integrationTestSuite) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cid := types.CertAuthID{Type: types.UserCA, DomainName: tt.mainClusterName}
mainUserCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(cid, true)
mainUserCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(ctx, cid, true)
tt.outChkMainUserCA(t, err)
if err == nil {
tt.outChkMainUserCAPrivateKey(t, mainUserCAs.GetActiveKeys().SSH[0].PrivateKey)
}

cid = types.CertAuthID{Type: types.HostCA, DomainName: tt.mainClusterName}
mainHostCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(cid, true)
mainHostCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(ctx, cid, true)
tt.outChkMainHostCA(t, err)
if err == nil {
tt.outChkMainHostCAPrivateKey(t, mainHostCAs.GetActiveKeys().SSH[0].PrivateKey)
}

cid = types.CertAuthID{Type: types.UserCA, DomainName: tt.auxClusterName}
auxUserCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(cid, true)
auxUserCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(ctx, cid, true)
tt.outChkAuxUserCA(t, err)
if err == nil {
tt.outChkAuxUserCAPrivateKey(t, auxUserCAs.GetActiveKeys().SSH[0].PrivateKey)
}

cid = types.CertAuthID{Type: types.HostCA, DomainName: tt.auxClusterName}
auxHostCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(cid, true)
auxHostCAs, err := tt.inCluster.Process.GetAuthServer().GetCertAuthority(ctx, cid, true)
tt.outChkAuxHostCA(t, err)
if err == nil {
tt.outChkAuxHostCAPrivateKey(t, auxHostCAs.GetActiveKeys().SSH[0].PrivateKey)
Expand Down Expand Up @@ -3269,13 +3269,13 @@ func testRotateSuccess(t *testing.T, suite *integrationTestSuite) {
t.Logf("Service started. Setting rotation state to %v", types.RotationPhaseUpdateClients)

// start rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseInit,
Mode: types.RotationModeManual,
})
require.NoError(t, err)

hostCA, err := svc.GetAuthServer().GetCertAuthority(types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
hostCA, err := svc.GetAuthServer().GetCertAuthority(ctx, types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
require.NoError(t, err)
t.Logf("Cert authority: %v", auth.CertAuthorityInfo(hostCA))

Expand All @@ -3284,7 +3284,7 @@ func testRotateSuccess(t *testing.T, suite *integrationTestSuite) {
require.NoError(t, err)

// update clients
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateClients,
Mode: types.RotationModeManual,
})
Expand All @@ -3311,13 +3311,13 @@ func testRotateSuccess(t *testing.T, suite *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %v", types.RotationPhaseUpdateServers)

// move to the next phase
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateServers,
Mode: types.RotationModeManual,
})
require.NoError(t, err)

hostCA, err = svc.GetAuthServer().GetCertAuthority(types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
hostCA, err = svc.GetAuthServer().GetCertAuthority(ctx, types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
require.NoError(t, err)
t.Logf("Cert authority: %v", auth.CertAuthorityInfo(hostCA))

Expand All @@ -3340,13 +3340,13 @@ func testRotateSuccess(t *testing.T, suite *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %v.", types.RotationPhaseStandby)

// complete rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseStandby,
Mode: types.RotationModeManual,
})
require.NoError(t, err)

hostCA, err = svc.GetAuthServer().GetCertAuthority(types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
hostCA, err = svc.GetAuthServer().GetCertAuthority(ctx, types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
require.NoError(t, err)
t.Logf("Cert authority: %v", auth.CertAuthorityInfo(hostCA))

Expand Down Expand Up @@ -3418,7 +3418,7 @@ func testRotateRollback(t *testing.T, s *integrationTestSuite) {
t.Logf("Service started. Setting rotation state to %q.", types.RotationPhaseInit)

// start rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseInit,
Mode: types.RotationModeManual,
})
Expand All @@ -3430,7 +3430,7 @@ func testRotateRollback(t *testing.T, s *integrationTestSuite) {
t.Logf("Setting rotation state to %q.", types.RotationPhaseUpdateClients)

// start rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateClients,
Mode: types.RotationModeManual,
})
Expand All @@ -3456,7 +3456,7 @@ func testRotateRollback(t *testing.T, s *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %q.", types.RotationPhaseUpdateServers)

// move to the next phase
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateServers,
Mode: types.RotationModeManual,
})
Expand All @@ -3469,7 +3469,7 @@ func testRotateRollback(t *testing.T, s *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %q.", types.RotationPhaseRollback)

// complete rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseRollback,
Mode: types.RotationModeManual,
})
Expand Down Expand Up @@ -3602,7 +3602,7 @@ func testRotateTrustedClusters(t *testing.T, suite *integrationTestSuite) {
t.Logf("Setting rotation state to %v", types.RotationPhaseInit)

// start rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseInit,
Mode: types.RotationModeManual,
})
Expand Down Expand Up @@ -3653,7 +3653,7 @@ func testRotateTrustedClusters(t *testing.T, suite *integrationTestSuite) {
require.NoError(t, err)

// update clients
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateClients,
Mode: types.RotationModeManual,
})
Expand All @@ -3673,7 +3673,7 @@ func testRotateTrustedClusters(t *testing.T, suite *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %v", types.RotationPhaseUpdateServers)

// move to the next phase
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateServers,
Mode: types.RotationModeManual,
})
Expand All @@ -3700,7 +3700,7 @@ func testRotateTrustedClusters(t *testing.T, suite *integrationTestSuite) {
t.Logf("Service reloaded. Setting rotation state to %v.", types.RotationPhaseStandby)

// complete rotation
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseStandby,
Mode: types.RotationModeManual,
})
Expand Down Expand Up @@ -3738,6 +3738,7 @@ func testRotateTrustedClusters(t *testing.T, suite *integrationTestSuite) {
// TestRotateChangeSigningAlg tests the change of CA signing algorithm on
// manual rotation.
func testRotateChangeSigningAlg(t *testing.T, suite *integrationTestSuite) {
ctx := context.Background()
// Start with an instance using default signing alg.
tconf := suite.rotationConfig(true)
teleport := suite.newTeleportInstance()
Expand Down Expand Up @@ -3786,18 +3787,18 @@ func testRotateChangeSigningAlg(t *testing.T, suite *integrationTestSuite) {
}

assertSigningAlg := func(svc *service.TeleportProcess, alg string) {
hostCA, err := svc.GetAuthServer().GetCertAuthority(types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
hostCA, err := svc.GetAuthServer().GetCertAuthority(ctx, types.CertAuthID{Type: types.HostCA, DomainName: Site}, false)
require.NoError(t, err)
require.Equal(t, alg, sshutils.GetSigningAlgName(hostCA))

userCA, err := svc.GetAuthServer().GetCertAuthority(types.CertAuthID{Type: types.UserCA, DomainName: Site}, false)
userCA, err := svc.GetAuthServer().GetCertAuthority(ctx, types.CertAuthID{Type: types.UserCA, DomainName: Site}, false)
require.NoError(t, err)
require.Equal(t, alg, sshutils.GetSigningAlgName(userCA))
}

rotate := func(svc *service.TeleportProcess, mode string) *service.TeleportProcess {
t.Logf("Rotation phase: %q.", types.RotationPhaseInit)
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseInit,
Mode: mode,
})
Expand All @@ -3808,7 +3809,7 @@ func testRotateChangeSigningAlg(t *testing.T, suite *integrationTestSuite) {
require.NoError(t, err)

t.Logf("Rotation phase: %q.", types.RotationPhaseUpdateClients)
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateClients,
Mode: mode,
})
Expand All @@ -3819,7 +3820,7 @@ func testRotateChangeSigningAlg(t *testing.T, suite *integrationTestSuite) {
require.NoError(t, err)

t.Logf("Rotation phase: %q.", types.RotationPhaseUpdateServers)
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseUpdateServers,
Mode: mode,
})
Expand All @@ -3830,7 +3831,7 @@ func testRotateChangeSigningAlg(t *testing.T, suite *integrationTestSuite) {
require.NoError(t, err)

t.Logf("rotation phase: %q", types.RotationPhaseStandby)
err = svc.GetAuthServer().RotateCertAuthority(auth.RotateRequest{
err = svc.GetAuthServer().RotateCertAuthority(ctx, auth.RotateRequest{
TargetPhase: types.RotationPhaseStandby,
Mode: mode,
})
Expand Down Expand Up @@ -5411,7 +5412,7 @@ func TestTraitsPropagation(t *testing.T) {
})

// Update root's certificate authority on leaf to configure role mapping.
ca, err := lc.Process.GetAuthServer().GetCertAuthority(types.CertAuthID{
ca, err := lc.Process.GetAuthServer().GetCertAuthority(context.Background(), types.CertAuthID{
Type: types.UserCA,
DomainName: rc.Secrets.SiteName,
}, false)
Expand Down
2 changes: 1 addition & 1 deletion integration/kube_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ func kubeProxyClient(cfg kubeProxyConfig) (*kubernetes.Clientset, *rest.Config,
}
ttl := roles.AdjustSessionTTL(10 * time.Minute)

ca, err := authServer.GetCertAuthority(types.CertAuthID{
ca, err := authServer.GetCertAuthority(context.Background(), types.CertAuthID{
Type: types.HostCA,
DomainName: clusterName.GetClusterName(),
}, true)
Expand Down
2 changes: 1 addition & 1 deletion lib/auth/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (a *Server) DeleteRole(ctx context.Context, name string) error {
}
// check if it's used by some external cert authorities, e.g.
// cert authorities related to external cluster
cas, err := a.Trust.GetCertAuthorities(types.UserCA, false)
cas, err := a.Trust.GetCertAuthorities(ctx, types.UserCA, false)
if err != nil {
return trace.Wrap(err)
}
Expand Down
8 changes: 4 additions & 4 deletions lib/auth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ type ReadAccessPoint interface {
GetAuthServers() ([]types.Server, error)

// GetCertAuthority returns cert authority by id
GetCertAuthority(id types.CertAuthID, loadKeys bool, opts ...services.MarshalOption) (types.CertAuthority, error)
GetCertAuthority(ctx context.Context, id types.CertAuthID, loadKeys bool, opts ...services.MarshalOption) (types.CertAuthority, error)

// GetCertAuthorities returns a list of cert authorities
GetCertAuthorities(caType types.CertAuthType, loadKeys bool, opts ...services.MarshalOption) ([]types.CertAuthority, error)
GetCertAuthorities(ctx context.Context, caType types.CertAuthType, loadKeys bool, opts ...services.MarshalOption) ([]types.CertAuthority, error)

// GetUser returns a services.User for this cluster.
GetUser(name string, withSecrets bool) (types.User, error)
Expand Down Expand Up @@ -182,10 +182,10 @@ type AccessPoint interface {
// AccessCache is a subset of the interface working on the certificate authorities
type AccessCache interface {
// GetCertAuthority returns cert authority by id
GetCertAuthority(id types.CertAuthID, loadKeys bool, opts ...services.MarshalOption) (types.CertAuthority, error)
GetCertAuthority(ctx context.Context, id types.CertAuthID, loadKeys bool, opts ...services.MarshalOption) (types.CertAuthority, error)

// GetCertAuthorities returns a list of cert authorities
GetCertAuthorities(caType types.CertAuthType, loadKeys bool, opts ...services.MarshalOption) ([]types.CertAuthority, error)
GetCertAuthorities(ctx context.Context, caType types.CertAuthType, loadKeys bool, opts ...services.MarshalOption) ([]types.CertAuthority, error)

// GetClusterConfig returns cluster level configuration.
GetClusterConfig(opts ...services.MarshalOption) (types.ClusterConfig, error)
Expand Down
Loading

0 comments on commit 0d18409

Please sign in to comment.