feat(ui-server): add forward of static headers from env#3093
feat(ui-server): add forward of static headers from env#3093wensiet wants to merge 1 commit intotemporalio:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the Temporal Team on Vercel. A member of the Team first needs to authorize it. |
73bcb30 to
784f8c3
Compare
|
@laurakwhit hi! can you take a look at it pls |
@wensiet can you provide a little more context as to why forwarding headers is not suitable for your use case? |
If we use forwarding we will need to expose token to ui end user (for example tech support) and somehow forward it (for example via browser extensions). However we already have authorization in UI via SSO, so it creates some amount of redundant actions, and does not allow us to seamlessly rotate token. |
Description & motivation 💭
This PR introduces static headers forwarding to gRPC temporal frontend.
Our scenario is:
x-service-auth=some-token-hereTo solve this issue, we introduce new env var: TEMPORAL_SERVER_STATIC_HEADERS. It is later converted to config field staticHeaders.
Format is: TEMPORAL_SERVER_STATIC_HEADERS="some-header=someval,another-header=someval"
Screenshots (if applicable) 📸
No ui components changed.
Design Considerations 🎨
No ui components changed.
Testing 🧪
Manually tested with temporal-frontend. Added unit tests to ensure logic is correct.
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Add staticHeaders to configs, example:
Or use ENV var TEMPORAL_SERVER_STATIC_HEADERS="authorization=some-tkn"
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?
Yes, UI startup docs.