Skip to content

feat: add resolve_endpoint_auth() for decrypted endpoint credentials - #19

Merged
RatulMaharaj merged 1 commit into
mainfrom
claude/github-issue-18-emt1j0
Jun 24, 2026
Merged

feat: add resolve_endpoint_auth() for decrypted endpoint credentials#19
RatulMaharaj merged 1 commit into
mainfrom
claude/github-issue-18-emt1j0

Conversation

@AminChirazi

@AminChirazi AminChirazi commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #18.

Adds a first-class resolve_endpoint_auth(endpoint_id) method to the SDK so callers can obtain an endpoint's real, decrypted credentials without reaching into private internals (dm._endpoints._make_request(...)).

The DataMaker API masks credentials (*******) on every endpoint read route, so get_endpoint() / get_endpoints() return masked auth. This new method calls POST /endpoints/auth-resolve (decryption stays server-side) and returns the real Authorization header (Basic decrypted / OAuth2 token exchanged) plus, for Basic auth, the decrypted username/password.

Changes

  • src/datamaker/routes/custom_types.pyEndpointsClient.resolve_endpoint_auth()
  • src/datamaker/main.pyDataMaker.resolve_endpoint_auth() facade method
  • tests/test_routes.pyTestEndpointsClient unit test asserting the request shape and response passthrough
  • llms.txt — documented under the Endpoints section

Usage

resolved = dm.resolve_endpoint_auth(endpoint_id)
# {"authType": "Basic", "authHeader": "Basic ...", "fetchCsrf": ..., "basic": {"username": ..., "password": ...}}

Response shape mirrors the API route: {authType, authHeader, fetchCsrf, basic} (basic is null for non-Basic auth). The endpoint is gated by the same access check as the rest of the API (403 if the caller lacks access).

Tests

pytest tests/test_routes.py tests/test_main.py -m "not integration" → 62 passed.

Follow-up

Once merged, bump the pinned commit in datamaker-runner (pyproject.toml + uv.lock) as noted in the issue.

🤖 Generated with Claude Code

The DataMaker API masks credentials (`*******`) on every endpoint read
route, so get_endpoint()/get_endpoints() return masked auth. Add a
first-class resolve_endpoint_auth(endpoint_id) method that calls
POST /endpoints/auth-resolve to obtain an endpoint's real, decrypted
credentials (Authorization header + Basic username/password) without
reaching into private internals.

- EndpointsClient.resolve_endpoint_auth() in routes/custom_types.py
- DataMaker.resolve_endpoint_auth() facade in main.py
- TestEndpointsClient unit test
- documented in llms.txt

Closes #18

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXprocqPaRSLq223PN2FcH
Copilot AI review requested due to automatic review settings June 24, 2026 23:23

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@RatulMaharaj
RatulMaharaj merged commit 02c042b into main Jun 24, 2026
4 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.

Add resolve_endpoint_auth() method to SDK for real (decrypted) endpoint credentials

4 participants