Skip to content

Any security / abuse guidance for implementers of "State" and "Documents" resources? #1103

Open
@rickbatka

Description

@rickbatka

Hi,

As referenced in my other ticket, I'm implementing some LRS capability and finding it strange that the spec invites end users (by way of JS in their browser) to freely be able to store and retrieve arbitrary state and documents to / from the server.

It would be trivial to author a JS "bookmarklet" that, when clicked from any page with a cmi5 / xAPI-enabled course on screen, would flood the server with malicious or large files.

As someone new to the space, it seems there should be an "offline" storage option, perhaps using browser local storage or the like. Because as the spec is written, it seems to me that if I want to support cmi5 / xAPI content, I have to have a public-facing general-purpose Document and State store.

Could the spec address this at all? An appendix that talks about hardening these endpoints might be useful. Some things to address (these are legitimate questions I have after reading the spec):

  • Should the State resource validate JSON? Should it sanitize or reject invalid JSON?
  • Should the State and Document resources implement file size restrictions? Rate limits for upload / retrieval?
  • How is the Document store used in practice? Are there a handful of common file types that cover 90% of use cases? (I really hate the idea of letting untrusted client code upload arbitrary files to my server)
  • Will my LRS still function as expected with the majority of AUs created if I disable the Document store entirely? What about the State store? Is there any way to "hint" to the AU that these features are disabled?

Thanks so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions