Skip to content

feat: create volume for private LMS/CMS media assets - #1124

Merged
kdmccormick merged 3 commits into
overhangio:nightlyfrom
ormsbee:private-media
Oct 2, 2024
Merged

kdmccormick merged 3 commits into
overhangio:nightlyfrom
ormsbee:private-media

Conversation

@ormsbee

@ormsbee ormsbee commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

Content Libraries will store asset files like images, transcripts, and PDFs using Learning Core–which in turn uses django-storages and expects some backing file store. These files should NOT be directly accessible via the browser, both because of access policies and the fact that the filenames will not be meaningful by themselves and must be translated by app logic. For details see:

The existing /data/openedx-media -> /openedx/media mount is publicly accessible by browser, and so is not appropriate for this purpose. This commit creates a parallel /data/openedx-media-private -> /openedx/media-private volume mapping instead.

This commit also creates configuration needed for openedx-learning to point to this new directory.

This commit does NOT currently add support for this in k8s, as that will require changes to the minio plugin.

Content Libraries will store asset files like images, transcripts, and
PDFs using Learning Core–which in turn uses django-storages and expects
some backing file store. These files should NOT be directly accessible
via the browser, both because of access policies and the fact that the
filenames will not be meaningful by themselves and must be translated by
app logic. For details see:

* https://github.com/openedx/openedx-learning/blob/main/docs/decisions/0015-serving-static-assets.rst
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/contents/models.py
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/components/models.py

The existing /data/openedx-media -> /openedx/media mount is publicly
accessible by browser, and so is not appropriate for this purpose. This
commit creates a parallel /data/openedx-media-private ->
/openedx/media-private volume mapping instead.

This commit also creates configuration needed for openedx-learning to
point to this new directory.

This commit does NOT currently add support for this in k8s, as that will
require changes to the minio plugin.
@kdmccormick
kdmccormick self-requested a review September 26, 2024 20:02
"user": None,
}

LEARNING_CORE = {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I should probably make this OPENEDX_LEARNING, to reduce confusion...

@bradenmacdonald

Copy link
Copy Markdown
Contributor

✅ I tested this using these instructions and it's working well.

@regisb

regisb commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

Here's the corresponding MinIO issue: overhangio/tutor-minio#48

@ormsbee
ormsbee deleted the private-media branch October 25, 2024 18:29
Danyal-Faheem pushed a commit to edly-io/tutor that referenced this pull request Jan 15, 2025
Content Libraries will store asset files like images, transcripts, and
PDFs using Learning Core–which in turn uses django-storages and expects
some backing file store. These files should NOT be directly accessible
via the browser, both because of access policies and the fact that the
filenames will not be meaningful by themselves and must be translated by
app logic. For details see:

* https://github.com/openedx/openedx-learning/blob/main/docs/decisions/0015-serving-static-assets.rst
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/contents/models.py
* https://github.com/openedx/openedx-learning/blob/main/openedx_learning/apps/authoring/components/models.py

The existing /data/openedx-media -> /openedx/media mount is publicly
accessible by browser, and so is not appropriate for this purpose. This
commit creates a parallel /data/openedx-media-private ->
/openedx/media-private volume mapping instead.

This commit also creates configuration needed for openedx-learning to
point to this new directory.

This commit does NOT currently add support for this in k8s, as that will
require changes to the minio plugin.
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

Successfully merging this pull request may close these issues.

4 participants