-
-
Notifications
You must be signed in to change notification settings - Fork 829
Redirect starter links to the desired integration manager #1342
Conversation
When not using Scalar for the integrations manager, the scalar_token in Riot may not be valid for scalar.vector.im, leading to authentication problems. Starter links should instead point to the desired integrations manager where the token is more likely to be valid. Signed-off-by: Travis Ralston <travpc@gmail.com>
83d4f79
to
909b293
Compare
@lukebarnard1, @rxl881, any thoughts on how this should actually be done? Given we have multiple scalar deployments flying around the place, special-casing the one at scalar.vector.im/api in the riot-web codebase doesn't smell right... |
It might be better to define a spec for basic integration server operations. Such as the |
I think the starter link URL in the starter link events should only include the path (i.e. one route for all starter links) but the domain should be the configured integration manager. |
Unless an explicit URL is given, then we'll just use that. Signed-off-by: Travis Ralston <travpc@gmail.com>
@ara4n @lukebarnard1 @rxl881 I've updated this to implement @lukebarnard1's suggestion. go-neb would need updates to ensure it's not spamming out absolute URLs, which this PR will still accept at risk of the scalar_token not being applicable to that URL (ie: Dimension tokens not working on scalar.riot.im). However, there's still the problem where third party integration managers can't communicate with go-neb instances hosted elsewhere, like on matrix.org. As far as I can tell, the |
@ara4n @lukebarnard1 @rxl881 prod? |
@turt2live, @dbkr -- Sorry for sitting on this one for a while. This is still very much on my radar, but I've not had a chance to look in to all the potential impacts and work needed for scalar and goneb yet. I'm hoping to get to this next week and will update asap. |
@rxl881 any news? |
Closing this while I think about how this should work. |
When Scalar is not the integrations manager for Riot, the
scalar_token
is unlikely to be valid for scalar.vector.im. This can lead to authentication problems, particularly with setting up the Github bot.Instead, Riot should redirect the starter link to the chosen integrations manager. This means the integrations manager is responsible for maintaining the route, much like with the register route.
This change only changes the link if it starts with the REST API route for Scalar. This is to ensure that starter links not using an integrations manager can still function, if they exist in the wild.