Skip to content

Use Client Credentials auth instead JWTBearer client credentials#279

Merged
akgarg06 merged 14 commits into
developfrom
SDMEXT-3019-feature
Jun 29, 2026
Merged

Use Client Credentials auth instead JWTBearer client credentials#279
akgarg06 merged 14 commits into
developfrom
SDMEXT-3019-feature

Conversation

@akgarg06

@akgarg06 akgarg06 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements SDMEXT-3019 — [NodeJs] Use Client Credentials auth instead JWTBearer client credentials

Type: FEATURE | Priority: Medium | Status: In Progress

Added the @SDM.useClientCredential: true annotation on attachment compositions. When set, the plugin reuses the existing technical-user / client-credentials path for that composition's CRUD operations so users without SDM roles can create, upload, rename, edit links, and update metadata. The plugin DB's createdBy / modifiedBy are aligned with the same clientid so the UI matches what DMS / DI shows.

Files Changed

lib/sdm.js                  | 238 ++++++++++++++++++++++++---
lib/util/index.js           |  45 ++++-
lib/util/messageConsts.js   |   1 +
test/lib/sdm.test.js        | 389 ++++++++++++++++++++++++++++++++++++++++++--
test/lib/util/index.test.js | 121 ++++++++++++++
5 files changed, 750 insertions(+), 44 deletions(-)

Quality Checks

Test Coverage

Metric Coverage Threshold Status
Lines 97.92% 90%
Branches 90.31% 75%

Coverage tool: jest --coverage (426/426 tests passed)

ESLint

Metric Value
Errors 0
Warnings 0
Status ✅ Passed

SonarQube Quality Gate: ⚠️ NOT RUN

Metric Value
Bugs
Vulnerabilities
Code Smells
Coverage
Duplications

⚠️ Sonar scan skipped — sonar.token not configured in pipeline config.

Checklist

  • Compiles without errors
  • All tests pass (426/426)
  • Line coverage ≥ 90% (97.92%)
  • Branch coverage ≥ 75% (90.31%)
  • SonarQube quality gate passed (skipped — no token)
  • ESLint — no errors
  • I have tested the functionality on my cloud environment
  • I have provided sufficient automated/unit tests for the code
  • I have increased or maintained the test coverage
  • I have ran integration tests on my cloud environment
  • I have validated blackduck portal for any vulnerability after my commit
  • Self-reviewed the diff

Single Tenant Integration : https://github.com/cap-js/sdm/actions/runs/28349070602/job/83978150167
Multitenant Integration : https://github.com/cap-js/sdm/actions/runs/28349540434/job/83979500888

@PujaDeshmukh17

Copy link
Copy Markdown
Contributor

Can you please add screenshots of the test performed/integration test logs.

Comment thread lib/sdm.js
Comment thread lib/sdm.js Outdated
Comment thread lib/util/index.js
Comment thread app/single-tenant/personal-space/incidents-app/srv/service.cds
@PujaDeshmukh17

Copy link
Copy Markdown
Contributor

There are few conflicts please resolve them.

PujaDeshmukh17
PujaDeshmukh17 previously approved these changes Jun 29, 2026
@akgarg06 akgarg06 merged commit dee5448 into develop Jun 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants