Commit Graph

12 Commits

Author SHA1 Message Date
wdransfield 74208c4be1 Send access token when installing app
Fixes: PLAT-1851

Test Plan:
- Verify that your app center access token
  has at least some apps blacklisted
- obtain the app center id for on of the
  blacklisted applications (i.e. gamelab
  if eduappcenter.com/api/v1/lti_apps/gamelab
  was on the blacklist).
- Install an app from the app center but
  intercept the request made to
  "course/course_id/create_tool_with_verification"
  and change the 'app_center_api' value to
  the blacklisted id (Or just mimic the POST with
  curl, Postman, etc.).
- Verify that installation fails
- Verify that installing a non-blacklisted app
  succeeds.

Change-Id: I306a76927eb4677530de11db1ae6681b8f1c117b
Reviewed-on: https://gerrit.instructure.com/92144
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-10-07 16:51:06 +00:00
wdransfield 9338e895ff Make Canvas app center secure
Fixes PLAT-1834

Test Plan:
- Install application from the CAnvas app center to verify that
  the Canvas app center is using the
  /api/v1/courses/:id/create_tool_with_verification
  endpoint.
- Repeat the installation but intercept the request
  and modify the "config_url" post param (or just
  replicate the installation post request with
  Postman or similar and include the modified param).
  Make sure Canvas still installs the tool indicated by
  the app_center_id, not the tool at the modified config_url
  location.
- Attempt to make the same request with the
  'app_center_id' param missing. Make sure
  the tool is not installed an an error is
  returned

Change-Id: I2e025a2cb840d77d972aabc4352ac66ed7d21560
Reviewed-on: https://gerrit.instructure.com/91110
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2016-09-30 16:32:46 +00:00
Ben Young a55ff46440 Allow LTI whitelisting from eduappcenter by sub-account
Refs PFS-3705

Test Plan
* Eduappcenter.com create a whitelist and access token
* Go to an account settings page (Apps Tab)
* Click Manage App List button in upper right
* Apps page should reflect the whitelist from Eduappcenter.com
* Courses within that subdomain should also reflect whitelisting
  (but not have the Manage App List button)
* If no access token is saved account should default to
  whitelist from the eduappcenter plugin settings

Change-Id: I566f1c7e103f2d9377e56914fc4b8e5af3995889
Reviewed-on: https://gerrit.instructure.com/73697
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2016-03-25 17:05:42 +00:00
Eric Berry 44d4a9fa7f Rebuilt App Center in React
fixes PLAT-731
fixes PLAT-774
fixes PLAT-679

Test steps:
- Add, remove, navigate and show apps
- Ensure that when the App Center is disabled,
  you are only able to access the configurations

Patchset notes:
33: removed ability to destroy cache via api, removed reviews
37: rebased
37: fixed js map bug

Change-Id: I397aeab58ff50a5a930b39228571a7088e5784ce
Reviewed-on: https://gerrit.instructure.com/43818
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
2015-01-05 21:34:02 +00:00
Cody Cutrer bbabe9f9c6 fix app_api for ruby 2.1
it expects a string, not an array (and always has; just stricter now)

Change-Id: I704610179efec62a9f5ebc8a08444ac7aa5e9790
Reviewed-on: https://gerrit.instructure.com/36745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-25 14:56:37 +00:00
Joseph Rodriguez ccd8b38d6a Extract canvas_http into seperate gem.
Change-Id: Ib90c12b99d30853a0a1a0235c9aa1b5dd645f614
fixes: CNVS-11949
Reviewed-on: https://gerrit.instructure.com/32176
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2014-04-02 17:22:38 +00:00
Brad Humphrey 286e25c9e5 explicitly include the app center access token in the cache key
Test Plan:
 - Set up an organization on eduappcenter with a whitelist
 - Generate two tokens for the organization
 - Launch app center in canvas with the first access token
 - Quickly change the whitelist
   * The apps should match the original whitelist (no change)
 - Quickly update the access token in canvas plugin settings
    * The apps should match the updated whitelist

fixes PLAT-362

Change-Id: I652add4a993a0c6afdc4ff6b9a138efeb933c32a
Reviewed-on: https://gerrit.instructure.com/30611
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-03-03 15:38:18 +00:00
Brad Humphrey 4009e41701 adding support for edu-apps version 2
Test plan:
 - Create two accounts
 - Install the old app center (http://www.edu-apps.org/) in one
 - Install the new app center (http://edu-apps.herokuapp.com/) in the other
 - Compare the two app centers and make sure they both work
   * List apps
   * Install apps
   * View reviews
   * Create reviews
   * Update review

Change-Id: I477ac73e255676dd2faa70599aca998c6bfb3a0e
Reviewed-on: https://gerrit.instructure.com/25011
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-10-17 16:05:23 +00:00
Eric Berry ba0dd818a5 added the ability for users to review app center apps
test steps:
- enable the app center with a valid access token
- visit the app center under account settings
- click on a tool and ensure the reviews appear in the list at the
  bottom
- click the link 'Rate this tool' and add a review
- ensure that the review list reloads

** note: you will not see the actual app star rating or review
count change when you add/modify a review. this is expected behavior.

Change-Id: I79ab0769f56b3a17b6eb2056de1416eb1a0a71ca
Reviewed-on: https://gerrit.instructure.com/21054
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2013-06-04 19:16:20 +00:00
Brad Humphrey b30149a543 initial implementation of the app center
there is now a plugin that can be used to enable the app center.
this pulls data in from edu-apps.org which will be presented
under the account settings 'External Tools' tab for the user.

Testing (with plugin disabled):
- disable the plugin and visit an account settings page external
  tools tab
- ensure that there is a list (table view) of installed external
  tools no buttons to the right of 'External Tools'
- Click on 'Add External Tool' and add a new tool:

    Name: Public Collections
    Consumer Key: N/A
    Shard Secret: N/A
    Configuration Type: By URL
    Configuration URL:
    http://www.edu-apps.org/tools/public_collections/config.xml

Testing (with plugin enabled):
- Enable the plugin for the account by going to /plugins and click
  on 'App Center' cog. Enter the following:

    Access Token: N/A
    Base URL: https://www.edu-apps.org
    App Index Endpoint: /api/v1/apps
    App Show Endpoint: /api/v1/apps/:id/reviews

- Save the plugin and go to the external tools view again for the
  account
- Ensure the first page you see is the app center page (box view)
- Ensure there is a button 'View Installed Tools' to the right of
  the 'External Tools' header
- Click on 'YouTube'
- Ensure that the show page appears with star ratings and reviews
  at the bottom
- Click 'Back to App Center' and ensure it returns to the prior
  view. Click on YouTube again to return here.
- Click 'Add Tool' and then 'Submit'
- Ensure that there is notification that the tool was added and
  the table with the installed external tools are visible (inc.
  YouTube)
- Click the trash icon next to YouTube and confirm you can delete
  the tool
- Click on 'View App Center' to return to the App Center view
- Click on 'Prula'
- Click 'Add Tool'
- Click 'Submit' and ensure that there are missing required fields
  feedback
- Enter the following:

    Name: Prulu
    Consumer Key: ABCDE
    Shared Secret: FGHIJ
    Show Course in Navigation (check this)
    Course Nav Link: http://google.com

- Click 'Submit' and ensure it saved
- On the table view, ensure that 'Course Navigation' appears next
  to 'Prulu' on the installed tools table view

Change-Id: Icbc5516e93ca2586cc3a8e9a78b877e30607026c
Reviewed-on: https://gerrit.instructure.com/20165
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
2013-05-24 19:37:29 +00:00
Brad Humphrey be800d1e1f adding additional api support for the app center
Reworked how the calls were passed through to take advantage of the
app center pagination.  Also added an endpoint for retrieving app reviews.

The following canvas api calls should work, after configuring the app center plugin
 - /api/v1/accounts/:account_id/app_center/apps
 - /api/v1/accounts/:account_id/app_center/apps/:app_id/reviews
 - /api/v1/courses/:course_id/app_center/apps
 - /api/v1/courses/:course_id/app_center/apps/:app_id/reviews

These should also accept a page and per_page params

Change-Id: I15fe1225c01d04bc2ad6efa1736013b88e541c51
Reviewed-on: https://gerrit.instructure.com/20455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Brian Whitmer <brian@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-05-15 17:22:31 +00:00
Brad Humphrey 6c02d94551 app center external apps endpoint
provides an unpublished, backbone accessible api endpoint for the app center to consume.
In this commit the apps api just acts as a proxy to the external apps website based on plugin
settings, but in the future this endpoint will be able to match up data to tools installed in the
current context, cache data from the external website, return data to the external website,
and so forth.

Test Plan:
  - Before installing the plugin:
    * Visit /api/v1/accounts/:account_id/app_center/apps
    * You should get an empty json array
  - Enable the app center plugin
    * Visit /api/v1/accounts/:account_id/app_center/apps
    * You should get a json formatted array of app data

Change-Id: I48072053950e67aa583a3c79e2a582d30e7cd409
Reviewed-on: https://gerrit.instructure.com/20161
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-05-03 15:16:30 +00:00