-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Add connection Info of client to SubscribeRequest when proxying to proxy_subscribe_endpoint #457
Comments
@longlonghands hello, thanks for kind words :) I think it's reasonable to have, can be done in 2 steps:
I am currently concentrated on Centrifugo v3, would like to avoid adding new features to v2 branch, especially like this one where adding Info to Centrifuge library will require additional backporting work. What do you think if we plan this for v3? |
oh, V3! that's exciting. I like it. actually, I have a suggestion for version 3 too. which is not just a simple feature. I appreciate it if you hear it out. idea: "proxy to backend" gives us some extensibility functionalities to Centrifugo. but it has a conflict with auth/access functionality. for example right now if you enable token authentication or channels accessibilities you can not use proxy calls. I believe if we add an option to select auth/access method ('jwt' or 'proxy') we can use both jwt auth/access check and proxy calls for extensibility. I will move this idea to the related issue (v3), later. |
@longlonghands hello, I decided to go a bit different way. In Centrifugo v3 it's possible to attach See As soon as you attached Hope this will do the job for you. Do you have a chance to try it out? |
Closing since no response from op. This is possible to do with Centrifugo v3 in a way described above. |
Hi Alexander, Love the work you are doing on this awesome project. I wanted to ask about this feature because I think it helps users to have more flexibility in their logic when using this awesome project. Thanks for all of your great work on this.
I can code this feature and send you the PR.
Is your feature request related to a problem? Please describe.
sometimes, granting access to a channel depends on the information of the user on connection authentication (conn_info or connection info). but the SubscribeRequest doesn't have the conn info of the client in its fields. so the channel authenticator service has to ask the connection authenticator for more info about the 'client' and 'user' of that SubscribeRequest which is already given by the connection proxy mechanism and is defined in Client.info.
Describe the solution you'd like.
for this feature, we have to expose the Client.info and then add it to SubscribeRequest and change here to include the connection info of the client:
centrifugo/internal/proxy/subscribe_handler.go
Line 46 in e37c2e5
The text was updated successfully, but these errors were encountered: