Commit 1d1f2ac
committed
feat: implement comprehensive OCI publishing system for WebAssembly components
This commit introduces a complete OCI (Open Container Initiative) publishing
system for WebAssembly components using wasm-pkg-tools (wkg), providing
enterprise-grade container registry integration with advanced security features.
## Core Features Implemented
### Enhanced Provider System
- Extended providers.bzl with comprehensive OCI support providers
- Added WasmOciInfo for OCI image information and metadata
- Added WasmRegistryInfo for multi-registry configuration management
- Added WasmSecurityPolicyInfo for enterprise security governance
- Added WasmMultiArchInfo for multi-architecture component support
- Added metadata extraction and OCI annotation mapping providers
### OCI Publishing Rules (wkg/defs.bzl)
- wkg_registry_config: Multi-registry configuration with advanced authentication
- wasm_component_oci_image: Core OCI image preparation with signing integration
- wasm_component_publish: Single-registry publishing with validation
- wkg_multi_registry_publish: Enterprise multi-registry distribution
- wasm_component_oci_publish: End-to-end convenience macro
### Security Integration
- Seamless integration with existing wasmsign2 signing infrastructure
- Support for both embedded and detached signature types
- OpenSSH and compact key format compatibility
- Security policy framework with registry-specific requirements
- wasm_component_secure_publish with policy enforcement
### Multi-Architecture Support
- wasm_component_multi_arch_package for multi-platform components
- wasm_component_multi_arch_publish for comprehensive distribution
- Architecture-specific manifest generation and publishing
- Support for wasm32-wasi, wasm32-unknown, and custom targets
### Advanced Metadata and Annotations
- wasm_component_metadata_extract for component introspection
- wasm_component_oci_metadata_mapper for rich OCI annotations
- enhanced_oci_annotations helper for standardized metadata
- Compliance tag support (SOC2, GDPR, FIPS, PCI)
- Performance tier and security level categorization
### Registry Authentication
- Token-based authentication (GitHub, Docker Hub, etc.)
- OAuth 2.0 client credentials flow (AWS ECR, Azure ACR)
- Basic authentication with username/password
- Environment variable credential sourcing
- Credential file integration (docker config, kubernetes secrets)
- Registry mirrors and fallback mechanisms
## Production-Ready Examples
Added comprehensive examples/oci_publishing/ demonstrating:
- 25 complete working examples covering all features
- Multi-registry publishing workflows
- Security policy management and enforcement
- Multi-architecture component distribution
- Advanced OCI annotation and metadata mapping
- Integration with major container registries (GHCR, Docker Hub, ECR, ACR)
## Architecture Benefits
### Hermetic and Cross-Platform
- Pure Bazel implementation following "Bazel way" principles
- No shell script dependencies, fully hermetic builds
- Cross-platform compatibility (Linux, macOS, Windows)
- Proper toolchain integration with existing WASM infrastructure
### Enterprise Security
- Comprehensive security policy framework
- Automated signing workflows with policy enforcement
- Support for enterprise key management systems
- Audit trail and compliance features
### Scalable Distribution
- Multi-registry publishing for high availability
- Registry mirror support for global distribution
- Parallel publishing with configurable failure handling
- Caching and optimization for CI/CD pipelines
## Integration Points
- Seamless integration with existing signing (wasmsign2) infrastructure
- Compatible with WAC (WebAssembly Composition) for next phase
- Designed for production CI/CD pipeline integration
- Supports existing component build targets without modification
This implementation provides a complete foundation for enterprise WebAssembly
component distribution using industry-standard OCI registries, with advanced
security, multi-architecture support, and comprehensive metadata management.1 parent a82bb09 commit 1d1f2ac
File tree
95 files changed
+5472
-1506
lines changed- .github/workflows
- checksums/tools
- cpp
- examples
- cpp_component
- data_structures
- http_service
- multi_language_composition
- oci_publishing
- src
- wasm_signing
- src
- wit
- wasmtime_runtime
- src
- bin
- go
- providers
- rust
- tests/scratch
- toolchains
- tools
- checksum_updater_wasm
- src
- wit
- checksum_updater
- src
- tests
- checksum_validator_multi
- go_downloader
- production_checksum_updater
- rust_validator
- src
- wit
- http_downloader_go
- src
- wit
- wizer_initializer/src
- wasm
- wkg
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
95 files changed
+5472
-1506
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | | - | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
149 | | - | |
| 158 | + | |
| 159 | + | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
| 165 | + | |
155 | 166 | | |
156 | 167 | | |
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| 179 | + | |
167 | 180 | | |
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | | - | |
| 184 | + | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
| |||
180 | 194 | | |
181 | 195 | | |
182 | 196 | | |
183 | | - | |
| 197 | + | |
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
| |||
189 | 203 | | |
190 | 204 | | |
191 | 205 | | |
192 | | - | |
| 206 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | | - | |
| 61 | + | |
0 commit comments