Repository navigation
dbeaver/pro#11905 Add the MCP database authentication RPC contract - #58
labanovichttps wants to merge 16 commits into
Conversation
…ential request identifiers
…tication wire fields
…ernal transport
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 62 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
🟡 Changes recommended
The PR claims to support authenticated MCP client binding, but CLIENT_BINDING_FIELD is only a constant: DDMcpFunctionCall has no binding component and no serialization path uses the name. As a result, the binding cannot be carried through the API contract, so the relay cannot enforce the described authorization.
1 open issue
What changed in this PR
Adds a typed MCP database-authentication RPC contract for credential submission and authentication challenges.
Changes:
- Adds authentication request, response, challenge, and status models.
- Introduces a dedicated desktop authentication service.
- Expands contract tests for serialization, validation, and redaction.
| File | Description |
|---|---|
| apis/com.dbeaver.datadam.mcp.api/src/test/java/com/dbeaver/datadam/mcp/api/DDMcpFunctionContractTest.java | Adds contract tests covering authentication serialization, validation, RPC behavior, and credential redaction. |
| apis/com.dbeaver.datadam.mcp.api/src/main/java/com/dbeaver/datadam/mcp/api/service/desktop/DDMcpDatabaseAuthenticationService.java | Declares the dedicated desktop database-authentication RPC service. |
| apis/com.dbeaver.datadam.mcp.api/src/main/java/com/dbeaver/datadam/mcp/api/model/DDMcpDatabaseAuthentication.java | Defines typed database-authentication payloads, challenges, responses, statuses, and validation. |
Review effort: Lite
| import java.util.UUID; | ||
|
|
||
| public final class DDMcpDatabaseAuthentication { | ||
| public static final String CLIENT_BINDING_FIELD = "clientBinding"; |

Closes dbeaver/pro#11905
Summary
Add a separate authentication RPC service so a database tool can request browser authentication and the Account service can submit database credentials to the Dam.
Architecture
flowchart LR Gateway["MCP gateway (existing)"] -->|"existing tool call plus client binding"| Dam["Dam (existing)"] Dam -->|"new challenge in existing result envelope"| Gateway Account["DataDam Account (existing)"] -->|"new authenticateDatabase RPC"| DamThe browser request and connection status use typed records. The existing desktop function service keeps its method signatures. Tool calls and ordinary results retain their wire format.
Relationships
Verification
The API reactor passed on Java 25. Contract tests cover old payloads, challenge decoding, required response status and credential redaction from the request representation.