photoncloud-monorepo/docs/por/T035-vm-integration-test/vm-all-services.nix
centra d2149b6249 fix(lightningstor): Fix SigV4 canonicalization for AWS S3 auth
- Replace form_urlencoded with RFC 3986 compliant URI encoding
- Implement aws_uri_encode() matching AWS SigV4 spec exactly
- Unreserved chars (A-Z,a-z,0-9,-,_,.,~) not encoded
- All other chars percent-encoded with uppercase hex
- Preserve slashes in paths, encode in query params
- Normalize empty paths to '/' per AWS spec
- Fix test expectations (body hash, HMAC values)
- Add comprehensive SigV4 signature determinism test

This fixes the canonicalization mismatch that caused signature
validation failures in T047. Auth can now be enabled for production.

Refs: T058.S1
2025-12-12 06:23:46 +09:00

70 lines
2 KiB
Nix

# NixOS VM Configuration - All PlasmaCloud Services
# T035: QEMU VM Integration Test
#
# This configuration creates a QEMU VM with all 12 PlasmaCloud services
# for integration testing and MVP-Alpha validation.
{ config, pkgs, modulesPath, lib, ... }:
{
imports = [
# CRITICAL: Import qemu-vm module for virtualisation options
(modulesPath + "/virtualisation/qemu-vm.nix")
# PlasmaCloud service modules
../../../nix/modules/chainfire.nix
../../../nix/modules/flaredb.nix
../../../nix/modules/iam.nix
../../../nix/modules/plasmavmc.nix
../../../nix/modules/prismnet.nix
../../../nix/modules/flashdns.nix
../../../nix/modules/fiberlb.nix
../../../nix/modules/lightningstor.nix
../../../nix/modules/k8shost.nix
../../../nix/modules/nightlight.nix
];
# VM configuration (these options now exist due to qemu-vm.nix import)
virtualisation = {
memorySize = 4096; # 4GB RAM
diskSize = 10240; # 10GB disk
forwardPorts = [
{ from = "host"; host.port = 2222; guest.port = 22; }
{ from = "host"; host.port = 8080; guest.port = 8080; }
];
};
# Enable all PlasmaCloud services
services.chainfire.enable = true;
services.flaredb.enable = true;
services.iam.enable = true;
services.plasmavmc.enable = true;
services.prismnet.enable = true;
services.flashdns.enable = true;
services.fiberlb.enable = true;
services.lightningstor.enable = true;
services.k8shost.enable = true;
services.nightlight.enable = true;
# Basic system config
networking.hostName = "plasma-test-vm";
networking.firewall.enable = false;
services.openssh.enable = true;
users.users.root.initialPassword = "test";
# Boot config for VM
boot.loader.grub.device = "nodev";
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
# System state version
system.stateVersion = "24.05";
# Essential packages
environment.systemPackages = with pkgs; [
curl
jq
grpcurl
htop
vim
];
}