Commit Graph

7494 Commits

Author SHA1 Message Date
hongwei
e8999ba54c refactor(http4s): consolidate validated entities into CallContext
- Add bank, bankAccount, view, and counterparty fields to CallContext case class
- Remove individual Vault keys for User, Bank, BankAccount, View, and Counterparty from Http4sRequestAttributes
- Simplify Http4sRequestAttributes to store only CallContext in request attributes
- Update ResourceDocMiddleware to enrich CallContext with validated entities instead of storing them separately
- Remove ValidatedContext case class as validated entities are now part of CallContext
- Streamline request attribute management by centralizing all validated data in a single CallContext object
- Improves code maintainability and reduces complexity in the validation chain
2026-01-22 14:13:34 +01:00
simonredfern
6466c8e9f7 Updating frozen metadata for Challenge Commons (added 3 new fields, not
a breaking change as long as Adapters are lenient on extra fields)
2026-01-22 11:05:47 +01:00
Marko Milić
c1a3d91db0 Merge upstream/develop into develop after conflict resolution 2026-01-22 09:21:48 +01:00
simonredfern
3462363228 rebasefix: fixing errors introduced during rebase merging 2026-01-22 07:39:19 +01:00
simonredfern
b5282b4568 fixing merge rebase v6.0.0 of dynmaic endpoints with improved json 2026-01-22 07:39:19 +01:00
simonredfern
0b63bfcae3 Test isolation 2026-01-22 07:39:19 +01:00
simonredfern
191f867fd2 docfix: Added Connector.User.Authentication 2026-01-22 07:39:19 +01:00
simonredfern
7a27d3ac0d Schema Validation tests 2026-01-22 07:39:19 +01:00
simonredfern
aaf04ee036 fixtest: GET my dynamic entity endpoint gets records the user created,
not just records with hasPersonalEntity=true. Previous behaviour was
confusing.
2026-01-22 07:39:19 +01:00
simonredfern
c0a0dfed0b fix tricky behaviour with personal dynamic endpoints. /my dynamic
entitity endpoints now return records created by user_id even if not via
/my endpoints (i.e. if created with another endpoint that requires a
role, the record is still yours)
2026-01-22 07:39:19 +01:00
simonredfern
afa73894c5 forcing lower_case entity names 2026-01-22 07:39:19 +01:00
simonredfern
606f7089e0 apiTagDynamicEntity 2026-01-22 07:39:19 +01:00
simonredfern
7fdf8faacc Dynamic Entity definition to schema 2026-01-22 07:39:19 +01:00
simonredfern
bfa3917ce1 v6.0.0 of dynmaic endpoints with improved json 2026-01-22 07:39:19 +01:00
simonredfern
ceba49c0ea Added /personal-dynamic-entities/available 2026-01-22 07:39:19 +01:00
simonredfern
3f371cf551 Adding Message Doc Json schema files 2026-01-22 07:39:19 +01:00
simonredfern
79c44db3bc Added v6.0.0 GET /my/dynamic-entities with explicit entity_name instead
of dynamic key and snake_case
2026-01-22 07:39:19 +01:00
simonredfern
3f85cb9a02 docfix: glossary Response format for GET /mydynamic-entities 2026-01-22 07:39:19 +01:00
simonredfern
41a1506a66 Adding challengePurpose, challengeContextHash and
challengeContextStructure
2026-01-22 07:39:19 +01:00
simonredfern
3a77043bfc docfix: Dynamic Linking glossary item. 2026-01-22 07:39:19 +01:00
simonredfern
0e9a69dfe6 docfix: hasPersonalEntity flag note 2026-01-22 07:39:19 +01:00
simonredfern
18d1884703 Docfix: Added note about hasPersonalEntity in Dynamic Entity glossary
item.
2026-01-22 07:39:18 +01:00
simonredfern
a9f42f905f Tagging Message Doc related endpoints. 2026-01-22 07:39:18 +01:00
simonredfern
5f7bbc3e5f ABAC Error message codes 2026-01-22 07:39:18 +01:00
hongwei
61abf36784 Merge remote-tracking branch 'Hongwei/refactor/renameUserNotLoggedIn' into develop 2026-01-21 15:13:19 +01:00
hongwei
3b467129fb refactor/rename UserNotLoggedIn to AuthenticatedUserIsRequired 2026-01-21 15:11:04 +01:00
hongwei
f73ad667b9 refactor/tweaked code 2026-01-21 14:58:52 +01:00
hongwei
ef6bff5698 refactor/tweaked the variable names 2026-01-21 14:05:20 +01:00
hongwei
f6d095bf1b docfix/added comments 2026-01-21 13:44:40 +01:00
hongwei
48afd126d5 docfix/added comments 2026-01-21 13:39:45 +01:00
Simon Redfern
9ce6cb4164
Merge pull request #2660 from hongwei1/developPom
refactor/reduce the maven build time
2026-01-21 13:10:10 +01:00
hongwei
31624464b9 refactor(http4s700): comment out getCounterpartyByIdWithMiddleware endpoint and related ResourceDoc
- Commented out the implementation of the getCounterpartyByIdWithMiddleware endpoint and its associated ResourceDoc to prevent its usage.
- Updated the allRoutes definition to exclude the commented-out counterparty route, ensuring clarity in the current API structure.
2026-01-20 15:27:44 +01:00
hongwei
de2ed5f61a refactor(api): update authentication error handling to use AuthenticatedUserIsRequired
- Replaced instances of UserNotLoggedIn with AuthenticatedUserIsRequired across multiple API versions and utility classes.
- Updated error response handling in ResourceDocMiddleware and APIUtil to reflect the new authentication requirement.
- Ensured consistency in error messages and improved clarity in authentication checks throughout the codebase.
2026-01-20 15:21:57 +01:00
hongwei
8f2048c89e Merge remote-tracking branch 'refs/remotes/Hongwei/developPom' into develop 2026-01-20 15:04:45 +01:00
hongwei
69ae30b78c refactor/(ResourceDocMiddleware): improve JSON content type handling in responses
- Updated ensureJsonContentType method to use pattern matching for content type validation.
- Ensured that responses with a media type of application/json retain their content type.
- Simplified response handling logic for better clarity and maintainability.
2026-01-20 14:11:40 +01:00
hongwei
b4ddcd6be1 refactor/ (ResourceDocMiddleware): ensure JSON content type for responses
- Introduced a new private method to enforce JSON content type on responses.
- Added `Content-Type` import and defined a constant for application/json.
- Updated response handling to apply JSON content type if not already set.
2026-01-20 13:58:31 +01:00
hongwei
98a6e2be9a feature/(http4s700): implement getBanks endpoint with proper context handling
- Replace static API info response with dynamic banks retrieval
- Add Http4sCallContextBuilder to extract request context and API version
- Integrate NewStyle.function.getBanks for fetching bank data from backend
- Use IO.fromFuture to handle asynchronous bank retrieval operations
- Convert bank data to JSON using JSONFactory400.createBanksJson
- Maintain consistent response formatting with jsonContentType header
- Enable proper call context propagation through the request lifecycle
2026-01-20 13:23:24 +01:00
hongwei
4f9c195fbe refactor/(api): streamline API structure and enhance maintainability
- Refactored multiple API classes across various versions to improve code organization and readability.
- Centralized common functionalities and reduced redundancy in API implementations.
- Enhanced error handling and logging mechanisms for better debugging and traceability.
- Updated tests to align with the refactored API structure, ensuring comprehensive coverage and reliability.
2026-01-20 13:12:11 +01:00
hongwei
c5e6b11e11 refactor/(api): centralize API info properties in APIUtil
- Introduced centralized properties for hosted organization details, including email, phone, and website.
- Updated JSONFactory classes to utilize the new centralized properties instead of direct property retrieval.
- Simplified API info JSON generation by reducing redundancy in property access.
- Enhanced clarity and maintainability of API information retrieval across different API versions.
2026-01-20 12:39:02 +01:00
Marko Milić
3616788df2 feature/Remove Await.result from executeRule 2026-01-19 17:10:28 +01:00
hongwei
ddee799b74 feature/(http4s): add counterparty validation to ResourceDocMiddleware
- Implement counterparty existence validation in ResourceDocMiddleware step 6
- Extract BANK_ID, ACCOUNT_ID, and COUNTERPARTY_ID from path parameters
- Call NewStyle.function.getCounterpartyTrait with extracted IDs for validation
- Handle successful counterparty retrieval with updated CallContext
- Convert APIFailureNewStyle exceptions to appropriate error responses
- Return 404 CounterpartyNotFound error for invalid counterparty IDs
- Add new GET endpoint for retrieving counterparty by ID with middleware
- Register ResourceDoc for getCounterpartyByIdWithMiddleware endpoint
- Document complete validation chain in endpoint description
- Include counterparty endpoint in allRoutes combined route handler
- Enables automatic counterparty validation through middleware pipeline
2026-01-19 16:37:39 +01:00
hongwei
a53bcf4ca2 refactor/(http4s): reorder validation chain to check roles before bank validation
- Move role authorization check to execute immediately after authentication
- Reorder validation sequence: auth → roles → bank → account → view → counterparty
- Remove redundant debug logging for errorResponseBodies
- Remove inline comments explaining anonymous access flow
- Simplify bank validation logic by removing unnecessary comments
- Update validation chain documentation to reflect new execution order
- Improve early authorization failure detection before expensive bank lookups
2026-01-19 16:12:47 +01:00
karmaking
9ec0bb3723 add minimal ms sql create oidc view script 2026-01-19 15:55:31 +01:00
hongwei
64d7219482 refactor/(http4s): enhance ResourceDocMiddleware with logging and authentication improvements
- Implement MdcLoggable for structured logging in ResourceDocMiddleware
- Update authentication checks to include role validation for unauthenticated users
- Replace println statements with logger.debug for better log management
- Refactor role authorization logic to improve clarity and error handling
- Update Http4s700 API info to include $UserNotLoggedIn in error responses
2026-01-19 12:28:59 +01:00
hongwei
64b1ac3c9d feature/(directlogin): add http4s support for DirectLogin authentication
- Add `validatorFutureWithParams` function to validate DirectLogin parameters extracted from CallContext without depending on S.request
- Enhance `getUserFromDirectLoginHeaderFuture` to prefer DirectLogin parameters from CallContext (http4s path) and fall back to S.request (Lift path)
- Improve `extractDirectLoginParams` to support both new format (DirectLogin header) and old format (Authorization: DirectLogin header)
- Enhance `parseDirectLoginHeader` to match Lift's parsing logic with support for quoted and unquoted parameter values
- Update Http4s700 API info to remove UserNotLoggedIn error and add canGetRateLimits role requirement
- This enables DirectLogin authentication to work seamlessly in http4s context where S.request is unavailable
2026-01-16 15:59:26 +01:00
Marko Milić
1ca949689f Merge remote-tracking branch 'hongwei/develop' into develop 2026-01-16 15:18:21 +01:00
hongwei
2d139b157e refactor/(Http4s700): remove user authentication message from API info 2026-01-16 14:49:33 +01:00
hongwei
85463319a8 test/(Http4s700): add UserNotLoggedIn error response to API info
- Add $UserNotLoggedIn to the error response list in apiInfoJSON
- Include authentication error handling in API v7.0.0 documentation
- Improve API error response completeness for unauthenticated requests
2026-01-16 14:26:11 +01:00
hongwei
7011677a64 refactor/(http4s): enhance ResourceDocMiddleware authentication flow and logging
- Add debug logging for authentication requirements and error response bodies
- Extract needsAuthentication check into variable for clarity and reusability
- Improve anonymous access handling to gracefully handle auth errors without failing
- Add detailed logging for anonymous access success and failure cases
- Update Http4s700 root endpoint to use correct authentication message flag
- Remove misleading comment about $UserNotLoggedIn triggering automatic auth check
- Enhance error handling in anonymous access path to allow unauthenticated endpoints to function properly
2026-01-16 14:21:22 +01:00
hongwei
bae97edc79 refactor/(http4s): improve ResourceDoc matching and error handling
- Strip API prefix (/obp/vX.X.X) from request paths before matching against ResourceDoc templates
- Add apiPrefixPattern regex to ResourceDocMatcher for consistent path normalization
- Refactor ResourceDocMiddleware.apply to properly handle OptionT wrapping
- Enhance authentication error handling with proper error response conversion
- Improve bank lookup error handling with ErrorResponseConverter integration
- Replace manual Response construction with ErrorResponseConverter.createErrorResponse calls
- Add JSON parsing fallback for exception messages in authentication flow
- Simplify validation chain logic by removing redundant comments and consolidating code paths
- Fix flatMap usage in authentication and bank lookup to properly handle IO operations
2026-01-16 14:10:57 +01:00
hongwei
4ffd9474df refactor/build: Reduce memory allocation for tests and remove parallel execution settings 2026-01-16 12:23:21 +01:00
hongwei
58a9c0b834 refactor/build: Simplify Scala plugin configs and adjust JVM arguments 2026-01-16 12:21:09 +01:00
hongwei
2c9af4e851 feature/ (http4s): add comprehensive Http4s utilities and middleware support
- Add ErrorResponseConverter for converting OBP errors to http4s Response[IO]
- Add Http4sSupport with CallContext builder and vault keys for request attributes
- Add ResourceDocMiddleware for validation chain middleware in http4s
- Add Http4sSupport package object with utility functions and type aliases
- Update Http4s700 to integrate new middleware and error handling utilities
- Remove Http4sResourceDocSupport in favor of consolidated Http4sSupport module
- Consolidate Http4s-related utilities into dedicated util/http4s package for better organization and reusability
2026-01-16 09:33:43 +01:00
hongwei
f58fb77c5d refactor/(api): update CallContext logic and introduce Http4s utilities
- Refactor `getUserAndSessionContextFuture` to prioritize `CallContext` fields over `S.request` for http4s compatibility
- Introduce `Http4sResourceDocSupport` with utilities for validation, middleware, and error handling
- Remove redundant middleware and unused `CallContext` definition in `Http4s700`
- Improve modularity and enable http4s request handling in v7.0.0 API routes
2026-01-15 11:08:14 +01:00
simonredfern
f5dd612088 Merge upstream/develop into develop after conflict resolution 2026-01-14 16:21:47 +01:00
simonredfern
439423fc4d Adding SuperAdmin Entitlement 2 2026-01-14 14:08:15 +01:00
simonredfern
423c0c17bd JKS endpoint tagged OAuth and OIDC 2 adding tags - and adding SuperAdmin Entitlement 2026-01-14 13:44:02 +01:00
simonredfern
ae599cef45 JKS endpoint tagged OAuth and OIDC 2026-01-14 13:30:33 +01:00
simonredfern
9eb9843066 Execute Policy endpoint 2026-01-14 09:55:02 +01:00
simonredfern
f95e8b8645 ABAC Policy instead of tag 2026-01-14 09:32:23 +01:00
simonredfern
d95189e36f Aligning ABAC examples with actual field names 2026-01-13 19:07:23 +01:00
simonredfern
9576a5ccc7 Feature: ABAC has entitlements for auth user and obo user 2026-01-13 17:27:10 +01:00
simonredfern
63b46b77f2 Docfix: Fewer ABA examples part 2 2026-01-13 17:27:10 +01:00
simonredfern
09e8c6c48f Docfix: Fewer ABA examples part 1 2026-01-13 17:27:10 +01:00
simonredfern
8698c8c0b5 Changed role name to canGetSystemConnectorMethodNames 2026-01-13 17:27:10 +01:00
simonredfern
4fe6775029 CanGetMethodRoutingNames 2026-01-13 17:27:10 +01:00
hongwei
b9ca1591f4 test/fixed failed tests 2026-01-13 17:27:10 +01:00
hongwei
886bbf04f6 refactor/code clean 2026-01-13 17:27:10 +01:00
hongwei
9e6cc0fb87 docfix/tweaked the default port for http4s 2026-01-13 17:27:10 +01:00
hongwei
2ab1f4ff3e test/ApiVersionUtilsTest: Update expected version count to 25 2026-01-13 17:26:49 +01:00
hongwei
f816f230b5 feature/Enhance resource docs handling for v7.0.0
- Update `getResourceDocsList` to include v7.0.0 in `ResourceDocsAPIMethods`
- Modify `Http4s700` to utilize centralized `ResourceDocs140` for fetching resource docs
- Simplify resource docs filtering logic for v7.0.0 with tailored handling
2026-01-13 17:26:49 +01:00
hongwei
4a0eded98c refactor/Http4sServer: Update default http4s.port from 8181 to 8086 2026-01-13 16:38:23 +01:00
hongwei
da29c29c40 feature/Support API version 7.0.0
- Add `v7_0_0` to supported API versions in `ApiVersionUtils`
- Update `Http4s700` to return pre-defined resource docs instead of scanning for version 7.0.0
2026-01-13 16:38:23 +01:00
hongwei
ad7b6fe357 refactor(Http4sServer): Reorder service initialization and improve comments 2026-01-13 16:38:23 +01:00
hongwei
7c9095f0aa feature/Get resource docs endpoint for v7.0.0
- Introduce `getResourceDocsObpV700` to handle resource docs retrieval for API version 7.0.0
- Add `getResourceDocsList` helper function for fetching version-specific resource docs
- Update `allRoutes` to include the new endpoint
- Modify imports to include necessary utilities and remove unused references
2026-01-13 16:38:23 +01:00
hongwei
d32947ba06 refactor/Introduce http4s routes for v7.0.0 and update API resource docs
- Add `Http4sEndpoint` type alias and `http4sPartialFunction` in APIUtil for handling http4s routes
- Refactor Http4s700 to define routes as standalone functions (e.g., `root`, `getBanks`) within Implementations7_0_0 object
- Attach resource documentation to each route for better maintainability
- Create a unified `allRoutes` combining v7.0.0 route handlers
- Update imports and clean up unused references
2026-01-13 16:38:23 +01:00
Marko Milić
346cefcc90 Revert "feature/Remove Sign Up flow from legacy portal"
This reverts commit 233af77b75.
2026-01-13 12:08:13 +01:00
Simon Redfern
c2e225471c feature/(Http4s700): set JSON content type for API responses
- Add `Content-Type: application/json` header to all API response mappings in Http4s700
- Use a shared `jsonContentType` value for consistent configuration across routes
2026-01-13 11:54:00 +01:00
Marko Milić
8c3f2e2671 Merge remote-tracking branch 'upstream/develop' into develop 2026-01-13 09:02:12 +01:00
hongwei
3c9ecdfbfa refactor/(pom.xml): increase Scala compiler JVM memory allocation
- Increase initial heap size from 1G to 4G (-Xms)
- Increase maximum heap size from 3G to 12G (-Xmx)
- Increase metaspace size from 1G to 4G (-XX:MaxMetaspaceSize)
- Improve compilation performance and reduce out-of-memory errors during large-scale builds
2026-01-09 14:40:18 +01:00
hongwei
3703ab1a00 refactor/(pom.xml): disable parallel test execution to prevent database conflicts
- Disable parallel test execution in obp-api module to avoid shared H2 database state issues
- Disable parallel test execution in obp-commons module for consistency
- Set parallel configuration to false across both modules
- Comment out threadCount configuration as it is no longer needed
- Tests share an in-memory H2 database which causes conflicts when run concurrently
- This resolves intermittent test failures caused by database state contamination between parallel test runs
2026-01-09 13:30:45 +01:00
hongwei
5251d79051 rafactor/ perf(pom.xml): optimize Scala compiler JVM memory configuration
- Reduce initial heap size from 4G to 1G for faster startup
- Lower maximum heap size from 12G to 3G for resource efficiency
- Add stack size configuration (-Xss4m) for thread optimization
- Reduce metaspace size from 4G to 1G to minimize memory overhead
- Improve build performance on resource-constrained environments while maintaining compilation stability
2026-01-09 12:27:51 +01:00
hongwei
31e39e3773 refactor(build): optimize JVM memory allocation and enable parallel test execution
- Increase JVM heap memory from 512m to 2-4G for faster test execution
- Add G1GC garbage collector and tiered compilation for improved performance
- Enable parallel test execution with threadCount=4 to avoid shared state issues
- Add incremental recompilation mode and Zinc server for faster builds
- Increase Scala compiler JVM memory from 64m/1024m to 512m/2G
- Add language feature flags to suppress compiler warnings
- Add test-results directory to .gitignore for cleaner repository
- Apply optimizations consistently across obp-api, obp-commons, and root pom.xml
- These changes reduce build and test execution time while maintaining stability
2026-01-09 02:51:18 +01:00
hongwei
f14c7b00a9 Merge remote-tracking branch 'Hongwei/develop-Simon' into develop 2026-01-07 15:26:39 +01:00
hongwei
e7a13797af reafctor/add test failure ignore property to maven config
Add maven.test.failure.ignore property to control test execution behavior
2026-01-07 11:23:31 +01:00
hongwei
6eea791193 feature/enhance test reporting and build logging in workflows
Add surefire report plugin and test report artifact uploads
Enable pipefail in maven builds and upload build logs
Remove redundant scala-test-compile execution
2026-01-06 21:39:42 +01:00
hongwei
9e9abdf16a test/fixed failed tests 2026-01-06 21:34:28 +01:00
simonredfern
7927558f19 Add apiTagLogCache tag to log cache endpoints 2026-01-06 15:48:02 +01:00
simonredfern
415e22f5a2 Log cache separate endpoints and different Role names 2026-01-06 15:48:02 +01:00
simonredfern
aa823e1ee3 Resource doc yaml respects content parameter 2026-01-06 15:48:02 +01:00
simonredfern
bb5c413aaa bugfix: support multiple oauth2.jwk_set.url 2026-01-06 15:48:02 +01:00
simonredfern
275baf6244 System Cache Config fields fix tests 2026-01-06 15:48:01 +01:00
simonredfern
5c2f6b6fdc System Cache Config fields fix 2026-01-06 15:48:01 +01:00
simonredfern
f94a9cf73f System Cache Config fields 2026-01-06 15:48:01 +01:00
simonredfern
31a277dace Cache info storage_location 2026-01-06 15:48:01 +01:00
simonredfern
2e46a93ae3 Tests for cache info etc 2026-01-06 15:48:01 +01:00
hongwei
c99cb73cfd refactor/code clean 2026-01-06 12:20:39 +01:00
hongwei
9844051a85 docfix/tweaked the default port for http4s 2026-01-06 12:16:57 +01:00
Marko Milić
67b16b1030 Merge remote-tracking branch 'upstream/develop' into develop 2026-01-06 10:20:03 +01:00
simonredfern
665e4bf33a Add apiTagLogCache tag to log cache endpoints 2026-01-05 23:49:39 +01:00