Previously the jwk set_keys was not pointing to any
data_center when it makes the call to set the keys.
This now will grab the configuration from consul of
the dc and set it as the data_center to put to.
ref PLAT-3361
Test Plan:
n/a
Change-Id: I70e3cfb52ba557543ad203c516739a18cae17c26
Reviewed-on: https://gerrit.instructure.com/159839
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
Closes PLAT-3633, PLAT-3634
Test Plan:
- Do an LTI 1.3 launch in Canvas and verify the id token is
signed with the current canvas secret key.
- Verify the following claims are included and correct:
* exp
* iat
* iss
* nonce
* sub
Change-Id: I57699ac42bbe98a9fa03f82f3f9b9a16c6923011
Reviewed-on: https://gerrit.instructure.com/159855
Tested-by: Jenkins
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
Added lti JWK config for local development purposes using
LTI 1.3. Works with local and docker development.
closes: PLAT-3505
Test Plan:
n/a
Change-Id: Ib45f33d11027c608d6eb2397d29af6ef1878b2a7
Reviewed-on: https://gerrit.instructure.com/154194
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
Change-Id: I2e5c1be87cb3e88a203379127891ed4b6782fc26
Reviewed-on: https://gerrit.instructure.com/145756
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
QA-Review: Marc Alan Phillips <mphillips@instructure.com>
closes MBL-9792
test plan:
- make a request to /api/v1/users/:id/pandata_token
with param 'app_key' of value 'IOS_pandata_key'
- make the same call with a value of 'ANDROID_pandata_key'
- both should return a 200 code
and a json object with a 'token' and a 'expires_at'
Change-Id: If993ad3c49b89a61ef8caa91d5f347250998070b
Reviewed-on: https://gerrit.instructure.com/144535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
If you are getting errors about “The engine "node" is incompatible with
this module. Expected version ">=8.9.4”.” after applying this change,
It means you need upgrade your node to 8.9.4. to do so:
if you use nvm: `nvm install` inside the canvas dir
If you use brew: `brew upgrade node`
If you use apt-get: see https://github.com/nodesource/distributions
If you use docker: rebuild your docker container
Closes: CORE-704
Test plan:
* js tests should pass
* webpack and brandable_css should generate the exact same
CSS and JS output as before.
* all of our build tooling, including docker stuff, should continue
to work and use Node 8.
If you know of something else that needs to be updated to use node 8
everywhere, let me know
Change-Id: Ic019710c219d8b8c627ce03e0dffde731cfa2856
Reviewed-on: https://gerrit.instructure.com/136802
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Probably broken by the release of PG 10, but it could be something else.
test plan:
- Check out the commit
- Try `dc build --no-cache postgres`
- It should successfully build
Closes gh-1136
Change-Id: I78772a60cbf85ba1fa93957ecb6651e8f1b60068
Reviewed-on: https://gerrit.instructure.com/129878
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Tested-by: Jenkins
Fixes: CNVS-39293
Since we eliminated the pre-population functionality from our Consul
wrapper we needed something to conveniently populate the KV store.
Test Plan:
- Start a Consul server
- Run `bin/rake canvas:seed_consul`
- Verify that values were written to the KV store.
Change-Id: I340011b7d00ed4e3dd2918e3f101f6377fc72d7e
Reviewed-on: https://gerrit.instructure.com/126574
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
fixes: GRADE-243
Allow cassandra's data to persist after using `docker-compose down
cassandra` where before this command would effectively wipe your database
This is in line with how the pg_data volumes work.
test plan:
- setup cassandra
- create a keyspace
- run `docker-compose down && docker-compose up -d` (-d for daemon)
- the previously create keyspace still exists
Change-Id: Ib58bec022eda79ad45352419e4fd33b07af7cf21
Reviewed-on: https://gerrit.instructure.com/124278
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Matt Taylor <mtaylor@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Test plan: docker-compose run --rm karma yarn test
Change-Id: I316d80e7a1b712b0dda91a390c4dddeb09b3e6fb
Reviewed-on: https://gerrit.instructure.com/122776
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Fixes: CNVS-35833
There is a lot more than just moving to Consul going on here. The whole
PrefixProxy business wouldn't be required for this change, but it will
be really useful as we move to adding cluster awareness.
Test Plan:
- Have MathMan running
- Update config/consul.yml to enable use_for_svg and
use_for_mml under the math-man init values key
- Start Canvas
- Build an equation with the rich content editor
- The equation should be rendered as usual.
Change-Id: I650527ebaecb6224c6ee6ba26346d27dee33b9d7
Reviewed-on: https://gerrit.instructure.com/111543
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
bring the development docker image down from 3.6GB -> 2.4GB
add a production docker image that weighs in at 1.2GB, which should speed
up end-to-end tests
template-ize web Dockerfiles so that common stuff stays consistent, volume
dirs are set up properly, etc.
test plan:
1. docker-based builds should pass
2. docker image should be usable (docker-compose up, etc)
Change-Id: I41ebb155090f66e346bdc285ca5c613ee5793127
Reviewed-on: https://gerrit.instructure.com/112859
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Fixes: CNVS-35832
Refs: CNVS-32864
This was super simple because of the change to using a hash for
configuring LiveEvents instead of a PluginSetting object
Change-Id: Ia34cb905e22a21c822f48b581e3e3cd4f7a738d3
Reviewed-on: https://gerrit.instructure.com/110193
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Also, make Consul container accessible from the host.
Fixes: CNVS-35831
Refs: CNVS-34341, CNVS-32864
Test Plan:
- Smoke test RCS and Canvas running together to make sure they still
play nice.
Change-Id: I418d54a176677b1df8ec42a009752807908a847c
Reviewed-on: https://gerrit.instructure.com/99443
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
fixes CNVS-35005
Test Plan
1. run: docker-compose build
2. run: docker-compose run --rm web bundle exec rake db:migrate:redo VERSION=20120502190901
3. Visit: /accounts/1/users
4. Create users with the names: Jalapeno, Jalapeoo, Jalapeño, JalapeЖo
5. Refresh the page and verify they are sorted:
Jalapeno, Jalapeño, Jalapeoo, JalapeЖo
6. Create an assignment
7. Give each of the students created above a grade
8. Visit: /courses/1/gradebook/history
9. Click on the assignment name to display the hidden table.
10. Verify the table of students / grades is sorted:
Jalapeno, Jalapeño, Jalapeoo, JalapeЖo
Change-Id: I9743c559a20a3d50600bcbc7e4a310105ec638cf
Reviewed-on: https://gerrit.instructure.com/102465
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes PLAT-2080 PLAT-2059 PLAT-2061
Test plan:
* Set up canvas
* To be able to talk to http://les.docker
* To use an encryption key and signing secret that are 32 bytes long
* Set up live events subscription service
* To use the same signing secret you used in canvas and a base64
encoded version of the encryption key you used in canvas
* Run docker-compose run --rm app npm run seed:dynamo and give it the
developer key you want to use for testing
* With the subscription service running open up a rails console in Canvas
and run the following:
ToolProxy = Struct.new("ToolProxy", :guid, :product_family)
Family = Struct.new("Family", :developer_key)
f = Family.new(<a developer key>)
tp = ToolProxy.new('hahahah', f)
res = Services::LiveEventsSubscriptionService.tool_proxy_subscriptions(tp)
* Ensure that you get a response back with the subscriptions for your
developer key
* Go through this process first with dynamic settings enabled and then
with consul enabled
Change-Id: I454d5a82d98ce1edb2bd9afd23cb974dc062e04f
Reviewed-on: https://gerrit.instructure.com/100072
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
This only applies for local development
An OPS ticket will need to be made for configuring production/beta
fixes PLAT-2079 PLAT-2064
Test plan:
* Run the following command
cp config/dynamic_settings.yml.example config/dynamic_settings.yml
* Open up a rails console and run
Canvas::DynamicSettings.from_cache('live-events-subscription-service', expires_in: 5.minutes)
* Ensure that a settings hash is returned with the url for a local,
dockerized subscription service
* Remove the config/dynamic_settings.yml
* Add config/consul.yml either by copying config/consul.yml.example or
docker-compose/config/consul.yml.example
* Configure docker compose to use consul
* Open up a rails console and run
Canvas::DynamicSettings.from_cache('live-events-subscription-service', expires_in: 5.minutes)
* Ensure that a settings hash is returned with the url for a local,
dockerized subscription service
Change-Id: I495cc73d914cbefd409fed5ec7ad6cebd0f8c200
Reviewed-on: https://gerrit.instructure.com/99797
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
The lti_test_tool_common file is no longer needed as the
selenium test automation work is going to happen in a
separate repo to keep from polluting canvas with external
micro-services.
test plan:
tests should still pass
Change-Id: If657c8ba98bfb54e5ab57faf3b1c016edf908d6a
Reviewed-on: https://gerrit.instructure.com/96765
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Docker entrypoints can't be executed unless they are set as executable.
Also fixes a few other discrepancies:
- adds common docker-compose.local.*.yml to .dockerignore
- updates docs for enabling phantomjs-tests container
- mount common volumes for js-tests and phantomjs-tests containers
Test Plan:
1. Enable phantomjs-tests and js-tests docker containers.
2. docker-compose build --pull
3. Ensure phantomjs-tests and js-tests containers work.
Change-Id: I1ab20575f9936b6cfc2c61501441b1137c9df4cb
Reviewed-on: https://gerrit.instructure.com/95690
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
If you have a docker-compose.override file you'll want to
move it somewhere else.
mv docker-compose.override.yml docker-compose.`whoami`.yml
Once you've updated your override file to the version 2 syntax, you
should add it to the COMPOSE_FILE environment variable. Probably in a
.env file in the project root.
Test plan:
You'll need to remove your existing canvas containers and volumes to
fully test this.
to do so run this **BEFORE** you checkout this patchset
```
docker-compose down
docker-compose ps -q | docker rm
docker volume ls -q | grep canvaslms | xargs docker volume rm
```
then you should be able to get up and running using the following
```
cp docker-compose/config/* config/
dc build
dcr web bundle exec rake db:create db:initial_setup
dc up
```
You should be able to access canvas like normal
Change-Id: Ia7ff76cfdd4f46278fc1cb2a03969fdadaa4a434
Reviewed-on: https://gerrit.instructure.com/91008
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
this changes the name of the canvas gem volume, so you'll need to run:
docker-compose run --rm web bundle install
after applying this change. you may also want to run:
docker volume rm canvas-gems
to delete the old gem volume, which will no longer be used.
closes CNVS-33086
test plan:
- docker-compose run --rm web bundle install
- docker-compose up
- things should work
Change-Id: Iace97ca723c9e56a5d252a2a5f447f3196487d0a
Reviewed-on: https://gerrit.instructure.com/94311
Tested-by: Jenkins
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes CNVS-33090
test plan:
- start with a fresh dinghy and fresh canvas-lms repo
- follow Canvas Docker Installation Guide in the wiki
- after canvas-compose up , login to your account on your local setup
- navigate to Admin > ACCOUNT > Settings > Feature Options and turn on
"User Remote Version of Rich Content Editor..." options
- navigate to Dashboard , then navigate back to Admin > ACCOUNT > Settings
- rejoice that you do not get the "key length too short" CipherError
Change-Id: Ia4503fcfcafed00aab5616428d86fb41955d7ab3
Reviewed-on: https://gerrit.instructure.com/94383
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
test plan:
- rebuild a docker container based on the canvas Dockerfile from scratch
- it should work
Change-Id: I096d33a73a5d2679a4e6d3c64ba2264d8274ed1d
Reviewed-on: https://gerrit.instructure.com/94024
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Alex Ortiz-Rosado <aortiz@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
Fixes CNVS-31618
Test plan:
1. copy the updated config/consul.yml into your config directory
2. make sure api specs pass in docker
(eg docker-compose run --rm web rspec spec/apis/v1/grading_periods_api_spec.rb)
Change-Id: Ib80c01d2770c216aa846362e3ea2efbfde5f5e63
Reviewed-on: https://gerrit.instructure.com/89692
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
closes: CNVS-29725
this gets everything working on node 6.
As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.
But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta
as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)
if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
elif [[ $(nvm version) != $(nvm version default) ]]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
but however you do it, as long as you have node 6.2
installed it should work
test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work
Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This is required by the QTI import tool.
Change-Id: I2092ef99f86b05d29856ed19e1f0c703406c999e
Reviewed-on: https://gerrit.instructure.com/85542
Tested-by: Jenkins
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
When the gem volume gets created on linux, it gets created with root
permissions. This causes issues on linux because the docker user (id
9999) cannot write to it when it installs gems.
By creating the directory that the volume gets mounted to in the
Dockerfile, the volume will assume the same permissions/ownership and
thus will get ownership on the host system as user 9999
Change-Id: I61a04c38dd7f4f6f526746a0d3ddab2a15549f1c
Reviewed-on: https://gerrit.instructure.com/84432
Tested-by: Jenkins
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
Changes:
- Uses standalone selenium node (meant for use without hub).
- Selenium node upgraded from 2.45.0 to 2.53.0.
- Upgrades Firefox from 34.0 to 45.0 (uses upstream version now).
- Clarify docker docs for running selenium specs a bit.
- Enable use of selenium container on checkout without changes.
- No longer requires link in web container.
- Requires dinghy/dory though for proxy, but it already did.
- Fixes /tmp/.X99-lock issue on container re-use.
Change-Id: I31793103e62022dea227b181a738383788660f6d
Reviewed-on: https://gerrit.instructure.com/83193
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
because we control what version of bundler is installed, we uninstall
the version provided by the base image and install the version we
expect to be there. however, if the base image installs bundler to a
system gem directory, an extra option must be provided to the
uninstall command. this is an issue as we are attempting to have the
base image install bundler system-wide.
Change-Id: I0b21e557315ed4ce7382efe3d740b602b016054d
Reviewed-on: https://gerrit.instructure.com/75328
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
QA-Review: Mark Severson <markse@instructure.com>
fixes CNVS-9516
For account level roles that don't have the manage permission, you
should not be able to change the weight etc via the cog menu on the
assignments page. This commit ensures only users that have the manage
permission can see the cog.
Test Plan
Setting Up a User -----
1. Create a new account role (something like TestAdmin)
2. Set permissions on that role to manage and view assignments but NOT
manage a course
3. Create a new user from the admin section with that role
4. Become that user to test this
------
Given you are an account level user with the mangage_courses permission
set to true
When you go to the assignments page
Then you should see a cog menu with the weight form in it
Given you are an account level user with the mangage_courses permission
set to false
When you go to the assignments page
Then you should NOT see an admin cog menu with the weight form in it
Change-Id: I64179f247e83647b11f7f1d34358d9d31023f2e8
Reviewed-on: https://gerrit.instructure.com/72919
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Product-Review: Sterling Cobb <sterling@instructure.com>