2020-11-05 16:03:49 +00:00
|
|
|
{
|
|
|
|
"AccessorID": "${fake.random.uuid()}",
|
|
|
|
"SecretID": "${fake.random.uuid()}",
|
|
|
|
"Namespace": "${
|
|
|
|
typeof location.search.ns !== 'undefined' ? location.search.ns :
|
|
|
|
typeof http.body.Namespace !== 'undefined' ? http.body.Namespace : 'default'
|
|
|
|
}",
|
|
|
|
"Local": false,
|
2021-10-11 15:03:59 +00:00
|
|
|
"Description": "AuthMethod: ${http.body.AuthMethod}; Code: ${http.body.Code}; State: ${http.body.State}; - ${fake.lorem.sentence()}",
|
2020-11-05 16:03:49 +00:00
|
|
|
"Policies": [
|
|
|
|
${
|
|
|
|
range(env('CONSUL_POLICY_COUNT', 3)).map(
|
|
|
|
function(item, i) {
|
|
|
|
return `
|
|
|
|
{
|
|
|
|
"ID": "${fake.random.uuid()}-${i}",
|
|
|
|
"Name": "${location.search.policy || fake.hacker.noun()}"
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"Roles": [
|
|
|
|
${
|
|
|
|
range(env('CONSUL_ROLE_COUNT', 10)).map(
|
|
|
|
function(item, j) {
|
|
|
|
return `
|
|
|
|
{
|
|
|
|
"ID": "${fake.random.uuid()}",
|
|
|
|
"Name": "${location.search.role || fake.hacker.noun()}"
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"CreateTime": "2019-10-11T11:24:06.1385039Z"
|
|
|
|
}
|
|
|
|
|