Creating user & set up full user access

Creating user resource

Aidbox user resources conforms to following schema. You can create new user as a regular resource.

User resource example

Request
Response
1
PUT /User/exampleuser
2
content-type: text/yaml
3
accept: text/yaml
4
6
password: '123456'
Copied!
2
password: >-
3
$s0$f0801$HhKy93HnLn0qSmsS2JCZnQ==$P0oAp6yx6k8bCbeFN2UT9UfjKROuggn7deLbX2Mpm2M=
4
id: >-
5
exampleuser
6
resourceType: User
Copied!
Aidbox stores only hash of submitted password in resource
Now user can use this email & password to log-in into Aidbox console

Setting up full user access

For this purpose you need to create AccessPolicy resource that grants full user access.

AccessPolicy resource example

Request
Response
1
PUT /AccessPolicy/allow-all
2
content-type: text/yaml
3
accept: text/yaml
4
5
engine: allow
6
link:
7
- resourceType: User
8
id: exampleuser
Copied!
1
link:
2
- id: >-
3
exampleuser
4
resourceType: User
5
engine: allow
6
id: >-
7
allow-all
8
resourceType: AccessPolicy
Copied!
Note that allow-all AccessPolicy created in example uses engine allow, which grants full access to specified user.
If you want to set up user access more granularly, please refer to AccessPolicy documentation