Skip to content

dbeaver/pro#11905 Add the MCP database authentication RPC contract - #58

Open
labanovichttps wants to merge 16 commits into
develfrom
codex/11905-database-authentication
Open

labanovichttps wants to merge 16 commits into
develfrom
codex/11905-database-authentication

Conversation

@labanovichttps

Copy link
Copy Markdown
Contributor

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"| Dam
Loading

The 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

Record Relationship
Tool call Can carry the authenticated MCP client's binding.
Authentication challenge Identifies the browser request for a tool call that needs credentials.

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.

@labanovichttps

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T22:10:56.444422Z 058380a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 058380ab94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 62 complexity · 0 duplication

Metric Results
Complexity 62
Duplication 0

View in Codacy

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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";
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