Skip to content
Snippets Groups Projects
  1. Nov 29, 2022
  2. Nov 28, 2022
    • Arunmozhi's avatar
      refactor: replace oauth param fetching from client to signature method · 4e388eac
      Arunmozhi authored
      The OAuthlib 1.0 Client's get_oauth_params fails when processing Webob
      request object with the body stored as a binary instead of string.
      This commit replaces the client function with a different one which
      doesn't involve body hashing, as the body hash is calculated explicitly.
      4e388eac
  3. Nov 21, 2022
  4. Nov 18, 2022
    • michaelroytman's avatar
      feat: add course flag to send external_user_id as user_id in LTI 1.1 XBlock launches · cff7744e
      michaelroytman authored
      This commit introduces a new CourseWaffleFlag lti_consumer.enable_external_user_id_1p1_launches. When this flag is enabled for a course, LTI 1.1 XBlock launches in that course will send the user's external_user_id as the user_id attribute of the launch. external_user_id is the user's external user ID as defined, created, and stored by the external_user_ids Djangoapp in the edx-platform. When this waffle is not enabled for a course - the default case - LTI 1.1 XBlock launches in that course will continue to send the user's anonymous_user_id as the user_id attribute of the launch, as before.
      
      This provides an opt-in opportunity for courses to send a consistent, static, and opaque user identifier in an LTI 1.1 XBlock launch. This may be necessary for integration with LTI tools that require such an identifier.
      
      Please be aware that toggling this flag in a running course carries the risk of breaking the LTI integrations in the course. This flag should also only be enabled for new courses in which no LTI attempts have been made.
      cff7744e
  5. Nov 16, 2022
  6. Nov 09, 2022
  7. Nov 07, 2022
    • Andy Shultz's avatar
      fix: remove general use of load_block_as_user · 5f964f1d
      Andy Shultz authored
      For the config model we do not need to go as far as binding the block
      to the user and already get enough data out of the modulestore to
      satisfy the storage on the xblock case. Add a new function to get that
      much xblock only.
      
      For the limited cases where we are using the block more directly as a
      block we maintain the old function.
      
      Also includes a fix to test_views that was closing the wrong level
      mock and leaving an open patch into other tests.
      5f964f1d
  8. Nov 04, 2022
  9. Nov 02, 2022
  10. Nov 01, 2022
  11. Oct 26, 2022
  12. Oct 25, 2022
  13. Oct 20, 2022
    • Andy Shultz's avatar
      test: mark most compat functions as nocover · a5c752f6
      Andy Shultz authored
      these functions require the LMS environment which is not available in test so
      they are generally mocked away. Mark them as such.
      a5c752f6
    • Andy Shultz's avatar
    • Andy Shultz's avatar
      feat: update lti API to pick config via launch data · a52eef76
      Andy Shultz authored
      Note that this uses config_id (the UUID) not config.id (the int)
      
      This required a way to get config_id if we only have the block.
      
      And it means that we are more likely to go through load_block_as_user
      because we have not created the config off the block even when calling
      from the block (since the block has to go through that config ID).
      
      A lot of tests had to be updated to have more complete configuration
      setup because config_id is now load bearing.
      a52eef76
    • Andy Shultz's avatar
      feat: only use anonymous user if there is no other choice · c14aa1c4
      Andy Shultz authored
      Sometimes we need to load the block. Current code always rebinds the
      block to the anonymous user because we might not have a user.
      
      But in many cases we do have a user and may have already loaded and
      bound the block in question. Check for user and request and if the
      block is already bound and just use that block if possible or at least
      load the block with the user you actually have.
      c14aa1c4
  14. Oct 19, 2022
  15. Oct 18, 2022
  16. Oct 17, 2022
    • michaelroytman's avatar
    • michaelroytman's avatar
      fix: LTI 1.3 launch URL should be redirect_uri provided by Tool in authentication request · 7fb30746
      michaelroytman authored
      This commit fixes a bug in the way we determine where to send the authentication response - the LTI 1.3 launch message - as part of an LTI 1.3 launch.
      
      According to the 1EdTech Security Framework 1.0, during an LTI 1.3 launch, "the authentication response is sent to the redirect_uri." The redirect_uri is a query or form parameter provided by the tool when it directs the browser to make a request to the Platform's authentication endpoint. However, we currently send the authentication response to the preregistered launch URL - lti_1p3_launch_url in the LtiConsumerXBlock or the LtiConfiguration model. The difference is subtle, but it is important, because the specification indicates the Platform should respect the redirect_uri provided by the Tool, assuming it is a valid redirect_uri.
      
      During the pregistration phase, "the Tool must provide one or multiple redirect URIs that are valid end points where the authorization response can be sent. The number of distinct redirect URIs to be supported by a platform is not specified." Currently, we do not support multiple redirect URIs, so the change is not immediately impactful. However, we should follow the specification and ensure that we return the authentication response to the correct URL.
      7fb30746
Loading