mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
hanzoai/s3 was an AGPL-3.0 MinIO fork whose network-copyleft blocks embedding
and reselling as a managed service. Replace it wholesale with a fork of
SeaweedFS (github.com/seaweedfs/seaweedfs, Apache-2.0, Go) which ships a
built-in S3 gateway + Filer.
- License: AGPL-3.0 -> Apache-2.0 (upstream LICENSE kept verbatim, incl.
"Copyright 2025 Chris Lu"); NOTICE added crediting SeaweedFS. No AGPL/BUSL/
SSPL/GPL or enterprise ("ee") files remain.
- Module: go.mod path set to github.com/hanzoai/s3 with a self-replace
(replace github.com/seaweedfs/seaweedfs => ./) so the ~1800 internal Go files
keep their upstream import paths with zero churn. Internal identifiers and
import paths are intentionally NOT renamed.
- CLI rebrand: the binary is built as `s3` (was `weed`); root usage, per-command
help/usage/flag strings, shell autocomplete program name, and the product name
in CLI output now read "Hanzo S3" / `s3`. Users never see `weed`.
(e.g. `s3 server`, `s3 filer`, `s3 master`, `s3 volume`, `s3 s3`, `s3 mount`.)
- Build: `make` (or `go build -o s3 ./weed`) builds the `s3` binary green;
`cmd/weed-db` and `cmd/weed-sql` also build; `go vet ./weed/command/` clean.
- README/LLM.md rewritten for Hanzo S3; AGENTS.md/CLAUDE.md symlinks preserved.
- Dropped a 33MB prebuilt Mach-O `stress` binary upstream had committed; `.gitignore`
updated to ignore the `s3` build output.
66 lines
2.7 KiB
Terraform
66 lines
2.7 KiB
Terraform
output "ca_cert_pem" {
|
|
description = "CA certificate PEM."
|
|
value = tls_self_signed_cert.ca.cert_pem
|
|
}
|
|
|
|
output "certs" {
|
|
description = "Per-component { cert_pem, private_key_pem }."
|
|
value = {
|
|
for c in local.components : c => {
|
|
cert_pem = tls_locally_signed_cert.component[c].cert_pem
|
|
private_key_pem = tls_private_key.component[c].private_key_pem
|
|
}
|
|
}
|
|
sensitive = true
|
|
}
|
|
|
|
output "jwt" {
|
|
description = "Generated JWT keys (empty strings when generate_jwt = false)."
|
|
value = {
|
|
signing = var.generate_jwt ? random_password.jwt["signing"].result : ""
|
|
signing_read = var.generate_jwt ? random_password.jwt["signing_read"].result : ""
|
|
filer_signing = var.generate_jwt ? random_password.jwt["filer_signing"].result : ""
|
|
filer_signing_read = var.generate_jwt ? random_password.jwt["filer_signing_read"].result : ""
|
|
}
|
|
sensitive = true
|
|
}
|
|
|
|
# Ready to pass straight to the core module's `security` variable.
|
|
output "core_security" {
|
|
description = "Object shaped for the core module's `security` input (cert_dir, allowed_wildcard_domain, JWT keys)."
|
|
value = {
|
|
cert_dir = var.cert_dir
|
|
allowed_wildcard_domain = ".${var.internal_domain}"
|
|
allowed_common_names = ""
|
|
jwt_signing_key = var.generate_jwt ? random_password.jwt["signing"].result : ""
|
|
jwt_signing_read_key = var.generate_jwt ? random_password.jwt["signing_read"].result : ""
|
|
jwt_filer_signing_key = var.generate_jwt ? random_password.jwt["filer_signing"].result : ""
|
|
jwt_filer_signing_read_key = var.generate_jwt ? random_password.jwt["filer_signing_read"].result : ""
|
|
}
|
|
sensitive = true
|
|
}
|
|
|
|
# Non-sensitive manifest (key, on-host path, mode) so a wrapper can for_each
|
|
# over SSM/secret-store resources without tripping the sensitive-for_each rule.
|
|
output "secret_manifest" {
|
|
description = "List of { key, path, mode } for the CA + component cert/key files (no content)."
|
|
value = concat(
|
|
[{ key = "ca/tls.crt", path = "${var.cert_dir}/ca/tls.crt", mode = "0644" }],
|
|
flatten([for c in local.components : [
|
|
{ key = "${c}/tls.crt", path = "${var.cert_dir}/${c}/tls.crt", mode = "0644" },
|
|
{ key = "${c}/tls.key", path = "${var.cert_dir}/${c}/tls.key", mode = "0600" },
|
|
]]),
|
|
)
|
|
}
|
|
|
|
# Sensitive map keyed by the manifest key -> file content.
|
|
output "secret_contents" {
|
|
description = "Map of manifest key -> PEM content."
|
|
value = merge(
|
|
{ "ca/tls.crt" = tls_self_signed_cert.ca.cert_pem },
|
|
{ for c in local.components : "${c}/tls.crt" => tls_locally_signed_cert.component[c].cert_pem },
|
|
{ for c in local.components : "${c}/tls.key" => tls_private_key.component[c].private_key_pem },
|
|
)
|
|
sensitive = true
|
|
}
|