Skip to content
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

Cannot access LTI Deep Link response in OpenEdx #484

Open
besonn opened this issue Jun 20, 2024 · 6 comments
Open

Cannot access LTI Deep Link response in OpenEdx #484

besonn opened this issue Jun 20, 2024 · 6 comments

Comments

@besonn
Copy link

besonn commented Jun 20, 2024

Hi there, I was trapped in some errors about deploying an LTI tools in edx-platform.

I run both edx and LTI tools on a local machine. Edx uses port 8000 and 8001, and lti tools uses 9001.

For edx, I use:

tutor mounts add ./edx-platform
tutor images build openedx-dev
tutor dev launch

which is in tutor dev

For LTI Tools, I use: pylti1.3-flask-example, which is running on 127.0.0.1:9001

So, When I tried to launch deep link in openedx. It returns Please check that you have course staff permissions and double check this block's LTI settings. I am sure that I was using a staff account. And I am quite sure I have set DCS_SESSION_COOKIE_SAMESITE = 'None' in edx-plarform/lms/env/.

I noticed that #218 mentioned the similar problems.

The error log in edx is below:

lms-1            | 2024-06-19 17:10:13,641 WARNING 114 [lti_consumer.plugin.views] [user None] [ip 172.19.X.X] views.py:496 - Permission on LTI Config <LtiConfiguration: [CONFIG_ON_XBLOCK] lti_1p3 - block-v1:edX+DemoX+Demo_Course+type@lti_consumer+block@ba1ec764026346b39f2cb233dce4f01a> denied for user <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f270d1e75e0>>:
lms-1            | 2024-06-19 17:10:13,648 DEBUG 114 [django.db.backends] [user None] [ip 172.19.X.X] utils.py:161 - (0.000) COMMIT; args=None; alias=default
lms-1            | [19/Jun/2024 17:10:13] "POST /api/lti_consumer/v1/lti/8/lti-dl/response HTTP/1.1" 403 7093

I masked my ip address in error log. How to solve this problem?

Thanks.

@besonn
Copy link
Author

besonn commented Jun 20, 2024

The tutur version is 17.0.5, and the edx-platform version is quince.

@ichintanjoshi
Copy link

Facing the same

@besonn
Copy link
Author

besonn commented Jul 5, 2024

@ichintanjoshi We seemed to solve this problem. Are you running edx on tutor? If so, you need to modify the SAMESITE in tutor.

@ichintanjoshi
Copy link

@ichintanjoshi We seemed to solve this problem. Are you running edx on tutor? If so, you need to modify the SAMESITE in tutor.

Yes, in tutor,

I've set DCS_SESSION_COOKIE_SAMESITE as 'None'

Do we also need to set SAMESITE as 'None' ?

@besonn
Copy link
Author

besonn commented Jul 5, 2024

@ichintanjoshi Here is our findings: the modification of DCS_SESSION_COOKIE_SAMESITE in edx-platform seems helpless. So we install tutor in source document, then we modify the source code of tutor (lax to none) tutor

And we run tutor in dev, it works.

But it could not access lms or cms in Chrome, Because of get-ready-for-new-samesitenone-secure. It works in firefox, I think it is enough for us to debug in dev mode.

@ichintanjoshi
Copy link

Okay @besonn thanks, I will try to replicate the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants