on 2022 Sep 20 8:43 AM
Good morning,
The `/{baseSiteId}/users/{userId}/orders/{code}` allows me to get orders of both anonymous and authenticated users.
1. To get an order of an authenticated user, I need to provide a valid, user-specific access token - that's OK.
2. To get an order of an anonymous user, it is enough if I provide a generic application token (derived from `clientId` and `clientSecret`). Therefore, if I have an application token, I can theoretically fetch any anonymous user's order (provided that I have its `guid`) along with the sensitive data.
In my frontend application, I want to implement a Thank You page which needs some order data (e.g. creation date, number and status). I want to display it for both authenticated and anonymous users (after a guest checkout). However, I'm a little bit concerned about potential vulnerabilities it might cause if my frontend uses that endpoint and allows to fetch anonymous user orders from it.
Is there any additional way of securing this endpoint through the Backoffice? Or is it some already exercised pattern that could be used on the frontend to mitigate the risks (e.g. reducing the subset of fields returned by the API)?
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Certain amt. to security can be achieved using @Secured annotation on Controller with mention of customer groups for access.
Is that what you are looking for ? Pls check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
18 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.