41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
{
|
|
"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,
|
|
"Description": "AuthMethod: ${http.body.AuthMethod}; Code: ${http.body.Code}; State: ${http.body.State}; - ${fake.lorem.sentence()}",
|
|
"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"
|
|
}
|
|
|