Add CLI admin api
after all works on Redis
as provider will be finished we have to make admin interface for Ferrum configure
Admin interface must provide following common operations schema: {operation} {resource} {resource_id} {params} {value}
-
{operation}
one of the 4 operationcreate
,update
,delete
,get
-
{resource}
- name of resource -realm
,client
,user
-
{namespace}
- object namespace -
{resource_id}
- resource name i.e. name ofrealm
,client
,user
-
{params}
additional params that requires for operations i.e.realm
forclient
anduser
-
{value}
is aJSON
that contains object value itself
i.e. consider Realm creation:
ferrum-admin --operation=create --resource=realm --namespace=ferrum_2 --resource_id=IRP --value=\"{\"name\" "irp_rt\", ....}\"
If we provide full realm
structure with client
and user
this data struct should be separated && created all objects at once
if we create a User
we should operate with public user information (not show credentials), if we run user creation we should query user password && check password
additionally we have 2 additional methods
ferrum-admin --operation=change_password --namespace=ferrum_2 --resource=user --resource_id=admin
ferrum-admin --operation=reset_password --namespace=ferrum_2 --resource=user --resource_id=admin
reset_password
resets password to randomly generated (8 symbols at least)
Techically ferrum-admin should be additional software located in /ferrum/api/admin/cli
, management operations (except password operations) must be declared in DataContext
interface