feat: per-user secured Algolia API keys [BB-8083] - #11
Merged
Agrendalath merged 1 commit intoNov 21, 2023
Merged
Conversation
CefBoud
reviewed
Nov 11, 2023
0x29a
force-pushed
the
0x29a/bb8083/per-user-algolia-key
branch
2 times, most recently
from
November 14, 2023 16:02
b0a1b23 to
4d582c2
Compare
CefBoud
approved these changes
Nov 15, 2023
Agrendalath
approved these changes
Nov 16, 2023
Agrendalath
left a comment
Member
There was a problem hiding this comment.
👍
- I tested this: in open-craft/frontend-app-learner-portal-enterprise#1
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
Comment on lines
+532
to
+533
| Returns an Algolia API key that is secured to only allow searching for | ||
| objects associated with enterprise customers that the user is linked to. |
Member
There was a problem hiding this comment.
Would it make sense to mention that we use this in the frontend-app-learner-portal-enterprise?
|
|
||
| username = 'test_learner_portal_user' | ||
| self.create_user(username=username, is_staff=False) | ||
| self.client.login(username=username, password=TEST_PASSWORD) |
Member
There was a problem hiding this comment.
Nit: could you please add an assert for the AnonymousUser (i.e., before we log in)?
Agrendalath
reviewed
Nov 17, 2023
0x29a
force-pushed
the
0x29a/bb8083/per-user-algolia-key
branch
from
November 17, 2023 13:10
b74eb6f to
87c69f5
Compare
Co-authored-by: Piotr Surowiec <piotr@surowiec.it>
0x29a
force-pushed
the
0x29a/bb8083/per-user-algolia-key
branch
from
November 17, 2023 13:14
87c69f5 to
3c9c3dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new endpoint that generates a secured Algolia API key capable of retrieving only data that is associated with enterprises linked to a requesting user. This is useful when you want to isolate enterprise learners, so they can't modify underlying Algolia requests to fetch the whole index content.
Testing steps
See open-craft/frontend-app-learner-portal-enterprise#1
Upstream PR
openedx#1962