Documentation
¶
Overview ¶
Package provisionworker processes managed instance provisioning jobs from SQS.
Index ¶
- Constants
- Variables
- func ConsentEncryptionKeyHex(keyHex string) ([]byte, error)
- func DecryptConsent(encoded string, key []byte) (string, error)
- func EncryptConsent(plaintext string, key []byte) (string, error)
- func New(opts ...apptheory.Option) *apptheory.App
- func PackConsent(message, signature string) ([]byte, error)
- func Register(app *apptheory.App, srv *Server) *apptheory.App
- func UnpackConsent(raw []byte) (message string, signature string)
- func ValidateManagedLesserBodyReleaseCompatibility(ctx context.Context, client *http.Client, owner string, repo string, ...) error
- func ValidateManagedLesserBodyReleaseTemplatePreflight(ctx context.Context, client *http.Client, owner string, repo string, ...) (string, error)
- func ValidateManagedLesserBodyReleaseVersionSupported(version string) error
- func ValidateManagedLesserReleaseCompatibility(ctx context.Context, client *http.Client, owner string, repo string, ...) error
- func ValidateManagedLesserReleaseVersionSupported(version string) error
- type ManagedLesserBodyAuxiliaryAssetsContract
- type ManagedLesserBodyCompatibilityContract
- type ManagedLesserBodyDeployContract
- type ManagedLesserBodyDeployManifestContract
- type ManagedLesserBodyDeployTemplatesContract
- type ManagedLesserBodyPathContract
- type ManagedLesserCompatibilityContract
- type ManagedLesserLambdaBundleContract
- type ManagedReleaseChecksumsContract
- type Server
Constants ¶
const ServiceName = "provision-worker"
ServiceName is the canonical service identifier for the provisioning worker.
Variables ¶
var ErrConsentEncryptionKeyRequired = errors.New("consent encryption key is required")
ErrConsentEncryptionKeyRequired is returned when the consent encryption key is empty or missing.
Functions ¶
func ConsentEncryptionKeyHex ¶ added in v0.4.5
ConsentEncryptionKeyHex decodes a hex-encoded consent encryption key string into a 32-byte key suitable for EncryptConsent / DecryptConsent. Returns an error if the key is not exactly 64 hex characters (32 bytes).
func DecryptConsent ¶ added in v0.4.5
DecryptConsent decrypts a consent value that was encrypted with EncryptConsent. If the value does not have the "enc:v1:" prefix, it is returned as-is for backward compatibility with legacy plaintext consent. Returns the exact decrypted bytes on success (no trimming).
func EncryptConsent ¶ added in v0.4.5
EncryptConsent encrypts a plaintext consent payload using AES-256-GCM with the supplied 32-byte key. Returns a base64-encoded ciphertext prefixed with "enc:v1:" so the decryption path can distinguish encrypted values from legacy plaintext consent stored in older job records.
The plaintext is encrypted as-is (no trimming) so that signed consent bytes round-trip exactly.
func PackConsent ¶ added in v0.4.5
PackConsent serializes a consent message and signature into a JSON byte slice suitable for encryption. The message and signature bytes are preserved exactly — no trimming is applied by this function.
func UnpackConsent ¶ added in v0.4.5
UnpackConsent deserializes an encrypted-then-decrypted consent payload JSON back into message and signature. If the payload cannot be parsed as a consentCryptoPacket, it is treated as a plain message with no signature for backward compatibility with legacy non-structured payloads.
func ValidateManagedLesserBodyReleaseCompatibility ¶ added in v0.2.3
func ValidateManagedLesserBodyReleaseTemplatePreflight ¶ added in v0.2.3
func ValidateManagedLesserBodyReleaseVersionSupported ¶ added in v0.2.3
func ValidateManagedLesserReleaseCompatibility ¶ added in v0.2.3
func ValidateManagedLesserReleaseVersionSupported ¶ added in v0.2.3
Types ¶
type ManagedLesserBodyAuxiliaryAssetsContract ¶ added in v0.3.2
type ManagedLesserBodyCompatibilityContract ¶ added in v0.2.3
type ManagedLesserBodyCompatibilityContract struct {
SchemaVersion int `json:"schema_version"`
ReleaseName string `json:"release_name"`
MinimumReleaseVersion string `json:"minimum_release_version"`
ReleaseManifestAsset string `json:"release_manifest_asset"`
ReleaseManifestSchema int `json:"release_manifest_schema"`
SupportedReleaseManifestSchemas []int `json:"supported_release_manifest_schemas"`
Checksums ManagedReleaseChecksumsContract `json:"checksums"`
DeployManifest ManagedLesserBodyDeployManifestContract `json:"deploy_manifest"`
Deploy ManagedLesserBodyDeployContract `json:"deploy"`
LambdaZip ManagedLesserBodyPathContract `json:"lambda_zip"`
DeployScript ManagedLesserBodyPathContract `json:"deploy_script"`
SupportedStages []string `json:"supported_stages"`
DeployTemplates ManagedLesserBodyDeployTemplatesContract `json:"deploy_templates"`
AuxiliaryAssets ManagedLesserBodyAuxiliaryAssetsContract `json:"auxiliary_assets"`
}
func CurrentManagedLesserBodyCompatibilityContract ¶ added in v0.2.3
func CurrentManagedLesserBodyCompatibilityContract() ManagedLesserBodyCompatibilityContract
type ManagedLesserBodyDeployContract ¶ added in v0.2.3
type ManagedLesserBodyDeployContract struct {
SchemaVersion int `json:"schema_version"`
SupportedSchemaVersions []int `json:"supported_schema_versions"`
ManifestPath string `json:"manifest_path"`
TemplateSelection string `json:"template_selection"`
SourceCheckoutRequired bool `json:"source_checkout_required"`
NPMInstallRequired bool `json:"npm_install_required"`
SupportedRequiredCapabilities []string `json:"supported_required_capabilities"`
}
type ManagedLesserBodyDeployManifestContract ¶ added in v0.2.3
type ManagedLesserBodyDeployTemplatesContract ¶ added in v0.2.3
type ManagedLesserBodyDeployTemplatesContract struct {
Format string `json:"format"`
}
type ManagedLesserBodyPathContract ¶ added in v0.2.3
type ManagedLesserBodyPathContract struct {
Path string `json:"path"`
}
type ManagedLesserCompatibilityContract ¶ added in v0.2.3
type ManagedLesserCompatibilityContract struct {
SchemaVersion int `json:"schema_version"`
ReleaseName string `json:"release_name"`
MinimumReleaseVersion string `json:"minimum_release_version"`
ReleaseManifestAsset string `json:"release_manifest_asset"`
ReleaseManifestSchema int `json:"release_manifest_schema"`
MinimumReceiptSchema int `json:"minimum_receipt_schema_version"`
DeployArtifactsSchema int `json:"deploy_artifacts_schema_version"`
LambdaBundle ManagedLesserLambdaBundleContract `json:"lambda_bundle"`
}
func CurrentManagedLesserCompatibilityContract ¶ added in v0.2.3
func CurrentManagedLesserCompatibilityContract() ManagedLesserCompatibilityContract
type ManagedLesserLambdaBundleContract ¶ added in v0.2.3
type ManagedReleaseChecksumsContract ¶ added in v0.2.3
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server processes provisioning jobs from the worker queue.
Source Files
¶
- advance_body_mcp.go
- app.go
- codebuild_idempotency.go
- consent_crypto.go
- constants.go
- deploy_runner_trust.go
- deploy_runner_validation.go
- doc.go
- managed_instance_key_secrets.go
- managed_stage.go
- outbound_ssrf.go
- provision_instance_config_helpers.go
- receipts.go
- release_compatibility.go
- release_compatibility_lesser_body.go
- release_preflight.go
- release_preflight_lesser_body.go
- server.go
- server_helpers.go
- store_helpers.go
- tokens.go
- update_builder_helpers.go
- update_deploy_runner.go
- update_job_phase_helpers.go
- update_jobs.go
- update_jobs_body_artifacts.go
- update_jobs_body_failures.go
- update_jobs_receipts.go
- update_jobs_recovery.go
- update_runtime_config.go
- update_trust_auth.go
- update_verify_failure.go