-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
grpc: add websocket support #5509
Conversation
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
@thc202 have a look here |
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/ExtensionGrpcWebSocket.java
Outdated
Show resolved
Hide resolved
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/websocket/ExtensionGrpcWebSocket.java
Outdated
Show resolved
Hide resolved
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/websocket/ExtensionGrpcWebSocket.java
Outdated
Show resolved
Hide resolved
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/websocket/ExtensionGrpcWebSocket.java
Outdated
Show resolved
Hide resolved
The changelog should be updated and help as well. |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
addOns/grpc/src/main/javahelp/org/zaproxy/addon/grpc/resources/help/contents/websocket.html
Outdated
Show resolved
Hide resolved
addOns/grpc/src/main/javahelp/org/zaproxy/addon/grpc/resources/help/toc.xml
Outdated
Show resolved
Hide resolved
How or with which application was this tested? Using |
@thc202 |
I need to check suitable applications. |
@thc202 |
I don't think that all of them are using that workflow. |
The |
yes, its not using base64 encoding that's why i am getting earlier error but still the response of streamit in websocket is not decoding correctly i tried to decode this in other online available protobuf decoder also, i guess i need to look more into streamit code. |
We need to check how the serialization is being done in that case and update the code to handle that as well. |
how can i find implementation of this function , i tried some ways but don't find it in streamlit and python-grpc repo
|
i was confused about streamlit so i wrote a my custom app which uses websocket and protobuf serialization and what i found is we don't need to decode this message as base64 and this does not contain 5 byte header as with grpc-protocol buffer that's why we are getting error, my custom app is working great but still for streamlit message, some successfully decoded but some not,
|
That's depends on backend used https://github.com/protocolbuffers/protobuf/tree/main/python#implementation-backends We'll have to change |
ok are you suggesting to like pass a parameter like decodingMethod in constructor of HttpPanelGrpcView and then the dataChanged will look like this to handle base64 decoding but still need to figure out how to check if need to remove header or not
|
Yes, something like that but instead of a string use an enum (e.g. At some point we might need to make that an option of the view to allow the user to change that. |
…port Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
so after this check we are getting some response decoded properly and some not of streamlit Comment so , should i look more deeper for for streamlit now or is it good ? |
It would be better to look at it (we should add an entry to the issue if not finished now), but we could merge and get feedback from users. |
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/DecoderUtils.java
Outdated
Show resolved
Hide resolved
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/HttpPanelGrpcView.java
Outdated
Show resolved
Hide resolved
Note that comments from this #5509 (review) are still pending. |
addOns/grpc/src/main/java/org/zaproxy/addon/grpc/internal/HttpPanelGrpcView.java
Show resolved
Hide resolved
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
addOns/grpc/src/main/javahelp/org/zaproxy/addon/grpc/resources/help/contents/websocket.html
Outdated
Show resolved
Hide resolved
There's a conflict with the changelog. |
Signed-off-by: Amit Panwar <64302444+amitpanwar789@users.noreply.github.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: Amit Panwar <64302444+amitpanwar789@users.noreply.github.com>
Thank you! |
@amitpanwar789 ok to release a new version or you want to include more changes? |
Yes I guess we can as early feedback is really helpful |
Overview
Briefly describe the purpose, goals, and changes or improvements made in this pull request.
Related Issues
zaproxy/zaproxy#7695
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.