@@ -36,6 +36,7 @@ import (
36
36
"github.com/gravitational/teleport/api/types"
37
37
"github.com/gravitational/teleport/lib/auth/testauthority"
38
38
"github.com/gravitational/teleport/lib/boundkeypair"
39
+ "github.com/gravitational/teleport/lib/boundkeypair/boundkeypairexperiment"
39
40
"github.com/gravitational/teleport/lib/cryptosuites"
40
41
"github.com/gravitational/teleport/lib/sshutils"
41
42
"github.com/gravitational/teleport/lib/tlsca"
@@ -843,7 +844,7 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
843
844
BotName : "test" ,
844
845
BoundKeypair : & types.ProvisionTokenSpecV2BoundKeypair {
845
846
Onboarding : & types.ProvisionTokenSpecV2BoundKeypair_OnboardingSpec {
846
- RegistrationSecret : "insecure" ,
847
+ InitialPublicKey : correctPublicKey ,
847
848
},
848
849
Recovery : & types.ProvisionTokenSpecV2BoundKeypair_RecoverySpec {
849
850
Limit : 2 ,
@@ -871,12 +872,6 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
871
872
return req
872
873
}
873
874
874
- withSecret := func (secret string ) func (r * proto.RegisterUsingBoundKeypairInitialRequest ) {
875
- return func (r * proto.RegisterUsingBoundKeypairInitialRequest ) {
876
- r .InitialJoinSecret = secret
877
- }
878
- }
879
-
880
875
withJoinState := func (state []byte ) func (r * proto.RegisterUsingBoundKeypairInitialRequest ) {
881
876
return func (r * proto.RegisterUsingBoundKeypairInitialRequest ) {
882
877
r .PreviousJoinState = state
@@ -893,7 +888,7 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
893
888
}
894
889
895
890
solver := newMockSolver (t , correctPublicKey )
896
- response , err := auth .RegisterUsingBoundKeypairMethod (ctx , makeInitReq (withSecret ( "insecure" ) ), solver .solver ())
891
+ response , err := auth .RegisterUsingBoundKeypairMethod (ctx , makeInitReq (), solver .solver ())
897
892
require .NoError (t , err )
898
893
899
894
instance , generation := testExtractBotParamsFromCerts (t , response .Certs )
@@ -902,7 +897,7 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
902
897
firstInstance := instance
903
898
904
899
// Register several times.
905
- for i := 0 ; i < 10 ; i ++ {
900
+ for i := range 10 {
906
901
response , err = auth .RegisterUsingBoundKeypairMethod (
907
902
ctx ,
908
903
makeInitReq (withJoinState (response .JoinState ), withBotParamsFromIdent (t , response .Certs )),
@@ -926,7 +921,7 @@ func TestServer_RegisterUsingBoundKeypairMethod_GenerationCounter(t *testing.T)
926
921
secondInstance := instance
927
922
928
923
// Register several more times.
929
- for i := 0 ; i < 10 ; i ++ {
924
+ for i := range 10 {
930
925
response , err = auth .RegisterUsingBoundKeypairMethod (
931
926
ctx ,
932
927
makeInitReq (withJoinState (response .JoinState ), withBotParamsFromIdent (t , response .Certs )),
0 commit comments