You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 19dfaa3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: obp-api/src/main/scala/code/api/util/ErrorMessages.scala
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -651,6 +651,9 @@ object ErrorMessages {
651
651
valRetentionHoldAlreadyReleased="OBP-30621: This retention hold has already been released."
652
652
valInvalidRetentionRunApproval="OBP-30622: Invalid approval. decision must be approve or reject."
653
653
valInvalidRetentionRun="OBP-30623: Invalid retention run. mode must be preview or execute."
654
+
valConsumerAccountAccessAlreadyExists="OBP-30627: This Consumer already has access to this view of this account."
655
+
valConsumerAccountAccessNotFound="OBP-30628: Consumer account access not found by CONSUMER_ACCOUNT_ACCESS_ID on this account."
656
+
valCannotGrantConsumerAccountAccessToView="OBP-30629: A Consumer cannot be given access to this view. The owner view and public views are for Users: give the Consumer a view with only the permissions it needs."
|- [Update Current Consumer Platform App](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-updateCurrentConsumerPlatformApp): `PUT /obp/v7.0.0/consumers/current/platform-app`, for an app to declare the Scopes it needs.
7429
7429
|- [Get Current Consumer Scopes](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-getCurrentConsumerScopes): `GET /obp/v7.0.0/consumers/current/scopes`, for an app to read the Scopes its Consumer holds.
7430
7430
|- [Create Scope for a Consumer](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-addScope): `POST /obp/v7.0.0/consumers/CONSUMER_ID/scopes`, to grant a missing Scope.
7431
+
|
7432
+
|A Scope says which endpoints an app may call. An app that also acts on an account through a view, such as initiating payments from it, needs access to that view of the account as well: see ${getGlossaryItemLink("Consumer Account Access")}.
7433
+
|""".stripMargin)
7434
+
7435
+
glossaryItems +=GlossaryItem(
7436
+
title ="Consumer Account Access",
7437
+
description =
7438
+
s"""
7439
+
|# Consumer Account Access
7440
+
|
7441
+
|OBP has two layers of permission. **Roles** say which endpoints may be called; they are granted to a User as Entitlements and to a Consumer as Scopes. **Account access** says which accounts may be used, and through which view; it is granted to a User, and with Consumer Account Access also to a Consumer.
7442
+
|
7443
+
|It is for an application that acts on an account as itself, with its own application token (OAuth2 client credentials), when no person is involved: for example a bank's service that initiates payments from the bank's own account for customers whose payments it relays. Without it, such a service has to log in as a stand-in User who holds the account access.
7444
+
|
7445
+
|## How it works
7446
+
|
7447
+
|1. Someone who may grant views of the account (their view lists the target view in `can_grant_access_to_views`, or has `can_grant_access_to_custom_views` for a custom view) gives the Consumer access to a view. The grant records who gave it.
7448
+
|2. The application calls an endpoint of that view with its client-credentials token. Its User is then the Consumer's own (provider `obp-oidc#client`, named after the Consumer's key), and OBP finds the Consumer's grant.
7449
+
|3. The grant counts only on endpoints that admit an application acting as itself (auth mode ApplicationOnly or UserXORApplication). On every other endpoint the view still needs a User's account access.
7450
+
|
7451
+
|A person who logs in through the same Consumer does not get the Consumer's account access, and a caller identified by the Consumer Key alone does not either: only the client-credentials token proves the application is calling as itself.
7452
+
|
7453
+
|## Which view
7454
+
|
7455
+
|The owner view and public views can't be granted to a Consumer. Holding an account is for people. Give the Consumer a view with only the permissions it needs, for example a custom view with `can_add_transaction_request_to_any_account` for initiating payments: create it with Create Custom View (Management), `POST /obp/v6.0.0/management/banks/BANK_ID/accounts/ACCOUNT_ID/views` (Role CanCreateCustomView), and grant it through the ManageCustomViews system view, which has `can_grant_access_to_custom_views` and which the account holder can give through owner. The Transaction Requests the Consumer creates record it.
7456
+
|
7457
+
|## Endpoints
7458
+
|
7459
+
|- [Grant Consumer access to View](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-grantConsumerAccessToView): `POST /obp/v7.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/views/VIEW_ID/consumer-account-access`
7460
+
|- [Get Consumer access to Account](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-getConsumerAccountAccess): `GET /obp/v7.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/views/VIEW_ID/consumer-account-access`
7461
+
|- [Revoke Consumer access to View](${apiExplorerUrl}/resource-docs/OBPv7.0.0?operationid=OBPv7.0.0-revokeConsumerAccessToView): `DELETE /obp/v7.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/views/VIEW_ID/consumer-account-access/CONSUMER_ACCOUNT_ACCESS_ID`
7462
+
|
7463
+
|See also ${getGlossaryItemLink("Platform Apps")}.
Copy file name to clipboardExpand all lines: obp-api/src/main/scala/code/api/v7_0_0/Http4s700.scala
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4764,6 +4764,8 @@ object Http4s700 {
4764
4764
|
4765
4765
|Requires `open_corridor_enabled=true` on this instance. Whether it is on shows in GET /banks/BANK_ID/transaction-request-types, which lists OPEN_CORRIDOR_PROMISE exactly when it is.
4766
4766
|
4767
+
|The caller is either a User with account access to VIEW_ID, or an application acting as itself (OAuth2 client credentials) whose Consumer has been given access to VIEW_ID of this account (see Consumer Account Access). The view needs `can_add_transaction_request_to_any_account` or `can_add_transaction_request_to_beneficiary`. The Transaction Request records the Consumer that created it.
0 commit comments