Skip to content

NPE in ServiceEntityResource.unmask when PUT service request has no connection field #29494

Closed

Description

@ivnvMkhl

Describe the bug

PUT /api/v1/services/databaseServices (and other service types) throws a NullPointerException when the request body has no connection field:

Cannot invoke "ServiceConnectionEntityInterface.getConfig()" because
the return value of "ServiceEntityInterface.getConnection()" is null

Root cause

ServiceEntityResource.unmask() checks originalService.getConnection() != null (the existing DB record) but does not check service.getConnection() != null (the incoming request) before calling service.getConnection().getConfig().

Steps to reproduce

  1. Create a database service without a connection field:
    PUT /api/v1/services/databaseServices
    {"name": "my-service", "serviceType": "Hive"}
    
  2. Call the same endpoint again (update) with the same body — server returns 400 with the NPE message

Expected behavior

PUT with no connection field is treated as an idempotent upsert — the existing connection is preserved and no error is thrown.

Version

1.13.0

Activity

  1. added a commit that references this issue on Jul 20, 2026
    9bf3259
  2. added theissue type on Aug 26, 2026
  3. added this to Shipping and removed this from Roadmapon Aug 26, 2026
  4. moved this to In Review / QA 👀 in Shippingon Aug 26, 2026
  5. added
    bug
    on Aug 26, 2026
  6. added
    area:secrets
    on Oct 22, 2026
  7. added a commit that references this issue on Nov 9, 2026
    e41bc22
  8. moved this from In Review / QA 👀 to Done ✅ in Shippingon Nov 9, 2026
  9. added a commit that references this issue on Nov 11, 2026
    05ea59f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:secretsbackendbug

Type

Projects

  • Status
    Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions