Skip to content

Validate catalog service credentials before saving to prevent silent failures & misleading errors #12232

Description

@mahmoudadel54

Description

When an admin user adds an authenticated service to the catalog for the first time, invalid credentials are accepted and silently saved without validation. This creates a broken service state that non-admin users cannot fix, since edit permissions are restricted to admins only.

This improvement introduces real-time credential validation via a WMS GetCapabilities request before credentials are stored or saved, preventing silent failures, misleading error messages, and administrative lockouts.

How to reproduce

  • Login as an admin user
  • Add an authenticated service to the catalog (or edit an existing one with no credentials)
  • Enter incorrect credentials in the credentials modal dialog
  • Click "Confirm" (without clicking "Save")
  • Close the modal
  • Observe: Invalid credentials are stored despite failing validation

Case 2:

  • Login as a non-admin user and attempt open an authenticated service from catalog
  • Enter incorrect credentials in the credentials modal dialog
  • Try to edit the service as non-admin → edit button is disabled (cannot recover from invalid state)
  • No error message appears indicating why the service is not working
    In both cases, if the creds are not correct no massage appears -> as no validation applies

Expected Result

No error message is displayed to indicate that credentials are invalid

Current Result

Credentials are validated immediately when the user clicks "Confirm" in the modal dialog

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

Metadata

Metadata

Fields

No fields configured for Enhancement.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions