We have successfully been using custom fields (is this what you mean by environmental variables?) from https://canvas.instructure.com/doc/api/file.tools_variable_substitutions.html with our LTI 1.3 tools in Canvas. Here's an example that references some of them.
{
"title": "Account Tools",
"scopes": [],
"extensions": [
{
"platform": "canvas.instructure.com",
"settings": {
"platform": "canvas.instructure.com",
"placements": [
{
"placement": "account_navigation",
"message_type": "LtiResourceLinkRequest",
"required_permissions": "read_reports"
}
]
},
"privacy_level": "anonymous"
}
],
"public_jwk": {},
"description": "Run reports on users, roles and subaccounts.",
"custom_fields": {
"canvas_account_id": "${Canvas.account.id}",
"canvas_account_name": "${Canvas.account.name}",
"canvas_api_base_url": "$Canvas.api.baseUrl",
"canvas_sis_account_id": "$Canvas.account.sisSourceId",
"canvas_root_account_id": "${Canvas.rootAccount.id}",
"canvas_user_prefers_high_contrast": "$Canvas.user.prefersHighContrast",
"com_instructure_brand_config_json_url": "$com.instructure.brandConfigJSON.url"
},
"public_jwk_url": "https://lti.canvas.ox.ac.uk/.well-known/jwks.json",
"target_link_uri": "https://static.canvas.ox.ac.uk/account-tools/",
"oidc_initiation_url": "https://lti.canvas.ox.ac.uk/lti/login_initiation/universityofoxford-at"
}