mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
* Update mirage config * Update ember-cli-mirage and imports * bump ember-cli-mirage to latest * add lock file
41 lines
981 B
JavaScript
41 lines
981 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { Factory, trait } from 'miragejs';
|
|
|
|
export default Factory.extend({
|
|
name: (i) => `role-${i}`,
|
|
|
|
// static props
|
|
static: trait({
|
|
dn: 'cn=hashicorp,ou=Users,dc=hashicorp,dc=com',
|
|
rotation_period: 10,
|
|
username: 'hashicorp',
|
|
type: 'static',
|
|
}),
|
|
|
|
// dynamic props
|
|
dynamic: trait({
|
|
creation_ldif: `dn: cn={{.Username}},ou=users,dc=learn,dc=example
|
|
objectClass: person
|
|
objectClass: top
|
|
cn: learn
|
|
sn: {{.Password | utf16le | base64}}
|
|
memberOf: cn=dev,ou=groups,dc=learn,dc=example
|
|
userPassword: {{.Password}}
|
|
`,
|
|
deletion_ldif: `dn: cn={{.Username}},ou=users,dc=learn,dc=example
|
|
changetype: delete
|
|
`,
|
|
rollback_ldif: `dn: cn={{.Username}},ou=users,dc=learn,dc=example
|
|
changetype: delete
|
|
`,
|
|
username_template: '{{.DisplayName}}_{{.RoleName}}',
|
|
default_ttl: 3600,
|
|
max_ttl: 86400,
|
|
type: 'dynamic',
|
|
}),
|
|
});
|