fixtures

package
v1.2.3-fred.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 8 Imported by: 78

Documentation

Index

Constants

View Source
const (
	TLSCACertPEM = `` /* 1158-byte string literal not displayed */

	TLSCAKeyPEM = `` /* 1674-byte string literal not displayed */

	// Backwards-compatibility alias for teleport.e
	SigningCertPEM = TLSCACertPEM
)
View Source
const (
	SSHCAPrivateKey = `` /* 1674-byte string literal not displayed */

	SSHCAPublicKey = `` /* 380-byte string literal not displayed */
)
View Source
const (
	JWTSignerPrivateKey = `` /* 1674-byte string literal not displayed */

	JWTSignerPublicKey = `` /* 425-byte string literal not displayed */

)
View Source
const EncryptionCertPEM = `` /* 1938-byte string literal not displayed */
View Source
const EncryptionKeyPEM = `` /* 3271-byte string literal not displayed */
View Source
const SAMLOktaAuthRequestID = `_4d84cad1-1c61-4e4f-8ab6-1358b8d0da77`
View Source
const SAMLOktaAuthnResponseXML = `` /* 7629-byte string literal not displayed */
View Source
const SAMLOktaCertPEM = `` /* 1318-byte string literal not displayed */
View Source
const SAMLOktaConnectorV2 = `` /* 2657-byte string literal not displayed */
View Source
const SAMLOktaSSO = `https://dev-813354.oktapreview.com/app/gravitationaldev813354_teleportsaml_1/exkafftca6RqPVgyZ0h7/sso/saml`
View Source
const UUID = "11111111-1111-1111-1111-111111111111"

UUID is the unique identifier used in tests

View Source
const UserCertificateLegacy = `` /* 1325-byte string literal not displayed */

UserCertificateLegacy is a SSH user certificate in the old legacy format.

View Source
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

View Source
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

View Source
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.

View Source
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/3mc0yTxwm1DQsOMc5eysFDlOoztkkrTo1SF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8HWmfwGLzHhqQbNVG
gQx9haKV4PbjHtbx5uMF089FIacyLnjWaP/ydH6US9IIZ2ohTPjC8g876NenRCZd
MHeDg2Bs7/XZsIrn6vo7kXmQSoQKA8O2E7rYSigUayBKa/+5thbnjKlEP+slBzmp
1zVRrQKBgHmGNSOpSuQiHRn9YuzZ/h5dX8jCLf+wHJzymCC1wVur8IxJjhhSuOIp
7JPquig/B6L2pNoxPa41VDGawQjJY5m4l3ap/oJj61HBB+Auf29BWXqg7V7B7XMB
NFJgTFxC2o3mVBkQ/s6FeDl62hpMheCuO6jRYbZjsM2tUeAKORws
-----END RSA PRIVATE KEY-----`),
}

Functions

func AssertAccessDenied

func AssertAccessDenied(t *testing.T, err error)

AssertAccessDenied expects error to be access denied

func AssertAlreadyExists

func AssertAlreadyExists(t *testing.T, err error)

AssertAlreadyExists expects already exists error

func AssertBadParameter

func AssertBadParameter(t *testing.T, err error)

AssertBadParameter expects bad parameter error

func AssertCompareFailed

func AssertCompareFailed(t *testing.T, err error)

AssertCompareFailed expects compare failed error

func AssertConnectionProblem

func AssertConnectionProblem(t *testing.T, err error)

AssertConnectionProblem expects connection problem error

func AssertNotFound

func AssertNotFound(t *testing.T, err error)

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

func LocalTLSConfig() (*TLSConfig, error)

LocalTLSConfig returns local TLS config with self-signed certificate

func (*TLSConfig) NewClient

func (t *TLSConfig) NewClient() *http.Client

NewClient creates a HTTP client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL