Platform Apps
Platform Apps
A Platform App is an application that an installation runs as part of its own OBP deployment. Examples are the Portal, the API Manager, Opey and the bank's own services. Like any application, it calls OBP as a Consumer. Some of its calls are made with its own application token (OAuth2 client credentials), not for a logged-in User. For example, it reads published pages for anonymous visitors, or creates the Dynamic Entities it depends on at startup. Those calls need Roles granted to its Consumer as Scopes.
How it works
- An administrator marks the app's Consumer as a Platform App (Role CanCreatePlatformApp), giving it the name administrators know it by.
- The app declares, as itself, the Scopes it needs and what each is needed for. It does this whenever it starts or checks itself, so the list follows the version that is running. An app whose Consumer has not been marked cannot declare anything, so an arbitrary Consumer cannot ask to be granted Scopes this way.
- OBP compares each declaration with the Scopes the Consumer holds. An administrator with CanGetPlatformApps sees which Scopes each Platform App holds and which are missing. They grant the missing ones with CanCreateScopeAtAnyBank, or CanCreateScopeAtOneBank at the Scope's bank id.
A Scope declared as optional is one the app can manage without, for example because another Platform App does the same work. It is shown, but does not count as missing.
Each app can also check its own Consumer: GET /obp/v7.0.0/consumers/current/scopes returns the Scopes the calling Consumer holds, without any Role.
Endpoints
- Create Platform App:
POST /obp/v7.0.0/management/platform-apps, to mark a Consumer as a Platform App. - Get Platform Apps:
GET /obp/v7.0.0/management/platform-apps, to list them, with each declared Scope held or not. - Delete Platform App:
DELETE /obp/v7.0.0/management/platform-apps/CONSUMER_ID, to unmark one. - Update Current Consumer Platform App:
PUT /obp/v7.0.0/consumers/current/platform-app, for an app to declare the Scopes it needs. - Get Current Consumer Scopes:
GET /obp/v7.0.0/consumers/current/scopes, for an app to read the Scopes its Consumer holds. - Create Scope for a Consumer:
POST /obp/v7.0.0/consumers/CONSUMER_ID/scopes, to grant a missing Scope.
To act as itself, the app needs a token of its own. If its Consumer has grant types set, they must include client_credentials. See here.
A Scope says which endpoints an app may call. Some apps also act on an account through a view, for example to initiate payments from it. They also need access to that view of the account. See here.