-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: per-user secured Algolia API keys [BB-8083] #11
feat: per-user secured Algolia API keys [BB-8083] #11
Conversation
b0a1b23
to
4d582c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
- I tested this
- I read through the code
- Includes tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- I tested this: in feat: fetching of a secured Algolia key [BB-8083] 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-secure
repository: n/a
Returns an Algolia API key that is secured to only allow searching for | ||
objects associated with enterprise customers that the user is linked to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to mention that we use this in the frontend-app-learner-portal-enterprise
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
|
||
username = 'test_learner_portal_user' | ||
self.create_user(username=username, is_staff=False) | ||
self.client.login(username=username, password=TEST_PASSWORD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: could you please add an assert for the AnonymousUser (i.e., before we log in)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
b74eb6f
to
87c69f5
Compare
Co-authored-by: Piotr Surowiec <[email protected]>
87c69f5
to
3c9c3dc
Compare
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