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:
7 Replies
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 existhey @Ozzzkar what version of zitadel are you on and are you self hosted
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
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.
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
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...
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 🙂