Skip to content

Commit 47f3fe3

Browse files
committed
feature: replace the endpoint auth mode UserOrApplication with
UserXORApplication: a request is either a person acting on their own Entitlements or an application acting as itself (no User, or its own obp-oidc#client client-credentials User) on its Consumer's Scopes, never a mix, so a person calling through a Consumer no longer gets its Scopes and who is let in is who is recorded as acting. The require_scopes props no longer make an application acting as itself also need Entitlements. Dynamic Entity auth_mode still accepts UserOrApplication and stores it as UserXORApplication + feature: v7.0.0 Open Corridor attach promise evidence, settlement, fee settlement and get settlement are UserXORApplication, so a bank's Bank Node can call them as itself with a client-credentials token + feature: add Files to v7.0.0: store a document or photograph in a space (POST /banks/BANK_ID/files, base64 in JSON, Role CanCreateFileAtOneBank, or a Role at SYS for the system space, no AtAnyBank Roles), read it, its content and its attachments as owner, a User given access or with CanGetFileAtOneBank, attach it to records, share it, and make it public with CanCreatePublicFileAtOneBank. Public files are served without login by separate public-files endpoints that serve nothing else. Media types are at most jpeg, png, webp and pdf, and the content must match its type + fix: Make sure that file content responses keep their own Content-Type and send nosniff and a sandbox Content-Security-Policy, and that file bytes can be stored on H2
1 parent fc85874 commit 47f3fe3

50 files changed

Lines changed: 1902 additions & 184 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎obp-api/src/main/resources/docs/introductory_system_documentation.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The Open Bank Project (OBP) is an open-source RESTful API platform for banks tha
139139
- **Views System**: Account data visibility control (owner, public, accountant, auditor, custom)
140140
- **Scope Management**: OAuth 2.0 scope definitions
141141
- **Authentication Type Validation**: Enforce authentication requirements per endpoint
142-
- **Endpoint Auth Modes**: Per-endpoint control over user vs application authentication (UserOnly, ApplicationOnly, UserOrApplication, UserAndApplication)
142+
- **Endpoint Auth Modes**: Per-endpoint control over user vs application authentication (UserOnly, ApplicationOnly, UserXORApplication, UserAndApplication)
143143
- **Mandates**: Corporate account governance with provisions, signatory panels, and multi-signature approval
144144

145145
#### 1.2.9 Extensibility & Customization
@@ -2699,7 +2699,7 @@ OBP can bootstrap a Consumer (Application) for OBP-OIDC at startup. This allows
26992699

27002700
The bootstrap consumer is granted the following Scopes: `CanGetConsumers`, `CanCreateConsumer`, `CanVerifyOidcClient`, `CanGetOidcClient`, `CanGetOidcConsent`.
27012701

2702-
These endpoints use `authMode = UserOrApplication`, meaning they can be accessed either by a logged-in User with Entitlements, or by an Application using a Consumer Key with Scopes.
2702+
These endpoints use `authMode = UserXORApplication`, meaning they can be accessed either by a logged-in User with Entitlements, or by the Application acting as itself (e.g. with a client-credentials token) with its Consumer's Scopes. A User calling through the Consumer does not get its Scopes.
27032703

27042704
```properties
27052705
# Bootstrap OIDC Operator Consumer
@@ -3022,18 +3022,18 @@ Previously, a global `allow_entitlements_or_scopes` config flag allowed consumer
30223022
|------|-------------|
30233023
| `UserOnly` | (Default) Requires user authentication and user entitlements |
30243024
| `ApplicationOnly` | Requires consumer scope only, no user authentication needed |
3025-
| `UserOrApplication` | Either consumer scope OR user entitlement is sufficient |
3025+
| `UserXORApplication` | Consumer scope when the application acts as itself (no user, or its own client-credentials user, provider `obp-oidc#client`); user entitlement when a person acts. A person never uses the consumer's scopes. Formerly `UserOrApplication` (either was sufficient) |
30263026
| `UserAndApplication` | Both consumer scope AND user entitlement are required |
30273027

30283028
**Migration from `allow_entitlements_or_scopes`:**
30293029

3030-
The global `allow_entitlements_or_scopes` config flag has been removed. Deployments that previously used `allow_entitlements_or_scopes=true` must now set `authMode = UserOrApplication` on individual endpoint `ResourceDoc` instances.
3030+
The global `allow_entitlements_or_scopes` config flag has been removed. Deployments that previously used `allow_entitlements_or_scopes=true` must now set `authMode = UserXORApplication` on individual endpoint `ResourceDoc` instances.
30313031

3032-
The global overrides `require_scopes_for_all_roles` and `require_scopes_for_listed_roles` continue to work and force `UserAndApplication` behavior.
3032+
The global overrides `require_scopes_for_all_roles` and `require_scopes_for_listed_roles` continue to work and force `UserAndApplication` behavior, except for an application acting as itself on an `ApplicationOnly` or `UserXORApplication` endpoint, which still needs only its scopes.
30333033

30343034
**Example:**
30353035

3036-
The `verifyUserCredentials` endpoint uses `UserOrApplication` mode, so it can be called either by a logged-in user with the appropriate entitlement, or by an application with the appropriate consumer scope.
3036+
The `verifyUserCredentials` endpoint uses `UserXORApplication` mode, so it can be called either by a logged-in user with the appropriate entitlement, or by an application acting as itself with the appropriate consumer scope.
30373037

30383038
### 8.8 Maker/Checker for Transaction Requests
30393039

@@ -4298,7 +4298,7 @@ docker run -p 8080:8080 \
42984298

42994299
**Dynamic Endpoint:** User-defined API endpoint
43004300

4301-
**Endpoint Auth Mode:** Per-endpoint setting controlling whether user authentication, application scope, or both are required (UserOnly, ApplicationOnly, UserOrApplication, UserAndApplication)
4301+
**Endpoint Auth Mode:** Per-endpoint setting controlling whether user authentication, application scope, or both are required (UserOnly, ApplicationOnly, UserXORApplication, UserAndApplication)
43024302

43034303
**Entitlement:** Permission to perform specific operation (same as Role)
43044304

‎obp-api/src/main/scala/code/api/ResourceDocs1_4_0/OpenAPI31JSONFactory.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ object OpenAPI31JSONFactory extends MdcLoggable {
168168
|
169169
|### Client Credentials Flow (2-legged / Application Only)
170170
|
171-
|Use this flow for endpoints with authMode ApplicationOnly or UserOrApplication.
171+
|Use this flow for endpoints with authMode ApplicationOnly or UserXORApplication.
172172
|The application authenticates itself using its client_id and client_secret without a user login.
173173
|
174174
| POST $oidcTokenEndpoint

‎obp-api/src/main/scala/code/api/UKOpenBanking/v3_1_0/Http4sUKOBv310AccountAccess.scala‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import cats.data.{Kleisli, OptionT}
3232
import cats.effect.IO
3333
import code.api.Constant
3434
import code.api.UKOpenBanking.v3_1_0.JSONFactory_UKOpenBanking_310.ConsentPostBodyUKV310
35-
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserOrApplication, connectorEmptyResponse, mockedDataText, passesPsd2Aisp, unboxFullOrFail, parseIso8601OrDayDate}
35+
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserXORApplication, connectorEmptyResponse, mockedDataText, passesPsd2Aisp, unboxFullOrFail, parseIso8601OrDayDate}
3636
import code.api.util.ApiTag
3737
import code.api.util.CustomJsonFormats
3838
import code.api.util.ErrorMessages.{AuthenticatedUserIsRequired, ConsentNotFound, ConsentViewNotFund, InvalidJsonFormat, InvalidUKConsentPermissions, UnknownError}
@@ -201,8 +201,8 @@ object Http4sUKOBv310AccountAccess extends MdcLoggable {
201201
// Without it the doc defaults to UserOnly, which sends the middleware down anonymousAccess and
202202
// 401s any request that carries no user -- so the endpoint only works today because OAuth2
203203
// token parsing auto-vivifies a user for a client-credentials token. Matches the Berlin Group
204-
// twin (Http4sBGv13AIS.createConsent), which has always been UserOrApplication.
205-
authMode = UserOrApplication,
204+
// twin (Http4sBGv13AIS.createConsent), which has always been UserXORApplication.
205+
authMode = UserXORApplication,
206206
http4sPartialFunction = Some(createAccountAccessConsents)
207207
)
208208

@@ -239,7 +239,7 @@ object Http4sUKOBv310AccountAccess extends MdcLoggable {
239239
ApiTag("Account Access") :: Nil,
240240
// As with the POST that lodges the consent: revoking is a client-credentials call in the
241241
// standard's AISP flow, so a PSU cannot be required. See Consent.checkUKConsentAccess.
242-
authMode = UserOrApplication,
242+
authMode = UserXORApplication,
243243
http4sPartialFunction = Some(deleteAccountAccessConsentsConsentId)
244244
)
245245

@@ -317,7 +317,7 @@ object Http4sUKOBv310AccountAccess extends MdcLoggable {
317317
List(AuthenticatedUserIsRequired, UnknownError),
318318
ApiTag("Account Access") :: Nil,
319319
// As above: the AISP polls its own consent with a client-credentials token.
320-
authMode = UserOrApplication,
320+
authMode = UserXORApplication,
321321
http4sPartialFunction = Some(getAccountAccessConsentsConsentId)
322322
)
323323

‎obp-api/src/main/scala/code/api/UKOpenBanking/v4_0_1/Http4sUKOBv401AccountInfo.scala‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import cats.effect.IO
3434
import code.api.APIFailureNewStyle
3535
import code.api.Constant
3636
import code.api.UKOpenBanking.v3_1_0.JSONFactory_UKOpenBanking_310.ConsentPostBodyUKV310
37-
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, HTTPParam, UserOrApplication, connectorEmptyResponse, createQueriesByHttpParams, defaultBankId, fullBoxOrException, passesPsd2Aisp, unboxFull, unboxFullOrFail, parseIso8601OrDayDate}
37+
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, HTTPParam, UserXORApplication, connectorEmptyResponse, createQueriesByHttpParams, defaultBankId, fullBoxOrException, passesPsd2Aisp, unboxFull, unboxFullOrFail, parseIso8601OrDayDate}
3838
import code.api.util.ApiTag
3939
import code.api.util.CallContext
4040
import code.api.util.CustomJsonFormats
@@ -209,8 +209,8 @@ object Http4sUKOBv401AccountInfo extends MdcLoggable {
209209
// Without it the doc defaults to UserOnly, which sends the middleware down anonymousAccess and
210210
// 401s any request that carries no user -- so the endpoint only works today because OAuth2
211211
// token parsing auto-vivifies a user for a client-credentials token. Matches the Berlin Group
212-
// twin (Http4sBGv13AIS.createConsent), which has always been UserOrApplication.
213-
authMode = UserOrApplication,
212+
// twin (Http4sBGv13AIS.createConsent), which has always been UserXORApplication.
213+
authMode = UserXORApplication,
214214
http4sPartialFunction = Some(createAccountAccessConsents)
215215
)
216216

@@ -290,7 +290,7 @@ object Http4sUKOBv401AccountInfo extends MdcLoggable {
290290
ApiTag("Account Access Consents") :: Nil,
291291
// Same reasoning as the POST that lodges the consent: the AISP polls it with a
292292
// client-credentials token, so a PSU cannot be required. See Consent.checkUKConsentAccess.
293-
authMode = UserOrApplication,
293+
authMode = UserXORApplication,
294294
http4sPartialFunction = Some(getAccountAccessConsentsConsentId)
295295
)
296296

@@ -323,7 +323,7 @@ object Http4sUKOBv401AccountInfo extends MdcLoggable {
323323
List(AuthenticatedUserIsRequired, UnknownError),
324324
ApiTag("Account Access Consents") :: Nil,
325325
// As above: revoking is a client-credentials call in the standard's AISP flow.
326-
authMode = UserOrApplication,
326+
authMode = UserXORApplication,
327327
http4sPartialFunction = Some(deleteAccountAccessConsentsConsentId)
328328
)
329329

‎obp-api/src/main/scala/code/api/berlin/group/v1_3/Http4sBGv13AIS.scala‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import code.api.berlin.group.v1_3.model._
3838
import code.api.berlin.group.v1_3.{BgSpecValidation, JSONFactory_BERLIN_GROUP_1_3, JvalueCaseClass}
3939
import code.api.RequestHeader
4040
import code.api.util.APIUtil
41-
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserOrApplication, connectorEmptyResponse, createQueriesByHttpParams, fullBoxOrException, getHttpRequestUrlParam, getSuggestedDefaultScaMethod, mockedDataText, passesPsd2Aisp, unboxFull, unboxFullOrFail}
41+
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserXORApplication, connectorEmptyResponse, createQueriesByHttpParams, fullBoxOrException, getHttpRequestUrlParam, getSuggestedDefaultScaMethod, mockedDataText, passesPsd2Aisp, unboxFull, unboxFullOrFail}
4242
import code.api.util.CallContext
4343
import code.api.util.ApiTag._
4444
import code.api.util.CustomJsonFormats
@@ -847,7 +847,7 @@ recurringIndicator:
847847
),
848848
List(AuthenticatedUserIsRequired, UnknownError),
849849
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
850-
authMode = UserOrApplication,
850+
authMode = UserXORApplication,
851851
http4sPartialFunction = Some(createConsent)
852852
)
853853

@@ -863,7 +863,7 @@ recurringIndicator:
863863
EmptyBody,
864864
List(AuthenticatedUserIsRequired, UnknownError),
865865
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
866-
authMode = UserOrApplication,
866+
authMode = UserXORApplication,
867867
http4sPartialFunction = Some(deleteConsent)
868868
)
869869

@@ -901,7 +901,7 @@ where the consent was directly managed between ASPSP and PSU e.g. in a re-direct
901901
}""")),
902902
List(AuthenticatedUserIsRequired, ConsentNotFound, UnknownError),
903903
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
904-
authMode = UserOrApplication,
904+
authMode = UserXORApplication,
905905
http4sPartialFunction = Some(getConsentInformation)
906906
)
907907

@@ -919,7 +919,7 @@ where the consent was directly managed between ASPSP and PSU e.g. in a re-direct
919919
}""")),
920920
List(AuthenticatedUserIsRequired, UnknownError),
921921
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
922-
authMode = UserOrApplication,
922+
authMode = UserXORApplication,
923923
http4sPartialFunction = Some(getConsentStatus)
924924
)
925925

@@ -980,7 +980,7 @@ using the extended forms as indicated above.
980980
// so the doc can now say what the call actually is, as its GET siblings already do. Left on
981981
// the UserOnly default it would 401 a client-credentials caller the day OAuth2 token parsing
982982
// stops auto-vivifying a user.
983-
authMode = UserOrApplication,
983+
authMode = UserXORApplication,
984984
http4sPartialFunction = Some(startConsentAuthorisationAll)
985985
)
986986

@@ -995,7 +995,7 @@ using the extended forms as indicated above.
995995
startConsentAuthorisationResponse,
996996
List(AuthenticatedUserIsRequired, UnknownError),
997997
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
998-
authMode = UserOrApplication,
998+
authMode = UserXORApplication,
999999
http4sPartialFunction = Some(startConsentAuthorisationAll)
10001000
)
10011001

@@ -1010,7 +1010,7 @@ using the extended forms as indicated above.
10101010
startConsentAuthorisationResponse,
10111011
List(AuthenticatedUserIsRequired, UnknownError),
10121012
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
1013-
authMode = UserOrApplication,
1013+
authMode = UserXORApplication,
10141014
http4sPartialFunction = Some(startConsentAuthorisationAll)
10151015
)
10161016

@@ -1057,7 +1057,7 @@ Maybe in a later version the access path will change.
10571057
),
10581058
List(AuthenticatedUserIsRequired, UnknownError),
10591059
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
1060-
authMode = UserOrApplication,
1060+
authMode = UserXORApplication,
10611061
http4sPartialFunction = Some(updateConsentsPsuDataAll)
10621062
)
10631063

@@ -1077,7 +1077,7 @@ Maybe in a later version the access path will change.
10771077
| }""".stripMargin)),
10781078
List(AuthenticatedUserIsRequired, UnknownError),
10791079
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
1080-
authMode = UserOrApplication,
1080+
authMode = UserXORApplication,
10811081
http4sPartialFunction = Some(updateConsentsPsuDataAll)
10821082
)
10831083

@@ -1105,7 +1105,7 @@ Maybe in a later version the access path will change.
11051105
| }""".stripMargin)),
11061106
List(AuthenticatedUserIsRequired, UnknownError),
11071107
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
1108-
authMode = UserOrApplication,
1108+
authMode = UserXORApplication,
11091109
http4sPartialFunction = Some(updateConsentsPsuDataAll)
11101110
)
11111111

@@ -1125,7 +1125,7 @@ Maybe in a later version the access path will change.
11251125
| }""".stripMargin)),
11261126
List(AuthenticatedUserIsRequired, UnknownError),
11271127
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
1128-
authMode = UserOrApplication,
1128+
authMode = UserXORApplication,
11291129
http4sPartialFunction = Some(updateConsentsPsuDataAll)
11301130
)
11311131
}
@@ -1347,8 +1347,8 @@ This function returns an array of hyperlinks to all generated authorisation sub-
13471347
// Embedded. The handler already reflects that, taking no user; only the doc disagreed, and a
13481348
// doc left on the UserOnly default sends the middleware down anonymousAccess, which 401s a
13491349
// request carrying no user. Brings these into line with the consent endpoints in this same
1350-
// file, which have been UserOrApplication all along.
1351-
authMode = UserOrApplication,
1350+
// file, which have been UserXORApplication all along.
1351+
authMode = UserXORApplication,
13521352
http4sPartialFunction = Some(getConsentAuthorisation)
13531353
)
13541354

@@ -1368,7 +1368,7 @@ This method returns the SCA status of a consent initiation's authorisation sub-r
13681368
List(AuthenticatedUserIsRequired, UnknownError),
13691369
ApiTag("Account Information Service (AIS)") :: apiTagBerlinGroupM :: Nil,
13701370
// As above -- reading the SCA status is the TPP polling its own authorisation sub-resource.
1371-
authMode = UserOrApplication,
1371+
authMode = UserXORApplication,
13721372
http4sPartialFunction = Some(getConsentScaStatus)
13731373
)
13741374

‎obp-api/src/main/scala/code/api/berlin/group/v1_3/Http4sBGv13PIS.scala‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import code.api.berlin.group.ConstantsBG
3434
import code.api.berlin.group.v1_3.JSONFactory_BERLIN_GROUP_1_3._
3535
import code.api.berlin.group.v1_3.model.TransactionStatus.mapTransactionStatus
3636
import code.api.berlin.group.v1_3.model._
37-
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserOrApplication, getScaMethodAtInstance, getServerUrl, isValidCurrencyISOCode, mockedDataText, passesPsd2Pisp}
37+
import code.api.util.APIUtil.{Http4sHandler, Http4sRoute, EmptyBody, ResourceDoc, UserXORApplication, getScaMethodAtInstance, getServerUrl, isValidCurrencyISOCode, mockedDataText, passesPsd2Pisp}
3838
import code.api.util.ApiTag._
3939
import code.api.util.ErrorMessages._
4040
import code.api.util.CustomJsonFormats
@@ -143,7 +143,7 @@ object Http4sBGv13PIS extends MdcLoggable {
143143
/**
144144
* Shared business logic for all three initiate-payment variants (payments / periodic-payments /
145145
* bulk-payments). Mirrors `initiatePaymentImplementation` from the Lift builder; auth is handled
146-
* by middleware (authMode = UserOrApplication), so no inline applicationAccess call.
146+
* by middleware (authMode = UserXORApplication), so no inline applicationAccess call.
147147
*/
148148
private def initiatePaymentImpl(
149149
paymentService: String,
@@ -427,7 +427,7 @@ object Http4sBGv13PIS extends MdcLoggable {
427427
}
428428

429429
// ── POST /payments/{paymentProduct} ──────────────────────────────────────────────────────────────
430-
// Auth: applicationAccess in Lift → authMode = UserOrApplication in ResourceDoc
430+
// Auth: applicationAccess in Lift → authMode = UserXORApplication in ResourceDoc
431431
lazy val initiatePayments: Http4sRoute = Http4sRoute {
432432
case req @ POST -> `bgV13Prefix` / "payments" / paymentProduct =>
433433
EndpointHelpers.executeFutureCreated(req) {
@@ -1042,7 +1042,7 @@ $generalPaymentSummaryText""",
10421042
initiatePaymentResponseBody,
10431043
List(AuthenticatedUserIsRequired, UnknownError),
10441044
ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil,
1045-
authMode = UserOrApplication,
1045+
authMode = UserXORApplication,
10461046
http4sPartialFunction = Some(initiatePayments)
10471047
)
10481048

@@ -1075,7 +1075,7 @@ $generalPaymentSummaryText""",
10751075
}""")),
10761076
List(AuthenticatedUserIsRequired, UnknownError),
10771077
ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil,
1078-
authMode = UserOrApplication,
1078+
authMode = UserXORApplication,
10791079
http4sPartialFunction = Some(initiatePeriodicPayments)
10801080
)
10811081

@@ -1111,7 +1111,7 @@ $generalPaymentSummaryText""",
11111111
}""")),
11121112
List(AuthenticatedUserIsRequired, UnknownError),
11131113
ApiTag("Payment Initiation Service (PIS)") :: apiTagBerlinGroupM :: Nil,
1114-
authMode = UserOrApplication,
1114+
authMode = UserXORApplication,
11151115
http4sPartialFunction = Some(initiateBulkPayments)
11161116
)
11171117
}

‎obp-api/src/main/scala/code/api/dynamic/entity/Http4sDynamicEntity.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ object Http4sDynamicEntity extends MdcLoggable {
343343
private def entityAccess(cc: CallContext, bankId: Option[String], entityName: String, isPersonalEntity: Boolean): Future[(Box[User], Option[CallContext])] =
344344
if (isPersonalEntity || isRowLevel(bankId, entityName)) authenticatedAccess(cc)
345345
else authModeOf(bankId, entityName) match {
346-
case ApplicationOnly | UserOrApplication => applicationAccess(cc)
346+
case ApplicationOnly | UserXORApplication => applicationAccess(cc)
347347
case _ => authenticatedAccess(cc)
348348
}
349349

‎obp-api/src/main/scala/code/api/dynamic/entity/helper/DynamicEntityHelper.scala‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ case class DynamicEntityInfo(definition: String, entityName: String, bankId: Opt
10811081
/** The entity's auth mode as the framework type; unknown or empty values read as UserOnly. */
10821082
val endpointAuthMode: code.api.util.APIUtil.EndpointAuthMode = authMode match {
10831083
case code.dynamicEntity.DynamicEntityAuthMode.ApplicationOnly => code.api.util.APIUtil.ApplicationOnly
1084-
case code.dynamicEntity.DynamicEntityAuthMode.UserOrApplication => code.api.util.APIUtil.UserOrApplication
1084+
case code.dynamicEntity.DynamicEntityAuthMode.UserXORApplication | code.dynamicEntity.DynamicEntityAuthMode.LegacyUserOrApplication =>
1085+
code.api.util.APIUtil.UserXORApplication
10851086
case code.dynamicEntity.DynamicEntityAuthMode.UserAndApplication => code.api.util.APIUtil.UserAndApplication
10861087
case _ => code.api.util.APIUtil.UserOnly
10871088
}

0 commit comments

Comments
 (0)