Skip to content

[CSM Integration Service] Change directory - #1207

Merged
cloby99 merged 2 commits into
wso2-open-operations:mainfrom
Rashmika998:main
Jul 22, 2026
Merged

cloby99 merged 2 commits into
wso2-open-operations:mainfrom
Rashmika998:main

Conversation

@Rashmika998

@Rashmika998 Rashmika998 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added the CSM Integration Service with account, project, contact search, lookup, and health-check endpoints.
    • Added OAuth2-secured connections to entity services, with optional end-user token forwarding.
    • Added correlation ID propagation and standardized JSON error responses.
    • Added security headers, request logging, input validation, and request-size limits.
    • Added API documentation, configuration templates, local setup guidance, and build/test commands.
  • Documentation

    • Updated repository documentation to reference the integration’s new location.
  • Tests

    • Added comprehensive coverage for endpoints, authentication forwarding, middleware, validation, error handling, and correlation IDs.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 74a6930b-bea9-4be9-a613-8cc2eda1f68b

📥 Commits

Reviewing files that changed from the base of the PR and between 02d10e2 and 6c54b3e.

⛔ Files ignored due to path filters (1)
  • integrations/csm-integration-service/go.sum is excluded by !**/*.sum
📒 Files selected for processing (29)
  • .github/workflows/auto-label-assign.yml
  • README.md
  • integrations/csm-integration-service/.choreo/component.yaml
  • integrations/csm-integration-service/.env.example
  • integrations/csm-integration-service/.gitignore
  • integrations/csm-integration-service/CLAUDE.md
  • integrations/csm-integration-service/Makefile
  • integrations/csm-integration-service/README.md
  • integrations/csm-integration-service/cmd/server/main.go
  • integrations/csm-integration-service/go.mod
  • integrations/csm-integration-service/internal/apierror/apierror.go
  • integrations/csm-integration-service/internal/entity/client.go
  • integrations/csm-integration-service/internal/entity/client_test.go
  • integrations/csm-integration-service/internal/entity/entity.go
  • integrations/csm-integration-service/internal/handler/accounts.go
  • integrations/csm-integration-service/internal/handler/accounts_test.go
  • integrations/csm-integration-service/internal/handler/helpers_test.go
  • integrations/csm-integration-service/internal/handler/projects.go
  • integrations/csm-integration-service/internal/handler/projects_test.go
  • integrations/csm-integration-service/internal/handler/response.go
  • integrations/csm-integration-service/internal/middleware/correlation.go
  • integrations/csm-integration-service/internal/middleware/correlation_test.go
  • integrations/csm-integration-service/internal/middleware/logger.go
  • integrations/csm-integration-service/internal/middleware/logger_test.go
  • integrations/csm-integration-service/internal/middleware/security_headers.go
  • integrations/csm-integration-service/internal/middleware/security_headers_test.go
  • integrations/csm-integration-service/internal/middleware/usertoken.go
  • integrations/csm-integration-service/internal/middleware/usertoken_test.go
  • integrations/csm-integration-service/openapi.yaml

📝 Walkthrough

Walkthrough

Adds a Go CSM Integration Service under integrations/csm-integration-service/. The service exposes account, project, contact-search, and health endpoints, forwards requests to an OAuth2-protected entity service, propagates correlation and optional user-token headers, and includes tests, OpenAPI definitions, runtime configuration, and documentation.

Changes

CSM Integration Service

Layer / File(s) Summary
API contracts and service configuration
integrations/csm-integration-service/go.mod, .choreo/*, .env.example, openapi.yaml, internal/apierror/*
Defines the Go module, Choreo endpoint, environment variables, typed upstream errors, seven API operations, security requirements, and request/response schemas.
Entity-service client and forwarding
integrations/csm-integration-service/internal/entity/*
Adds OAuth2 client-credentials requests, raw JSON passthrough for account and project operations, optional correlation and user-token headers, timeout handling, and bounded upstream error bodies.
Account and project HTTP handlers
integrations/csm-integration-service/internal/handler/*
Adds UUID and JSON validation, request-size limits, upstream error mapping, account/project routes, response helpers, mocks, and endpoint tests.
Request middleware and observability
integrations/csm-integration-service/internal/middleware/*
Adds security headers, correlation-ID generation and propagation, optional user-token forwarding, request logging, logger configuration, and middleware tests.
Runtime wiring and repository integration
integrations/csm-integration-service/cmd/*, Makefile, README.md, CLAUDE.md, .gitignore, repository README.md, workflow
Wires configuration, routes, middleware, graceful shutdown, local tooling, service documentation, repository paths, and automatic labeling.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant CSMIntegrationService
  participant EntityService
  Client->>CSMIntegrationService: request account or project endpoint
  CSMIntegrationService->>CSMIntegrationService: validate input and attach correlation context
  CSMIntegrationService->>EntityService: forward OAuth2-authenticated request
  EntityService-->>CSMIntegrationService: return JSON response or error
  CSMIntegrationService-->>Client: return JSON response or mapped error
Loading

Possibly related PRs

Suggested labels: Type/Improvement, Area/Backend

Suggested reviewers: hesara2003, cloby99, dilshanfardil

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/auto-label-assign.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

integrations/csm-integration-service/.choreo/component.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

integrations/csm-integration-service/go.mod

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 1 others
🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloby99
cloby99 merged commit aff9ee4 into wso2-open-operations:main Jul 22, 2026
1 of 2 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.

2 participants