Documentation ¶
Index ¶
- Constants
- Variables
- func AssertAccessDenied(t *testing.T, err error)
- func AssertAlreadyExists(t *testing.T, err error)
- func AssertBadParameter(t *testing.T, err error)
- func AssertCompareFailed(t *testing.T, err error)
- func AssertConnectionProblem(t *testing.T, err error)
- func AssertNotFound(t *testing.T, err error)
- type TLSConfig
Constants ¶
const ( TLSCACertPEM = apifixtures.TLSCACertPEM TLSCAKeyPEM = apifixtures.TLSCAKeyPEM // Backwards-compatibility alias for teleport.e SigningCertPEM = TLSCACertPEM )
const ( SSHCAPrivateKey = `` /* 1674-byte string literal not displayed */ SSHCAPublicKey = `` /* 380-byte string literal not displayed */ )
const ( JWTSignerPrivateKey = `` /* 1674-byte string literal not displayed */ JWTSignerPublicKey = `` /* 425-byte string literal not displayed */ )
const EncryptionCertPEM = `` /* 1938-byte string literal not displayed */
const EncryptionKeyPEM = `` /* 3271-byte string literal not displayed */
const SAMLOktaAuthRequestID = `_4d84cad1-1c61-4e4f-8ab6-1358b8d0da77`
const SAMLOktaAuthnResponseXML = `` /* 7629-byte string literal not displayed */
const SAMLOktaCertPEM = `` /* 1318-byte string literal not displayed */
const SAMLOktaConnectorV2 = `` /* 2657-byte string literal not displayed */
const SAMLOktaConnectorV2WithPadding = `` /* 2694-byte string literal not displayed */
const SAMLOktaSSO = `https://dev-813354.oktapreview.com/app/gravitationaldev813354_teleportsaml_1/exkafftca6RqPVgyZ0h7/sso/saml`
const UUID = "11111111-1111-1111-1111-111111111111"
UUID is the unique identifier used in tests
const UserCertificateLegacy = `` /* 1325-byte string literal not displayed */
UserCertificateLegacy is a SSH user certificate in the old legacy format.
const UserCertificateStandard = `` /* 1461-byte string literal not displayed */
UserCertificateRolesAndTraits is a SSH user certificate in the standard format with roles "admin" and traits "logins": []string{"foo"}.
Variables ¶
var LocalhostCert = []byte(`-----BEGIN CERTIFICATE-----
MIICEzCCAXygAwIBAgIQMIMChMLGrR+QvmQvpwAU6zANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw
MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
iQKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9SjY1bIw4
iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZBl2+XsDul
rKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQABo2gwZjAO
BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw
AwEB/zAuBgNVHREEJzAlggtleGFtcGxlLmNvbYcEfwAAAYcQAAAAAAAAAAAAAAAA
AAAAATANBgkqhkiG9w0BAQsFAAOBgQCEcetwO59EWk7WiJsG4x8SY+UIAA+flUI9
tyC4lNhbcF2Idq9greZwbYCqTTTr2XiRNSMLCOjKyI7ukPoPjo16ocHj+P3vZGfs
h1fIw3cSS2OolhloGw/XM6RWPWtPAlGykKLciQrBru5NAPvCMsb/I1DAceTiotQM
fblo6RBxUQ==
-----END CERTIFICATE-----`)
LocalhostCert is a PEM-encoded TLS cert with SAN IPs "127.0.0.1" and "[::1]", expiring at Jan 29 16:00:00 2084 GMT. generated from src/crypto/tls: go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
var LocalhostKey = []byte(testingKey(`-----BEGIN RSA TESTING KEY-----
MIICXgIBAAKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9
SjY1bIw4iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZB
l2+XsDulrKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQAB
AoGAGRzwwir7XvBOAy5tM/uV6e+Zf6anZzus1s1Y1ClbjbE6HXbnWWF/wbZGOpet
3Zm4vD6MXc7jpTLryzTQIvVdfQbRc6+MUVeLKwZatTXtdZrhu+Jk7hx0nTPy8Jcb
uJqFk541aEw+mMogY/xEcfbWd6IOkp+4xqjlFLBEDytgbIECQQDvH/E6nk+hgN4H
qzzVtxxr397vWrjrIgPbJpQvBsafG7b0dA4AFjwVbFLmQcj2PprIMmPcQrooz8vp
jy4SHEg1AkEA/v13/5M47K9vCxmb8QeD/asydfsgS5TeuNi8DoUBEmiSJwma7FXY
fFUtxuvL7XvjwjN5B30pNEbc6Iuyt7y4MQJBAIt21su4b3sjXNueLKH85Q+phy2U
fQtuUE9txblTu14q3N7gHRZB4ZMhFYyDy8CKrN2cPg/Fvyt0Xlp/DoCzjA0CQQDU
y2ptGsuSmgUtWj3NM9xuwYPm+Z/F84K6+ARYiZ6PYj013sovGKUFfYAqVXVlxtIX
qyUBnu3X9ps8ZfjLZO7BAkEAlT4R5Yl6cGhaJQYZHOde3JEMhNRcVFMO8dJDaFeo
f9Oeos0UUothgiDktdQHxdNEwLjQf7lJJBzV+5OtwswCWA==
-----END RSA TESTING KEY-----`))
LocalhostKey is the private key for localhostCert.
var PEMBytes = map[string][]byte{ "ecdsa": []byte(`-----BEGIN EC PRIVATE KEY----- MHcCAQEEINGWx0zo6fhJ/0EAfrPzVFyFC9s18lBt3cRoEDhS3ARooAoGCCqGSM49 AwEHoUQDQgAEi9Hdw6KvZcWxfg2IDhA7UkpDtzzt6ZqJXSsFdLd+Kx4S3Sx4cVO+ 6/ZOXRnPmNAlLUqjShUsUBBngG0u2fqEqA== -----END EC PRIVATE KEY-----`), "rsa": []byte(`-----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAz1MArBKUGR4pHEwGS8PC6buJcjY7IHd5E8N7bDezVlmkZhz3 2bMLCkKpoHGrcgL5UmiyTjcMZkfp/mVVkqGGQo+7ufiSbrUMgWhXpy0JL+ec2THY 9Q2LTF4VXE5Q1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8ivVM2nuvSNNVp+LUs9rWKZ3R2xyln3NOTLAHCMDUoAi TCY/YAECgYEA/VGBIoH4kozoY7SJAEjMPNzHFJDmUVo4U/bN/hGAcGM+YXjSnuO0 ljgSn7h7U2Z09KfIO8GjWtHq6K2gCw23of1D/CRPDIRvrONCVrhWcqebAcFD9Zw0 4EbPYDnTq4M9gC2RLsCIFVVL4Gsw9+4iSAKhCsHdW/dORUCDyBRbOwECgYEA4SLQ 0Myni4U7v8QVnwREJifjAvE0xrALpdF82CFgyimkCsgzxxBwdc2qhbtiIoNEYx/X OEPpFU+SuCAQe6xYCsjP3rh1kCN8ETu9NlnpD5o2BUYVgPR7xYYQ3aci/UYWHfZ1 BGus1PNkL+87d62bvMcpDC9VfAvjGAvOqqUPA2ECgYEAlB4EE9lLLuWVPDdjo/bs 9OlivnO7N/Y42V+GMvio0Q42e2faP22FOhCvUxTbh3hxClzQh6BBk+kKIeLjoZLz vJQKHHRehEMryTtYnrxKT+AQkoYe5o3fnQPKXclyKuciHsCGE4AgEdk99Iq4pz9m bBSddVzFwfBoo7WFWIgOkAECgYEAzS1cnx4Uh5vJ4y/CAKTzss5hHlpTHcxtIRa1 L4fj3PpsLQNd5Mp/o2znPm+StR9qoOfwza9eafSWI0Xdn8hmiJWQlEsJoW4lcNM/ 0pvIQlbpao7/pAGsF0zibA8ZXTeVioMFDB1RatXSdbkSOjS3HSloqFkvEBkJQu3n 0C8TaqECgYAic82i4ZMIJNeFtI2eGw2a89ofO3gpJvGmaJwY8RgZYWtU7+YiI1ts RBeQG4aFIeOs/3nf0n8pp/xsgreLVZJBXjoWyvw7pDi60N4C07d2gA+hqK3rAvQC 0Be4kdn0Jxx/OSYuGKl1PI0DB1RaCkWZHNay73amkkP+HD/BqcIeLA== -----END RSA PRIVATE KEY----- `), }
Functions ¶
func AssertAccessDenied ¶
AssertAccessDenied expects error to be access denied
func AssertAlreadyExists ¶
AssertAlreadyExists expects already exists error
func AssertBadParameter ¶
AssertBadParameter expects bad parameter error
func AssertCompareFailed ¶
AssertCompareFailed expects compare failed error
func AssertConnectionProblem ¶
AssertConnectionProblem expects connection problem error
func AssertNotFound ¶
AssertNotFound expects not found error
Types ¶
type TLSConfig ¶
type TLSConfig struct { // CertPool is a trusted certificate authority pool // that consists of self-signed cert CertPool *x509.CertPool // Certificate is a client x509 client cert Certificate *x509.Certificate // TLS is a TLS server configuration TLS *tls.Config }
TLSConfig is TLS configuration for running local TLS tests
func LocalTLSConfig ¶
LocalTLSConfig returns local TLS config with self-signed certificate