Platform Apps
Platform Apps
A Platform App is an application an installation runs as part of its own OBP deployment, such as the Portal, the API Manager, Opey or one of the bank's own services. Like any application it calls OBP as a Consumer, and some of its calls are made with its own application token (OAuth2 client credentials) rather than for a logged-in User: reading published pages for anonymous visitors, or creating 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, for every Platform App, which Scopes are held and which are missing, and grants the missing ones (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.