Update README.md

added Administrator role / SuperUser section
This commit is contained in:
tesobe-daniel 2019-09-25 13:31:59 +02:00 committed by GitHub
parent d0c8e10d38
commit 67a0fc60a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,19 +194,18 @@ openssl s_client -connect ip:port
The above section is work in progress.
## Administrator role / SuperUser
In the API's props file, add the ID of your user account to `super_admin_user_ids=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. User Id can be retrieved via the "Get User (Current)" endpoint (e.g. /obp/v4.0.0/users/current) after login or via API Explorer (https://github.com/OpenBankProject/API-Explorer) at `/#OBPv3_0_0-getCurrentUser`.
Super users can give themselves any entitlement, but it is recommended to use this props only for bootstrapping (creating the first admin user). Use this admin user to create further priviledged users by granting them the "CanCreateEntitlementAtAnyBank" role. This, again, can be done via API Explorer (`/#OBPv2_0_0-addEntitlement`, leave `bank_id` empty) or, more conveniently, via API Manager (https://github.com/OpenBankProject/API-Manager).
## Sandbox data
To populate the OBP database with sandbox data:
1) In the API's props file, set `allow_sandbox_data_import=true`
Probably best then, is to use the API Explorer (https://github.com/OpenBankProject/API-Explorer):
2) Get your `user_id` from the API Explorer at `/#2_0_0-getCurrentUser`
3) Add this id to `super_admin_user_ids` in the API's props file and restart the API
4) Go back to API Explorer, log in again and grant your user the role `CanCreateSandbox` at `/#2_0_0-addEntitlement` (make `bank_id` empty)
2) Grant your user the role `CanCreateSandbox`. See previous section on how to do this
5) Now post the JSON data using the payload field at `/#2_1_0-sandboxDataImport`
6) If successful you should see an empty result `{}` and no error message