Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/auth/join_bound_keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"github.com/gravitational/teleport/api/types"
apievents "github.com/gravitational/teleport/api/types/events"
"github.com/gravitational/teleport/lib/boundkeypair"
"github.com/gravitational/teleport/lib/boundkeypair/boundkeypairexperiment"
"github.com/gravitational/teleport/lib/defaults"
"github.com/gravitational/teleport/lib/events"
"github.com/gravitational/teleport/lib/jwt"
Expand All @@ -53,13 +52,6 @@ type createBoundKeypairValidator func(subject string, clusterName string, public
// validateBoundKeypairTokenSpec performs some basic validation checks on a
// bound_keypair-type join token.
func validateBoundKeypairTokenSpec(spec *types.ProvisionTokenSpecV2BoundKeypair) error {
// Various constant checks, shared between creation and update. Many of
// these checks are temporary and will be removed alongside the experiment
// flag.
if !boundkeypairexperiment.Enabled() {
return trace.BadParameter("bound keypair joining experiment is not enabled")
}

if spec.Recovery == nil {
return trace.BadParameter("spec.bound_keypair.recovery: field is required")
}
Expand Down
16 changes: 6 additions & 10 deletions lib/auth/join_bound_keypair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/lib/auth/testauthority"
"github.com/gravitational/teleport/lib/boundkeypair"
"github.com/gravitational/teleport/lib/boundkeypair/boundkeypairexperiment"
"github.com/gravitational/teleport/lib/cryptosuites"
"github.com/gravitational/teleport/lib/sshutils"
"github.com/gravitational/teleport/lib/tlsca"
Expand Down Expand Up @@ -98,10 +97,9 @@ func parseJoinState(t *testing.T, state []byte) *boundkeypair.JoinState {
}

func TestServer_RegisterUsingBoundKeypairMethod(t *testing.T) {
ctx := context.Background()
t.Parallel()

// TODO: This prevents parallel execution; remove along with the experiment.
boundkeypairexperiment.SetEnabled(true)
ctx := context.Background()

_, correctPublicKey := testBoundKeypair(t)
_, rotatedPublicKey := testBoundKeypair(t)
Expand Down Expand Up @@ -937,10 +935,9 @@ func testExtractBotParamsFromCerts(t *testing.T, certs *proto.Certs) (string, ui
}

func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T) {
ctx := context.Background()
t.Parallel()

// TODO: This prevents parallel execution; remove along with the experiment.
boundkeypairexperiment.SetEnabled(true)
ctx := context.Background()

sshPrivateKey, sshPublicKey, err := testauthority.New().GenerateKeyPair()
require.NoError(t, err)
Expand Down Expand Up @@ -1117,10 +1114,9 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
}

func TestServer_RegisterUsingBoundKeypairMethod_JoinStateFailure(t *testing.T) {
ctx := context.Background()
t.Parallel()

// TODO: This prevents parallel execution; remove along with the experiment.
boundkeypairexperiment.SetEnabled(true)
ctx := context.Background()

sshPrivateKey, sshPublicKey, err := testauthority.New().GenerateKeyPair()
require.NoError(t, err)
Expand Down
43 changes: 0 additions & 43 deletions lib/boundkeypair/boundkeypairexperiment/experiment.go

This file was deleted.

4 changes: 0 additions & 4 deletions lib/web/join_tokens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import (
"github.com/gravitational/teleport/lib/auth/authclient"
"github.com/gravitational/teleport/lib/automaticupgrades"
"github.com/gravitational/teleport/lib/boundkeypair"
"github.com/gravitational/teleport/lib/boundkeypair/boundkeypairexperiment"
"github.com/gravitational/teleport/lib/defaults"
"github.com/gravitational/teleport/lib/fixtures"
"github.com/gravitational/teleport/lib/modules"
Expand Down Expand Up @@ -481,9 +480,6 @@ func TestCreateTokenExpiry(t *testing.T) {
},
})

// TODO: Remove this once bound keypair experiment flag is removed.
boundkeypairexperiment.SetEnabled(true)

ctx := context.Background()
username := "test-user@example.com"
env := newWebPack(t, 1)
Expand Down
Loading