adobe / helix-sidekick-extension

Browser extension for authors on AEM projects
Apache License 2.0
21 stars 36 forks source link

feat: support helix 5 authorization header in project config #738

Closed dylandepass closed 3 months ago

dylandepass commented 3 months ago

Allow the options page to define an authorization header for project-specific top-level browser requests. Required for sites with authentication enabled in helix 5.

Fixes #737

dylandepass commented 3 months ago

@rofe Since I made a change to en/messages.json is there something I need to do to get the rest translated? What's the process there?

rofe commented 3 months ago

@rofe Since I made a change to en/messages.json is there something I need to do to get the rest translated? What's the process there?

New or updated strings will be detected automatically after merging to main, and a new PR will be created for the translations a few days later. If you want to release them simultaneously, you can DM the localization team.

dylandepass commented 3 months ago

Oops, I just noticed that when opening a new tab with the same URL (e.g. by clicking a link), you get a 401 again. Likely root causes:

  • you don't call updateProjectAuthHeaderRules() in the background script to (re)define rules based on existing tokens (we do it for updateAdminAuthHeaderRules())
  • updateSessionRules may not be the right choice for such long-lived tokens. Maybe updateDynamicRules is the better choice here.

@rofe Thanks for catching that. Once I added it to the background script things worked as expected. After looking into updateDynamicRules I agree that seems like maybe the better options since the the persistence across tabs and windows is greater. I think since we are executing updateProjectAuthHeaderRules anyway in the background script it's not an issue but just in case there is some edge case I went with updateDynamicRules.

trieloff commented 3 months ago

:tada: This PR is included in version 6.45.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: