-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9a928e
commit 1adcb75
Showing
15 changed files
with
768 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ import ( | |
"github.com/gravitational/teleport/lib/auth/test" | ||
"github.com/gravitational/teleport/lib/cryptosuites" | ||
"github.com/gravitational/teleport/lib/services" | ||
"github.com/gravitational/teleport/lib/sshca" | ||
) | ||
|
||
type nativeContext struct { | ||
|
@@ -226,23 +227,24 @@ func TestUserCertCompatibility(t *testing.T) { | |
for i, tc := range tests { | ||
comment := fmt.Sprintf("Test %v", i) | ||
|
||
userCertificateBytes, err := tt.suite.A.GenerateUserCert(services.UserCertParams{ | ||
CASigner: caSigner, | ||
PublicUserKey: ssh.MarshalAuthorizedKey(caSigner.PublicKey()), | ||
Username: "user", | ||
AllowedLogins: []string{"centos", "root"}, | ||
TTL: time.Hour, | ||
Roles: []string{"foo"}, | ||
CertificateExtensions: []*types.CertExtension{{ | ||
Type: types.CertExtensionType_SSH, | ||
Mode: types.CertExtensionMode_EXTENSION, | ||
Name: "[email protected]", | ||
Value: "hello", | ||
userCertificateBytes, err := tt.suite.A.GenerateUserCert(sshca.UserCertificateRequest{ | ||
CASigner: caSigner, | ||
PublicUserKey: ssh.MarshalAuthorizedKey(caSigner.PublicKey()), | ||
TTL: time.Hour, | ||
CertificateFormat: tc.inCompatibility, | ||
Identity: sshca.Identity{ | ||
Username: "user", | ||
AllowedLogins: []string{"centos", "root"}, | ||
Roles: []string{"foo"}, | ||
CertificateExtensions: []*types.CertExtension{{ | ||
Type: types.CertExtensionType_SSH, | ||
Mode: types.CertExtensionMode_EXTENSION, | ||
Name: "[email protected]", | ||
Value: "hello", | ||
}}, | ||
PermitAgentForwarding: true, | ||
PermitPortForwarding: true, | ||
}, | ||
}, | ||
CertificateFormat: tc.inCompatibility, | ||
PermitAgentForwarding: true, | ||
PermitPortForwarding: true, | ||
}) | ||
require.NoError(t, err, comment) | ||
|
||
|
Oops, something went wrong.