Skip to content

Validate MyETM's scenario_access grant behind a flag - #1797

Draft
louispt1 wants to merge 1 commit into
masterfrom
scenario-access-grant
Draft

Validate MyETM's scenario_access grant behind a flag#1797
louispt1 wants to merge 1 commit into
masterfrom
scenario-access-grant

Conversation

@louispt1

@louispt1 louispt1 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Context

ETEngine determines scenario access based on scenario_users, which is somewhat duplicated between myetm and etengine. The purpose of these changes is to allow etengine to determine the access grant for scenarios (sessions) based on the identity token rather than the scenario users table.

The changes are 'off' by default, gated behind a settings flag. The purpose of that was to allow the change to be reversible and test turning it on/off.

Implemented changes

  • Api::ScenarioGrant.from_token builds a grant from the decoded identity token, or nil when the claim is absent or malformed.
  • Api::TokenAbility folds the grant into its existing rules
  • Settings.scenario_access_grants determines if the grant claim method is 'on' or 'off' (true/false)
  • Tests

I tested this in practice with ETLauncher and it worked well.

Related

This MyETM PR issues the access grant

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant