Implement comprehensive audit and security infrastructure: - Immutable audit logs with platform-specific backends (Linux/Other) - Sealed log entries with tamper-evident checksums - Audit alert system for real-time security notifications - Log rotation with retention policies - Checkpoint-based audit verification Add multi-tenant security features: - Tenant manager with quota enforcement - Middleware for tenant authentication/authorization - Per-tenant cryptographic key isolation - Supply chain security for container verification - Cross-platform secure file utilities (Unix/Windows) Add test coverage: - Unit tests for audit alerts and sealed logs - Platform-specific audit backend tests
30 lines
942 B
Go
30 lines
942 B
Go
//go:build !linux
|
|
// +build !linux
|
|
|
|
// Package platform provides platform-specific utilities for the audit system
|
|
package platform
|
|
|
|
import "fmt"
|
|
|
|
// MakeImmutable sets the immutable flag on a file.
|
|
// Not supported on non-Linux platforms.
|
|
func MakeImmutable(path string) error {
|
|
return fmt.Errorf("immutable flag not supported on this platform (requires Linux with chattr)")
|
|
}
|
|
|
|
// MakeAppendOnly sets the append-only flag.
|
|
// Not supported on non-Linux platforms.
|
|
func MakeAppendOnly(path string) error {
|
|
return fmt.Errorf("append-only flag not supported on this platform (requires Linux with chattr)")
|
|
}
|
|
|
|
// ClearImmutable removes the immutable flag from a file.
|
|
// Not supported on non-Linux platforms.
|
|
func ClearImmutable(path string) error {
|
|
return fmt.Errorf("immutable flag not supported on this platform (requires Linux with chattr)")
|
|
}
|
|
|
|
// IsSupported returns false on non-Linux platforms
|
|
func IsSupported() bool {
|
|
return false
|
|
}
|