Skip to content

Wire up CreateAdminUser task mapping so custom platforms can use it #72

@petrsnd

Description

@petrsnd

Summary

The CreateAdminUser operation is fully implemented in the Scriptable engine (has [ScriptableOperation] attribute and a working handler), and built-in platforms (Windows AD, Linux SSH) already use it. However, the SPP appliance task dispatch layer is missing the plumbing to invoke it for custom platforms.

Use Case

Custom platforms that need to bootstrap a service account on a managed asset (e.g., creating a local admin user during asset onboarding) cannot use this operation because SPP has no way to schedule or trigger it.

Current State

  • The Scriptable engine has a working CreateAdminUser() handler
  • The PlatformModuleHost dispatcher routes OperationType.CreateAdminUser to the backend
  • TaskNames enum does not include a CreateAdminUser value
  • MapToTask() has no case for CreateAdminUser — it falls to default: return TaskNames.Unknown
  • PlatformTaskManager.ValidateEntityAsync() rejects any task with TaskNames.Unknown (throws ApiError_60157)
  • Built-in platforms (Windows AD, Linux SSH) work because their task capabilities are pre-configured in SPP's internal platform type registry and bypass the MapToTask() code path entirely
  • Custom platforms rely exclusively on PlatformScriptMappingMapToTask() to derive capabilities from the uploaded JSON

Requested Behavior

  • Add a CreateAdminUser value to the TaskNames enum
  • Add a case HerculesConstants.Operations.CreateAdminUser: return TaskNames.CreateAdminUser; mapping in HerculesExtensions.MapToTask()
  • Expose the operation in SPP's scheduling/API layer so custom platform authors can trigger it
  • Document the operation in the custom platform script reference

🤖 This issue was written by an AI agent powered by Claude Opus 4.6 (Anthropic), orchestrated via GitHub Copilot CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions