-
Notifications
You must be signed in to change notification settings - Fork 2
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
[DEPR] Remove EdxRestApiClient usage in edx-enterprise #42
Labels
depr
Proposal for deprecation & removal per OEP-21
Comments
dyudyunov
added a commit
to dyudyunov/devstack
that referenced
this issue
Apr 13, 2022
Required as a part of openedx/public-engineering#42
dyudyunov
added a commit
to raccoongang/edx-platform
that referenced
this issue
Apr 13, 2022
This is a part of openedx/public-engineering#42 - add settings for enterprise-backend-service DOT application - update utils used by enterprise to get rid of EdxRestAPIClient - original utils stays in the code (to keep edx-platform api clients working) till the openedx/public-engineering#39 deprecation work will be done
dianakhuang
pushed a commit
to openedx-unsupported/devstack
that referenced
this issue
Apr 14, 2022
Required as a part of openedx/public-engineering#42
johnnagro
pushed a commit
to openedx/edx-platform
that referenced
this issue
Apr 21, 2022
…0240) * refactor: enterprise dependencies for EdxRestAPIClient replacement This is a part of openedx/public-engineering#42 - add settings for enterprise-backend-service DOT application - update utils used by enterprise to get rid of EdxRestAPIClient - original utils stays in the code (to keep edx-platform api clients working) till the openedx/public-engineering#39 deprecation work will be done * fix: fix typo in the docstring
@dyudyunov can you confirm that this can be closed? It looks like all the relevant PRs have merged. |
hi, @feanil |
jawad-khan
pushed a commit
to openedx/edx-platform
that referenced
this issue
Jun 14, 2022
…0240) * refactor: enterprise dependencies for EdxRestAPIClient replacement This is a part of openedx/public-engineering#42 - add settings for enterprise-backend-service DOT application - update utils used by enterprise to get rid of EdxRestAPIClient - original utils stays in the code (to keep edx-platform api clients working) till the openedx/public-engineering#39 deprecation work will be done * fix: fix typo in the docstring
nsprenkle
pushed a commit
to openedx-unsupported/devstack
that referenced
this issue
Nov 21, 2023
Required as a part of openedx/public-engineering#42
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"Capturing Notes from Slack from Nimisha about what needs to be done here to deal with the JWT tokens in use right now in edx-enterprise:
OAuthAPIClient
is intended to be used for backend-to-backend API calls. (See this ADR.)That is, it works for when Microservice A wants to call Microservice B on behalf of itself (A).It does not work for when Microservice A wants to call Microservice B on behalf of a specific user (U). (edited)We typically have frontends needing to call APIs on behalf of users (U).For backend-to-backend, we typically have these calls made in asynchronous celery tasks (in the server’s context) - not within a user’s call.
It looks like the
user
passed here is a service-user and not an end-user: https:/edx/edx-enterprise/blob/b55a50473775be18505565b99d7966389fb81ca9/enterprise/api_client/discovery.py#L426So… while some additional refactoring will be needed, it shouldn’t require code changes on the Discovery-side.
Here’s what I believe needs to happen:Configure OAuth Settings ([@Rraposa|https://edx-internal.slack.com/team/UDA40RS1J] Is there an easier way to do this?)
edx-enterprise
needs to define its ownENTERPRISE_BACKEND_SERVICE_EDX_OAUTH2_KEY
andENTERPRISE_BACKEND_SERVICE_EDX_OAUTH2_SECRET
. These ^ are to be shared only with the “User Service” and no other service.BACKEND_SERVICE_EDX_OAUTH2_KEY
andBACKEND_SERVICE_EDX_OAUTH2_SECRET
in https:/edx/edx-internal|https:/edx/edx-internal .edx-enterprise
will want to prefix its configuration settings withENTERPRISE
sinceedx-enterprise
is currently a “plugin” in edx-platform instead of its own service - to prevent name collisions with other plugins.Code Changes
Refactor
CourseCatalogApiServiceClient to no longer get the service user.
Refactor
CourseCatalogApiClient to no longer require a
user
.Refactor
course_discovery_api_client to no longer build JWTs. Instead use the above configuration settings to call
OAuthAPIClient
"Other Info
Original Jira Issue: https://openedx.atlassian.net/browse/DEPR-134
The text was updated successfully, but these errors were encountered: