Ozzzkar
Ozzzkar•4w ago

Can't use pkg/grpc/user/v2 from Response manipulation example

Hi, I'm following your response manipulation example for Golang here: https://zitadel.com/docs/guides/integrate/actions/testing-response-manipulation In the top of the file there's an import for "github.com/zitadel/zitadel/pkg/grpc/user/v2" but when I run go get github.com/zitadel/zitadel/pkg/grpc/user/v2 I get this back:
go: module github.com/zitadel/zitadel@upgrade found (v1.87.5), but does not contain package github.com/zitadel/zitadel/pkg/grpc/user/v2
go: module github.com/zitadel/zitadel@upgrade found (v1.87.5), but does not contain package github.com/zitadel/zitadel/pkg/grpc/user/v2
7 Replies
Ozzzkar
OzzzkarOP•4w ago
I think I found the solution The file is here https://github.com/zitadel/zitadel-go/blob/main/pkg/client/user/v2/client.go So the documentation should be updated to import "github.com/zitadel/zitadel-go/v3/pkg/client/zitadel/user/v2" instead for signature checking, i couldn't find "github.com/zitadel/zitadel/pkg/actions" though and it seems that there is no "github.com/zitadel/zitadel-go/v3/pkg/client/zitadel/actions/v2" https://zitadel.com/docs/guides/integrate/actions/testing-request-signature Also tried "github.com/zitadel/zitadel-go/v3/pkg/client/zitadel/action/v2beta" but the ValidatePayload function doesn't exist
Rajat
Rajat•4w ago
hey @Ozzzkar what version of zitadel are you on and are you self hosted
Ozzzkar
OzzzkarOP•4w ago
4.0.1 self-hosted but this is about coding so the version of Zitadel doesn't matter. I'm trying to use Actions v2 and that's why I'm trying to follow that example
Rajat
Rajat•4w ago
hey @Ozzzkar I am a bit confused here, you said responses maniluation doesnt work which was here https://zitadel.com/docs/guides/integrate/actions/testing-response-manipulation but then you mention ValidatePayload from request signature, so I am a bit lost here. What doesnt work for you?. I just tested response manipulation and it doesnt sends me any respone when using an IDP , is that is what your core issue is?. Or is it other things too that you mentioned, sorry for the confusion but I cannot make a conclusion here, you raised valid points and I will update the doc(you can also raise a PR!) but tbh I did not understand if this thread if for request manipulation or response or any internal methods that are failing on the go code, because you mentioned lots of things 😅
ZITADEL Docs
This guide shows you how to leverage the ZITADEL actions feature to manipulate API responses in your ZITADEL instance.
Ozzzkar
OzzzkarOP•4w ago
I got the response manipulation to work and I can open a PR for that fix, it's just an example code /documentation issue But I couldn't get your example code for signature verification to work I'm trying to write a handler for actions V2 that I will then configure Zitadel to use A "target" But the problem seems to be that the Go package I need isn't exposed correctly. I thought that was the same case with the response manipulation but it turns out that it was just the documentation that wasn't updated. But for the signature verification I'm not sure, because I can't find the method that is referenced in your example I think I need to use this one: https://github.com/zitadel/zitadel/blob/main/pkg/actions/signing.go But it's not exposed publicly in the right way, as far as I understand. I think this should also be copied over to the zitadel-go repository
Ozzzkar
OzzzkarOP•4w ago
I opened an issue for this, I may open a PR too https://github.com/zitadel/zitadel/issues/10502
GitHub
Incorrect imports in Golang examples for response manipulation and ...
Preflight Checklist I could not find a solution in the existing issues, docs, nor discussions I have joined the ZITADEL chat Describe the docs your are missing or that are wrong I was following the...
Rajat
Rajat•4w ago
hey @Ozzzkar yes you were right, I lost your message in tons of other threads but I did tested it and you are correct, please open a PR, looking forward to it 🙂

Did you find this page helpful?