fix(gates): require secret-safe observer credentials
This commit is contained in:
parent
772526d0cd
commit
fa3e7978ec
5 changed files with 36 additions and 22 deletions
|
|
@ -3,10 +3,10 @@ param(
|
|||
[string]$Repository = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path,
|
||||
[string]$Account = $env:ACDREAM_TEST_USER,
|
||||
[string]$Password = $env:ACDREAM_TEST_PASS,
|
||||
[string]$ObserverAccount,
|
||||
[string]$ObserverPassword,
|
||||
[string]$ObserverAccount = $env:ACDREAM_TEST_OBSERVER_USER,
|
||||
[string]$ObserverPassword = $env:ACDREAM_TEST_OBSERVER_PASS,
|
||||
[ValidateRange(0, [int]::MaxValue)][int]$PrimaryCharacterIndex = 0,
|
||||
[ValidateRange(0, [int]::MaxValue)][int]$ObserverCharacterIndex = 1,
|
||||
[ValidateRange(0, [int]::MaxValue)][int]$ObserverCharacterIndex = 0,
|
||||
[switch]$SkipBuild,
|
||||
[int]$LoginTimeoutSeconds = 90
|
||||
)
|
||||
|
|
@ -19,8 +19,9 @@ if ([string]::IsNullOrWhiteSpace($Account)) { $Account = 'testaccount' }
|
|||
if ([string]::IsNullOrWhiteSpace($Password)) { $Password = 'testpassword' }
|
||||
if ([string]::IsNullOrWhiteSpace($ObserverAccount)) { $ObserverAccount = $Account }
|
||||
if ([string]::IsNullOrWhiteSpace($ObserverPassword)) { $ObserverPassword = $Password }
|
||||
if ($PrimaryCharacterIndex -eq $ObserverCharacterIndex) {
|
||||
throw 'Primary and observer character indexes must differ.'
|
||||
if ([string]::Equals($Account, $ObserverAccount, [StringComparison]::OrdinalIgnoreCase)) {
|
||||
throw ('Remote-player shadow evidence requires distinct ACE accounts. ' +
|
||||
'Set ACDREAM_TEST_OBSERVER_USER and ACDREAM_TEST_OBSERVER_PASS.')
|
||||
}
|
||||
|
||||
$startedUtc = [DateTime]::UtcNow.ToString('O')
|
||||
|
|
@ -313,8 +314,7 @@ finally {
|
|||
TrackedSourceStatus = if ($null -eq $binaryIdentity) { @() } else { @($binaryIdentity.SourceTrackedStatus) }
|
||||
PrimaryCharacterIndex = $PrimaryCharacterIndex
|
||||
ObserverCharacterIndex = $ObserverCharacterIndex
|
||||
DistinctAccountsConfigured = -not [string]::Equals(
|
||||
$Account, $ObserverAccount, [StringComparison]::OrdinalIgnoreCase)
|
||||
DistinctAccountsConfigured = $true
|
||||
Result = $result
|
||||
Failure = $failure
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue