forked from mtusi2026/mtusi2026lab7
Модель угроз, worker bounds и полный TLS аудит
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
[CmdletBinding()]
|
||||
param([string]$EnvFile = '.env')
|
||||
param(
|
||||
[string]$EnvFile = '.env',
|
||||
[switch]$SkipLivePolicy
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$projectRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
||||
@@ -76,6 +79,13 @@ $operatorArtifacts = @(Get-ChildItem -LiteralPath (Join-Path $projectRoot 'secre
|
||||
Where-Object { $_.Name -match '(?i)(root.*token|unseal)' })
|
||||
if($operatorArtifacts.Count -gt 0){ throw 'Root token or unseal material exists inside the project secrets tree' }
|
||||
|
||||
& "$PSScriptRoot\test-openbao-policies.ps1" -EnvFile $EnvFile
|
||||
if(-not $SkipLivePolicy) {
|
||||
& "$PSScriptRoot\test-openbao-policies.ps1" -EnvFile $EnvFile
|
||||
}
|
||||
|
||||
Write-Host 'PASS: OpenBao uses persistent raft storage outside dev mode; API/worker use separate AppRoles, scoped policies and read-only rendered files; operator material is absent.'
|
||||
Write-Host 'PASS: OpenBao uses persistent raft storage outside dev mode; API/worker use separate AppRoles and read-only rendered files; operator material is absent.'
|
||||
if($SkipLivePolicy) {
|
||||
Write-Host 'INFO: live scoped-policy probe skipped; it requires a non-expired 24 h AppRole SecretID.'
|
||||
} else {
|
||||
Write-Host 'PASS: scoped OpenBao allow/deny policies were verified with fresh AppRole credentials.'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user