Skip to content

SOC AI guide renders a broken form when there is no previous configuration #2132

@AlexSanchez-bit

Description

@AlexSanchez-bit

Acknowledgements

Describe the bug

When the SOC AI module has no prior configuration in the database, the
backend returns an empty / partial key set and the frontend guide tries to
bind form controls to undefined values. The guide either fails to render
or rejects every field with validation errors, preventing the user from
configuring the module for the first time.

Additionally, when the backend returns a masked value (*****) for a
previously stored secret, the frontend overwrites the real value with the
mask on the next save, corrupting the stored secret.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

  • If the backend returns no / partial config, the frontend should populate
    missing keys with their factory defaults so the form is immediately
    editable.
  • Masked values returned by the backend should be preserved (not re-sent) so
    the previously stored secret remains intact on save.

Current Behavior

  • Opening the SOC AI guide with no prior config shows an empty / broken
    form with validation errors on every required field.
  • Saving a config that contains masked values overwrites the real secret in
    the DB with the mask sentinel.

Reproduction Steps

  1. Freshly enable the SOC AI module so the DB record is empty (or wipe the
    existing keys).
  2. Open the SOC AI configuration guide — the form fails to render or shows
    all-required validation errors.
  3. Configure a secret (e.g. an API key), save, re-open, then save again
    without changing the masked value — the backend now stores the mask
    sentinel instead of the original secret.

Possible Solution

No response

Additional Information/Context

No response

UTMStack Version

11.2.8

Operating System and version

Hypervisor and Version | Server Vendor and Model

Browser and version

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions