feat(honeytoken): Salesforce provider plugin (epic #256 Task 5) - #269
Open
LiorFink00 wants to merge 1 commit into
Open
feat(honeytoken): Salesforce provider plugin (epic #256 Task 5)#269LiorFink00 wants to merge 1 commit into
LiorFink00 wants to merge 1 commit into
Conversation
Task 5 of epic #256. Second honeytoken provider: create a canary Salesforce Connected App and detect use. - Authenticates via the OAuth 2.0 JWT Bearer flow (RS256-signed assertion). - create_token(): create a Connected App as the canary; resolves its durable Id. - revoke_token(): delete the Connected App (404 = already gone, idempotent). - poll_usage(): query LoginHistory (login attempts, with source IP) AND OAuthToken (token usage counts) for the canary app; each row becomes a usage event with a stable event_id for dedup. Ported from the enterprise plugin, rewritten on httpx (dropping requests) and adding pyjwt>=2.8 (cryptography, needed for RS256, is already a dependency). Config: instance_url, consumer_key, username (strings), private_key (secret PEM). 6 tests against faked httpx + jwt (no real org/key): connect success/failure, config validation, create→resolve id, idempotent revoke, poll collecting both login and oauth events. Full suite: 414 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018DARDAxeg4NM8FKoyGMQZy
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Task 5 of epic #256 — second honeytoken provider: create a canary Salesforce Connected App and detect its use.
create_token()— create a Connected App as the canary; resolves its durable record Id.revoke_token()— delete the Connected App (404 → already gone, idempotent).poll_usage()— queries LoginHistory (login attempts + source IP) and OAuthToken (token usage counts) for the canary app; each row becomes a usage event with a stableevent_idfor dedup.Adaptation
Ported from the enterprise plugin, rewritten on
httpx(droppingrequests) and addingpyjwt>=2.8to deps —cryptography(needed for RS256) is already a dependency, and CI installs viapip install -e ".[dev]". Config:instance_url,consumer_key,username(strings),private_key(secret PEM).Testing
6 tests against faked
httpx+jwt(no real org/key): connect success/failure, config validation, create→resolve-id, idempotent revoke, poll collecting both login + oauth events. Loader discovers it ashoneytoken. Full suite: 414 passed, 1 skipped; ruff clean.Stacked
Based on #268 (Task 4) → #267 → …. AWS plugin (Task 6) next, then the UI.
🤖 Generated with Claude Code