Skip to content

Refactor: runtime package#140

Merged
aruokhai merged 25 commits into
tls_keyfrom
refactor/runtime
Jul 13, 2026
Merged

Refactor: runtime package#140
aruokhai merged 25 commits into
tls_keyfrom
refactor/runtime

Conversation

@chris-ricketts

Copy link
Copy Markdown
Contributor

Summary:

  • Split runtime.go (1,303 → 363 lines) into servers.go, tls.go, network.go, dek.go, ssm.go, ssm_ttl_cache.go, migrate.go
  • Renamed viproxy_setup.gonetwork.go
  • Merged imds.go into aws_clients.go
  • Merged transport.go, middleware.go, runtime_handlers.go into servers.go
  • Replaced acme.go with acme_cache.go
  • Merged nitriding_config.go into config.go
  • Replaced policy_builder.go with kms_policy.go; verification of PRC0 gated actions now only allows previous and/or current PCR0
  • Replaced storage.go with dek.go
  • Replaced signature.go; PCR0 signature loading absorbed into environment/nsm
  • Rewrote nsm.go; added attestation option plumbing
  • Added interfaces between subsystems (KVStore, RuntimeState, Migrator, DEK, etc.) to hide struct fields across files
  • Removed go-chi/chi; routing via net/http.ServeMux
  • Added nitriding/system_darwin.go for local builds
  • New tests: nsm_test.go, kms_policy_test.go, logging_test.go, servers_test.go, migrate_test.go, dek_test.go, ssm_test.go, ssm_ttl_cache_test.go, kms_test.go, acme_cache_test.go
  • Consolidated RESP/kvstore test suites; shared fakes moved to utils_test.go
  • Net: prod 10,562 → 9,945 lines; tests 5,960 → 6,544;

Incorporates changes from #133 and #135

@aruokhai
aruokhai changed the base branch from master to tls_key July 7, 2026 10:15
Comment thread runtime/servers.go Outdated
Comment thread runtime/servers.go Outdated
Comment thread runtime/servers.go Outdated
Comment thread runtime/servers.go Outdated
Comment thread runtime/servers.go Outdated
Comment thread runtime/servers.go Outdated
Comment thread runtime/static_secret.go Outdated
Comment thread runtime/tls.go

@aruokhai aruokhai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have state Root, wondering why this is necessary

Comment thread runtime/state_origin.go Outdated
Comment thread runtime/attestation.go Outdated
Comment thread runtime/migrate.go
Comment thread runtime/resp.go Outdated
@aruokhai
aruokhai merged commit 449a07b into tls_key Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants