Skip to content

v0.3.11 compatibility: step.authz_check conflicts with built-in type #6

@intel352

Description

@intel352

Problem

Workflow engine v0.3.11 added a built-in step.authz_check step type (via the pipelinesteps plugin). When loading workflow-plugin-authz via engine.LoadPlugin(), the plugin loader rejects it because step.authz_check is already registered:

step type "step.authz_check" already registered

Context

The built-in step.authz_check in v0.3.11 uses a PolicyEngineModule interface, but the only implementation is a "mock" backend (the resolvePolicyEngine() function does a concrete type assertion to *PolicyEngineModule). The external plugin's Casbin-backed implementation is still needed for production use.

Workaround

We bypass engine.LoadPlugin() entirely and register the plugin's factories directly via engine.AddModuleType() / engine.AddStepType(), which silently overwrite the built-in types. See GoCodeAlone/workflow#262 for details.

Suggested Fix

The plugin could check whether its step types are already registered and either:

  1. Skip registration of conflicting types (if the built-in is sufficient)
  2. Use a different step type name (e.g., step.authz_check_casbin)
  3. Coordinate with the engine to allow overrides (pending Plugin loader: allow external plugins to override built-in step types workflow#262)

Related: GoCodeAlone/workflow#262 which is being addressed in GoCodeAlone/workflow#263 (primary changes are already complete in that PR)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions