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

Bug: Unable to preview/view component assets unless logged into CMS #1434

Open
pomegranited opened this issue Oct 24, 2024 · 4 comments
Open
Assignees
Labels
bug Report of or fix for something that isn't working as intended

Comments

@pomegranited
Copy link
Contributor

pomegranited commented Oct 24, 2024

The user must be explicitly logged in to the CMS or they get a 403 when trying to view library component assets.

See e.g deer.jpg.

We'll need a solution that works for both the Authoring MFE and the Learning MFE.

Steps to reproduce

  1. Log out completely: https://tagging-preview.staging.do.opencraft.hosting/logout
  2. Log in to the MFE (via LMS): https://app.tagging-preview.staging.do.opencraft.hosting/course-authoring/home
  3. Search for the "Deer" text component in the Testing Library: https://app.tagging-preview.staging.do.opencraft.hosting/course-authoring/library/lib:OpenCraft:TL/components
  4. Preview it -- the dear.jpg request will 403
  5. Login to the CMS: https://cms.tagging-preview.staging.do.opencraft.hosting/login/
  6. Refresh the component -- the dear.jpg request will succeed.
@bradenmacdonald bradenmacdonald moved this to In Progress in Libraries Overhaul Oct 24, 2024
@bradenmacdonald bradenmacdonald added the bug Report of or fix for something that isn't working as intended label Oct 24, 2024
@bradenmacdonald
Copy link
Contributor

@pomegranited How does one get the MFE without being explicitly logged in to the CMS? What are the steps for reproducing this?

@pomegranited
Copy link
Contributor Author

@bradenmacdonald

How does one get the MFE without being explicitly logged in to the CMS?

Logging into the MFE is done via the LMS, not the CMS, so we're logged in to the LMS, but not necessarily to the CMS. And CMS auth is SSO now.

The API hits that the MFE makes to the CMS are authenticated with JWTs -- which gets around this issue. But when the page just makes a normal request to view a static file, unless we've gone through the full CMS SSO login process, we're not authenticated

What are the steps for reproducing this?

I've updated the issue with the steps.

@navinkarkera navinkarkera self-assigned this Nov 4, 2024
@navinkarkera navinkarkera moved this from Backlog to In Progress in Libraries Overhaul Nov 4, 2024
@navinkarkera navinkarkera moved this from In Progress to Ready for AC testing in Libraries Overhaul Nov 9, 2024
@navinkarkera
Copy link
Contributor

@jmakowski1123 @lizc577 @sdaitzman @marcotuts This is ready for AC testing on the sandbox

@ChrisChV
Copy link
Contributor

@jmakowski1123 @lizc577 @sdaitzman @marcotuts Friendly reminder that this is ready for AC testing on the sandbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
Status: Ready for AC testing
Development

No branches or pull requests

4 participants