Publish Clusterflux c8e7f9b
This commit is contained in:
parent
433d759be1
commit
dbc2b586be
2 changed files with 37 additions and 7 deletions
|
|
@ -1753,11 +1753,41 @@ async function runSecondTenantIsolation({
|
|||
assert(!JSON.stringify(nodes).includes(targetProject));
|
||||
const foreignProcess = `vp-foreign-isolation-${Date.now()}`;
|
||||
const foreignArtifact = `artifact-foreign-isolation-${Date.now()}`;
|
||||
const tasksAndLogs = assertDenied(
|
||||
await call({ type: "list_task_events", process: foreignProcess }),
|
||||
/outside|scope|tenant|project|not active|requires an active|unknown/i,
|
||||
"single-account foreign task and log listing"
|
||||
);
|
||||
const tasksAndLogsResponse = await call({
|
||||
type: "list_task_events",
|
||||
process: foreignProcess,
|
||||
});
|
||||
let tasksAndLogs;
|
||||
if (tasksAndLogsResponse.type === "error") {
|
||||
tasksAndLogs = {
|
||||
...assertDenied(
|
||||
tasksAndLogsResponse,
|
||||
/outside|scope|tenant|project|not active|requires an active|unknown/i,
|
||||
"single-account foreign task and log listing"
|
||||
),
|
||||
enforcement: "explicit_error",
|
||||
};
|
||||
} else {
|
||||
assert.strictEqual(
|
||||
tasksAndLogsResponse.type,
|
||||
"task_events",
|
||||
JSON.stringify(tasksAndLogsResponse)
|
||||
);
|
||||
assert.deepStrictEqual(
|
||||
tasksAndLogsResponse.events,
|
||||
[],
|
||||
"single-account foreign-looking task listing must disclose no events"
|
||||
);
|
||||
assert(!JSON.stringify(tasksAndLogsResponse).includes(targetTenant));
|
||||
assert(!JSON.stringify(tasksAndLogsResponse).includes(targetProject));
|
||||
tasksAndLogs = {
|
||||
denied: true,
|
||||
reason: "authenticated scope returned no visible task or log events",
|
||||
enforcement: "scoped_empty_result",
|
||||
response_type: tasksAndLogsResponse.type,
|
||||
event_count: tasksAndLogsResponse.events.length,
|
||||
};
|
||||
}
|
||||
const debugResponse = await call({
|
||||
type: "debug_attach",
|
||||
process: foreignProcess,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue