Documentation
¶
Overview ¶
Package ctstest serves a fake CipherStash Token Service over TLS that signs tokens with a test key, for auth and manage tests.
Index ¶
Constants ¶
const ( CRN = "crn:ap-southeast-2.aws:GXT2N5F4X2SKVEJX" Workspace = "GXT2N5F4X2SKVEJX" AccessKey = "CSAKtest-id.test-secret" Host = "ap-southeast-2.aws.cts.cipherstashmanaged.net" Issuer = "https://" + Host + "/" Audience = "ap-southeast-2.aws.viturhosted.net" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CTS ¶
type CTS struct {
// contains filtered or unexported fields
}
func New ¶
func New(t *testing.T, authorize http.HandlerFunc) *CTS
New serves signing keys and validates access-key exchange requests before passing them to authorize. Requests without the expected User-Agent fail.
func (*CTS) Rotate ¶
Rotate replaces the signing key with a new key under a new key ID and publishes only the new key.
func (*CTS) SignWithUnpublishedKey ¶
SignWithUnpublishedKey signs with a new key under the published key ID, for signature failures.
func (*CTS) Transport ¶
func (c *CTS) Transport() http.RoundTripper
Transport routes requests for the real CTS host to the fake, keeping the public issuer in signed tokens.