mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:17:32 +00:00

# Which Problems Are Solved
Actions v2 is not a feature flag anymore, include functionality on
executions is not used and json tags of proto messages are handled
incorrectly.
# How the Problems Are Solved
- Remove actions from the feature flags on system and instance level
- Remove include type on executions, only in the API, later maybe in the
handling logic as well
- Use protojson in request and response handling of actions v2
# Additional Changes
- Correct integration tests for request and response handling
- Use json.RawMessage for events, so that the event payload is not
base64 encoded
- Added separate context for async webhook calls, that executions are
not cancelled when called async
# Additional Context
Related to #9759
Closes #9710
---------
Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit b8ba7bd5ba
)
65 lines
1.7 KiB
Go
65 lines
1.7 KiB
Go
package action
|
|
|
|
import (
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/zitadel/zitadel/internal/api/authz"
|
|
"github.com/zitadel/zitadel/internal/api/grpc/server"
|
|
"github.com/zitadel/zitadel/internal/command"
|
|
"github.com/zitadel/zitadel/internal/config/systemdefaults"
|
|
"github.com/zitadel/zitadel/internal/query"
|
|
action "github.com/zitadel/zitadel/pkg/grpc/action/v2beta"
|
|
)
|
|
|
|
var _ action.ActionServiceServer = (*Server)(nil)
|
|
|
|
type Server struct {
|
|
action.UnimplementedActionServiceServer
|
|
systemDefaults systemdefaults.SystemDefaults
|
|
command *command.Commands
|
|
query *query.Queries
|
|
ListActionFunctions func() []string
|
|
ListGRPCMethods func() []string
|
|
ListGRPCServices func() []string
|
|
}
|
|
|
|
type Config struct{}
|
|
|
|
func CreateServer(
|
|
systemDefaults systemdefaults.SystemDefaults,
|
|
command *command.Commands,
|
|
query *query.Queries,
|
|
listActionFunctions func() []string,
|
|
listGRPCMethods func() []string,
|
|
listGRPCServices func() []string,
|
|
) *Server {
|
|
return &Server{
|
|
systemDefaults: systemDefaults,
|
|
command: command,
|
|
query: query,
|
|
ListActionFunctions: listActionFunctions,
|
|
ListGRPCMethods: listGRPCMethods,
|
|
ListGRPCServices: listGRPCServices,
|
|
}
|
|
}
|
|
|
|
func (s *Server) RegisterServer(grpcServer *grpc.Server) {
|
|
action.RegisterActionServiceServer(grpcServer, s)
|
|
}
|
|
|
|
func (s *Server) AppName() string {
|
|
return action.ActionService_ServiceDesc.ServiceName
|
|
}
|
|
|
|
func (s *Server) MethodPrefix() string {
|
|
return action.ActionService_ServiceDesc.ServiceName
|
|
}
|
|
|
|
func (s *Server) AuthMethods() authz.MethodMapping {
|
|
return action.ActionService_AuthMethods
|
|
}
|
|
|
|
func (s *Server) RegisterGateway() server.RegisterGatewayFunc {
|
|
return action.RegisterActionServiceHandler
|
|
}
|