Commit Graph

14972 Commits

Author SHA1 Message Date
Simon Redfern
d8f74e456a
Merge pull request #2672 from simonredfern/develop
connector health check
2026-01-29 10:24:10 +01:00
simonredfern
dc53c9367b Adding GET /system/connectors/stored_procedure_vDec2019/health 2026-01-29 05:03:39 +01:00
simonredfern
2731a4954b show warning at boot for Super admin users. 2026-01-28 21:46:49 +01:00
simonredfern
af36601d76 Allow CanVerifyUserCredentials for isSuperAdmin 2026-01-28 21:40:23 +01:00
simonredfern
5489dccc2c Fix Verify User Credential tests 2026-01-28 21:12:16 +01:00
simonredfern
90dcd76d5f Tests for Verify User Credentials 2026-01-28 17:12:01 +01:00
simonredfern
e3ae001ac5 Added POST /users/verify-credentials 2026-01-28 17:00:00 +01:00
Simon Redfern
75adf7d0ab
Merge pull request #2670 from simonredfern/develop
Updating introductory system documentation md
2026-01-28 16:52:13 +01:00
simonredfern
69c8970c27 Merge remote-tracking branch 'upstream/develop' into develop 2026-01-28 16:09:28 +01:00
simonredfern
3c40b81f28 Updating introductory_system_documenation.md regarding updated endpoints
in v6.0.0
2026-01-28 16:05:06 +01:00
karmaking
c365b6afb2 Merge branch 'develop' of https://github.com/OpenBankProject/OBP-API into develop 2026-01-28 11:50:09 +01:00
karmaking
31b7a3a3ce update build pipeline 2026-01-28 11:46:51 +01:00
Simon Redfern
ac1530fb2f
Merge pull request #2668 from hongwei1/refactor/tweakedActions
reafactor/ ci: expand branch pattern to include all branches
2026-01-28 10:54:56 +01:00
hongwei
a97c8d6ffb reafactor/ ci: expand branch pattern to include all branches
The previous branch pattern excluded some branches unintentionally. Adding '**' ensures all branches are matched except 'develop'.
2026-01-28 09:41:29 +01:00
Simon Redfern
a81e208cb1
Merge pull request #2665 from hongwei1/develop
test/added tests for V700
2026-01-27 16:30:40 +01:00
Simon Redfern
61c83581ac
Merge pull request #2659 from constantine2nd/develop
Merge conflicts resolved, HTTP4S
2026-01-27 16:25:50 +01:00
Simon Redfern
8ab316b492
Merge pull request #2666 from simonredfern/develop
Making dynamic entities more snake_case
2026-01-26 15:46:40 +01:00
hongwei
5ff7b299a6 refactor/(resource-docs): enforce canReadResourceDoc role via middleware
Move role-based authorization for resource-docs endpoint from endpoint implementation to ResourceDocMiddleware. This ensures consistent authentication handling across all endpoints and removes duplicate authorization logic.

The middleware now checks the `resource_docs_requires_role` property and enforces the `canReadResourceDoc` role when enabled. Tests are updated to verify proper 403 responses with missing role messages.
2026-01-26 14:29:54 +01:00
hongwei
73b9ecb591 Merge remote-tracking branch 'Marko/develop' into develop 2026-01-26 13:56:51 +01:00
simonredfern
e08d25520e Dynamic Entity Example id is snake case e.g. piano_id rather than
pianoId
2026-01-26 13:03:35 +01:00
Marko Milić
87b48fc71d feature/Tweak GitHub workflows 2026-01-26 12:54:28 +01:00
hongwei
897a6a1584 test/(http4s): improve error handling and request header extraction
- Safely extract request headers using `S.request.map(...).openOr(Nil)` instead of `openOrThrowException`
- Add proper error handling for resource-docs endpoint using `ErrorResponseConverter`
- Extract query parameters directly from URI instead of parsing URL string
- Add comprehensive test suite for Http4s700 routes
2026-01-26 12:47:14 +01:00
Marko Milić
18daf8dfb2 Revert "fix Github Action"
This reverts commit 3a264ed326.
2026-01-26 12:42:31 +01:00
simonredfern
26f2fd192b Docfix: Mentioning content=dynamic for resource docs 2026-01-26 10:51:33 +01:00
Marko Milić
0188ba61a0 refactor/Tweak variables names 2026-01-26 10:25:36 +01:00
Marko Milić
1534831ff4 refactor/Refactor ResourceDocMiddleware: integrate JSON content type and improve validation DSL
- Ensure all responses (errors and successful) have JSON Content-Type
- Replace repeated EitherT patterns with a clean Validation DSL (success/failure)
- Add ValidationContext to accumulate user, bank, account, view, and counterparty entities
- Add detailed comments for authentication, authorization, and entity validation steps
- Simplify middleware logic while preserving original validation order and behavior
2026-01-23 18:13:42 +01:00
Marko Milić
79ea9231a1 Merge upstream/develop into develop after conflict resolution 2026-01-23 12:41:26 +01:00
hongwei
493a7858e0 test/(http4s): add ResourceDocMatcher unit tests
- Add comprehensive test suite for ResourceDocMatcher with 545 lines of test coverage
- Test exact path matching for GET, POST, and multi-segment paths
- Test verb and path mismatch scenarios returning None
- Test BANK_ID variable matching and parameter extraction
- Test BANK_ID + ACCOUNT_ID variable matching and extraction
- Test BANK_ID + ACCOUNT_ID + VIEW_ID variable matching and extraction
- Test COUNTERPARTY_ID variable matching and extraction
- Test non-matching request scenarios
- Ensure ResourceDocMatcher correctly identifies and extracts path parameters for all variable types
- Use FeatureSpec with Given-When-Then style for clear test documentation
2026-01-23 12:37:21 +01:00
hongwei
f0eaedaf3a test/(http4s): add comprehensive Http4sCallContextBuilder unit tests
- Add Http4sCallContextBuilderTest with 454 lines of test coverage
- Test URL extraction including path, query parameters, and path parameters
- Test header extraction and conversion to HTTPParam format
- Test body extraction for POST, PUT, and GET requests
- Test correlation ID generation and extraction from X-Request-ID header
- Test IP address extraction from X-Forwarded-For and direct connection
- Test authentication header extraction for all supported auth types
- Test error handling and edge cases in CallContext building
- Ensure Http4sCallContextBuilder correctly processes http4s Request[IO] objects
2026-01-23 12:21:18 +01:00
Marko Milić
e0f747a64c Merge remote-tracking branch 'upstream/develop' into develop 2026-01-23 10:29:19 +01:00
simonredfern
7efbf6389a closing database connections after StoredProcedure calls and Migrations. 2026-01-22 18:41:01 +01:00
simonredfern
6ad3689fd3 Merge remote-tracking branch 'upstream/develop' into develop 2026-01-22 18:38:39 +01:00
simonredfern
3d4660ec0b added _links for dynamic entity CRUD endpoints. + adding GET system
database pool endpoint
2026-01-22 18:37:42 +01:00
Simon Redfern
3cb783affa
Merge pull request #2662 from hongwei1/develop
feature/addResourceDocsGuardsForHttp4s
2026-01-22 16:35:11 +01:00
hongwei
0415d13b1a refactor/(http4s): improve documentation and code clarity in error handling and support utilities
- Enhance ErrorResponseConverter documentation with detailed handler descriptions and response format details
- Add comprehensive comments explaining error type handling (APIFailureNewStyle, Box Failure, unknown exceptions)
- Document correlation-Id header inclusion and HTTP status code mapping in error responses
- Simplify error matching logic in toHttp4sResponse using pattern matching
- Improve Http4sSupport file documentation with clear component descriptions
- Add usage examples for RequestOps implicit class in endpoint implementations
- Clarify CallContext storage mechanism using http4s Vault (type-safe key-value store)
- Document validated entity storage (user, bank, bankAccount, view, counterparty) within CallContext
- Add inline comments explaining ResourceDocMatcher functionality and request matching process
- Improve code readability with consistent formatting and clearer method documentation
2026-01-22 16:19:53 +01:00
hongwei
83d90bfc44 Merge remote-tracking branch 'Simon/develop' into develop
# Conflicts:
#	.gitignore
2026-01-22 16:11:59 +01:00
hongwei
11e4a71cc4 feature(http4s): add EndpointHelpers for simplified endpoint implementations
- Add EndpointHelpers object with reusable endpoint execution patterns
- Implement executeAndRespond helper for Future-based business logic execution
- Implement withUser helper to extract and validate User from CallContext
- Implement withBank helper to extract and validate Bank from CallContext
- Implement withUserAndBank helper for endpoints requiring both User and Bank
- Add comprehensive documentation and usage examples for each helper
- Import EndpointHelpers in Http4s700 for endpoint implementation
- Reduce boilerplate in endpoint implementations by centralizing common patterns
- Improve code consistency and maintainability across http4s endpoints
2026-01-22 15:43:49 +01:00
hongwei
df54e60fd0 refactor(http4s): simplify CallContext access with implicit RequestOps extension
- Replace withCallContext helper method with implicit RequestOps extension class
- Add `req.callContext` syntax for cleaner CallContext extraction in endpoints
- Enhance Http4sRequestAttributes documentation with usage examples
- Update Http4s700 endpoints to use new implicit CallContext accessor pattern
- Remove nested callback pattern in favor of direct implicit CallContext availability
- Improve code readability by eliminating withCallContext wrapper boilerplate
- Add RequestOps import to Http4s700 for implicit extension method support
2026-01-22 15:26:59 +01:00
simonredfern
b4856ef2ac docfix: fixing dynamic-entity example response for list 2026-01-22 15:09:16 +01:00
hongwei
dbd046bf7c refactor(http4s): enhance CallContext extraction and validation chain
- Add withCallContext helper method to Http4sSupport for simplified endpoint code
- Document use of http4s Vault for type-safe request attributes storage
- Clarify that validated entities (bank, bankAccount, view, counterparty) are stored within CallContext
- Reorder validation chain in ResourceDocMiddleware to check roles before entity validation
- Add special handling for resource-docs endpoint with configurable role requirement
- Extract runValidationChain method to support both middleware and endpoint wrapping patterns
- Improve authentication error handling with better Box pattern matching
- Add comprehensive documentation and usage examples for CallContext extraction
- Enhance logging for validation chain execution and debugging
2026-01-22 14:36:58 +01:00
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
Simon Redfern
f1a2915640
Merge pull request #2664 from simonredfern/develop
v6.0.0 versions of Dynamic Entities endpoints use entity_name rather than dynamic key
2026-01-22 11:46:58 +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
hongwei
baecbc110f Merge remote-tracking branch 'Simon/develop' into develop 2026-01-22 09:04:50 +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
karmaking
bb4e082160 add context lines to build failures 2026-01-22 07:39:19 +01:00