Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlpineImage ¶ added in v0.0.3
AlpineImage returns the Alpine image reference from docker/server.Dockerfile. This is the version we ship with, so integration tests should use it.
func ComposeServiceImage ¶ added in v0.0.3
ComposeServiceImage extracts the image for a named service from a docker-compose file, relative to the repo root. Panics on error so it can be used in TestMain and package-level vars.
func MakeBundle ¶
MakeBundle returns a valid tar.gz containing app.R and a DESCRIPTION file. The DESCRIPTION makes the bundle deployable without bare-script preprocessing.
func MakeBundleWithoutEntrypoint ¶
MakeBundleWithoutEntrypoint returns a valid tar.gz that has no app.R.
func MakeTraversalBundle ¶
MakeTraversalBundle returns a tar.gz with a path traversal entry.
func TOMLDockerImage ¶ added in v0.0.3
TOMLDockerImage reads the docker.image field from a blockyard.toml file, relative to the repo root.
Types ¶
type MockIdP ¶ added in v0.0.2
type MockIdP struct {
Server *httptest.Server
// Sub and Groups to include in issued ID tokens.
Sub string
Groups []string
// Nonce to embed in the next ID token. Tests should set this to the
// nonce extracted from the login redirect URL before calling /callback.
Nonce string
// contains filtered or unexported fields
}
MockIdP is a minimal OIDC-compliant mock identity provider for integration tests. Serves:
GET /.well-known/openid-configuration GET /jwks POST /token
func NewMockIdP ¶ added in v0.0.2
func NewMockIdP() *MockIdP
NewMockIdP starts a mock IdP on a random port. The default sub is "test-sub" with groups ["testers"].
func (*MockIdP) IssueJWT ¶ added in v0.0.2
IssueJWT creates a JWT for control-plane Bearer auth (client credentials style). Same signing key as ID tokens, different claims structure.
func (*MockIdP) PrivateKey ¶ added in v0.0.2
func (m *MockIdP) PrivateKey() *rsa.PrivateKey
PrivateKey returns the RSA private key used for signing.