Skip to content

Cherry-picks the shared-session SSO work from master onto 2025-01 - #4774

Draft
louispt1 wants to merge 8 commits into
2025-01from
2025-sso
Draft

Cherry-picks the shared-session SSO work from master onto 2025-01#4774
louispt1 wants to merge 8 commits into
2025-01from
2025-sso

Conversation

@louispt1

@louispt1 louispt1 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Context

It is necessary to apply some of the SSO changes on master to the stable version so that single login and logout works for the stable version as well as on latest.

Implemented changes

  • I verified the cherry-picked changes end to end with ETLauncher: I checked that the sign in sets the cookies, signs in everywhere (once) and signs out everywhere (once). The token refreshes correctly.

The auth context here now closely resembles master.

One additional change was required here: the Dockerfile now specifies libv8-node and mini_racer before bundle install as otherwise etlauncher could not build the image.

Related

etengine 2025-01 cherry pick
etmodel 2025-01 cherry pick
collections 2025-01 cherry pick

Checklist

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

@aaccensi aaccensi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a small gap for a file that has no counterpart on master and therefore cannot be fixed by the cherry-pick alone.

app/helpers/energy_mix_helper.rb:10 still calls identity_access_token, which no longer exists in identity_rails. layouts/energy_mix.html.haml:16 calls the helper unconditionally, so /scenarios/:id/energy_mix raises NoMethodError → 500 for signed-in users while guests take the nil branch and the page renders fine.

I beleive the fix is exactly the same one as in app/helpers/pages_helper.rb:59:

{ endpoint: url, token: session_access_token }

@louispt1

Copy link
Copy Markdown
Member Author

I think there is a small gap for a file that has no counterpart on master and therefore cannot be fixed by the cherry-pick alone.

app/helpers/energy_mix_helper.rb:10 still calls identity_access_token, which no longer exists in identity_rails. layouts/energy_mix.html.haml:16 calls the helper unconditionally, so /scenarios/:id/energy_mix raises NoMethodError → 500 for signed-in users while guests take the nil branch and the page renders fine.

I beleive the fix is exactly the same one as in app/helpers/pages_helper.rb:59:

{ endpoint: url, token: session_access_token }

Great catch! I just pushed the suggested fix 👍

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.

2 participants