Skip to content

Use Client Credentials auth instead JWTBearer client credentials#279

Open
akgarg06 wants to merge 6 commits into
developfrom
SDMEXT-3019-feature
Open

Use Client Credentials auth instead JWTBearer client credentials#279
akgarg06 wants to merge 6 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

@PujaDeshmukh17

Copy link
Copy Markdown
Contributor

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

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.

2 participants