There are currently no tests to ensure that correct security is implemented for the Orders feed.
Additional tests
booking-partner-authentication feature should be split into:
booking-partner-openid-authentication-for-multiple-sellers - the authorization-code-flow related tests (required if multiple-sellers feature is enabled)
booking-partner-openid-authentication - the client-credentials-flow tests (required if openid-authentication-for-multiple-sellers feature is enabled)
booking-partner-authentication - this is a set of authentication-agnostic tests to check the booking partner partitioning is implemented correctly (always required)
booking-partner-partitioning-for-orders test
- Orders from two different bookings partners must not be visible to each other, and UUID must be unique within each booking partner
- Using primary booking partner auth, make a booking using a UUID, cancel it, and check for it in the Orders feed. Using secondary booking auth, assert that an Order with the same UUID is not present in the orders feed. Then using secondary booking partner auth, make a different booking using the same UUID, cancel it, and check for it in the Orders feed. Both booking should succeed.
booking-partner-partitioning-for-order-proposals test
- Order Proposals from two different bookings partners must not be visible to each other, and UUID must be unique within each booking partner
- (if
minimal-proposal is implemented) Using primary booking partner auth, make a P call using a UUID, approve it, and check for it in the Order Proposals feed. Using secondary booking auth, assert that an Order Proposal with the same UUID is not present in the Order Proposals feed. Then using secondary booking partner auth, make a different P call using the same UUID, approve it, and check for it in the Orders feed.
multiple-sellers feature should also include:
seller-access-restricted-by-auth test
- Credentials for Seller (a) must not provide access make bookings for Seller (b)
- Using primary seller auth, make a call to C1, C2, and P/B for the secondary seller, expecting all calls to fail with
InvalidAuthorizationDetailsError (this is supported on the coverage/additional-auth-tests branch)
Additional test suite features to support these
To implement the above, recommend additional features in the broker microservice:
- Allow Orders feed listening to take into account the booking-partner creds to use (primary or secondary, already configured) - this likely means harvesting double the number of Orders feeds (harvesting running for each set of creds,
getOrdersFeedHeader looks like it could easily be parameterised to support primary and secondary).
- Keep track of the UUIDs seen in each Orders/Order Proposal feed for each booking-partner creds. Add a new endpoint that allows test suite to assert that a particular UUID has not been seen yet.
Out of scope for this issue
Additionally to assure stability of tests that use the Orders feed, the following tests should be added to the order-deletion feature:
There are currently no tests to ensure that correct security is implemented for the Orders feed.
Additional tests
booking-partner-authenticationfeature should be split into:booking-partner-openid-authentication-for-multiple-sellers- theauthorization-code-flowrelated tests (required ifmultiple-sellersfeature is enabled)booking-partner-openid-authentication- theclient-credentials-flowtests (required ifopenid-authentication-for-multiple-sellersfeature is enabled)booking-partner-authentication- this is a set of authentication-agnostic tests to check the booking partner partitioning is implemented correctly (always required)booking-partner-partitioning-for-orderstestbooking-partner-partitioning-for-order-proposalstestminimal-proposalis implemented) Using primary booking partner auth, make a P call using a UUID, approve it, and check for it in the Order Proposals feed. Using secondary booking auth, assert that an Order Proposal with the same UUID is not present in the Order Proposals feed. Then using secondary booking partner auth, make a different P call using the same UUID, approve it, and check for it in the Orders feed.multiple-sellersfeature should also include:seller-access-restricted-by-authtestInvalidAuthorizationDetailsError(this is supported on thecoverage/additional-auth-testsbranch)Additional test suite features to support these
To implement the above, recommend additional features in the broker microservice:
getOrdersFeedHeaderlooks like it could easily be parameterised to supportprimaryandsecondary).Out of scope for this issue
Additionally to assure stability of tests that use the Orders feed, the following tests should be added to the
order-deletionfeature:order-lifecycletestorder-proposal-lifecycletest