The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
We have a temporary solution for updating LTI 1.3 tools on beta and test, until Instructure comes up with a solution.
I'm QA, not a developer, so this is really simple code using ruby, watir and a csv file, but it does the job.
I have a class which contains the login information, browser info, and the base urls. I have a csv file for each server, (beta and test), which contains the data we need for each tool to update, and because we have tools in different nodes, it also has the account id which needs to be in the URL when accessing the developer keys.
require_relative 'connect'
require 'csv'
server = 'beta'
# class with the browser/login information
c = Connection.new(server)
browser = c.browser
#file containing values that need to be updated
use_file = 'update_files/beta_updates.csv'
# Canvas login code goes here
# After successful login, this starts the key updates
CSV.foreach(use_file, headers:true) do |row|
account = row['account']
key_edit = row['key_edit']
key_name = row['key_name']
redirect_uris = row['redirect_uris']
target_link_uri = row['target_link_uri']
oidc_initiation_url = row['oidc_initiation_url']
public_jwk_url = row['public_jwk_url']
domain = row['domain']
dev_keys_url = "#{c.dev_keys_base}#{account}/developer_keys"
# dev keys
browser.goto dev_keys_url
browser.button(value: "#{key_edit}").scroll.to
browser.button(value: "#{key_edit}").click
#on dev key page - make sure key name matches
if browser.text_field(name: 'developer_key[name]').value == "#{key_name}"
#Redirect URIs
browser.textarea(name: 'developer_key[redirect_uris]').set "#{redirect_uris}"
#Target Link URI
browser.text_field(name: 'target_link_uri').set "#{target_link_uri}"
#OpenID Connect Initiation Url
browser.text_field(name: 'oidc_initiation_url').set "#{oidc_initiation_url}"
#Public JWK URL
browser.text_field(name: 'public_jwk_url').set "#{public_jwk_url}"
#Additional Settings
browser.button(visible_text: 'Additional Settings').click
sleep 1
#Domain
browser.text_field(name: 'domain').set "#{domain}"
#Close the Canvas warning banner
browser.button(class: "element_toggler Button--icon-action").click
#Save
browser.button(visible_text: 'Save').click
sleep 1
end
end
Please add your vote to the following ideas:
It looks like LTI 1.3 tools will soon get a `canvas_environment` parameter passed on the first part of the LTI launch and this will be different for prod/beta/test. It's not released to Instructure hosted instances, but the code is there:
https://github.com/instructure/canvas-lms/commit/b28b5bf4d4afa47cf2beb1e3814c428eb4b1fa52
Thank you @matthew_buckett !
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in