Skip to content

fix(destination): authenticate Marketo bulk uploads with bearer token - #7504

Closed
rudder-devbox[bot] wants to merge 1 commit into
masterfrom
harness/INT-7415-fix-destination-authenticate-ma-42b5b6c3
Closed

rudder-devbox[bot] wants to merge 1 commit into
masterfrom
harness/INT-7415-fix-destination-authenticate-ma-42b5b6c3

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes MARKETO_BULK_UPLOAD lead imports returning Marketo 603 errors after form-field token authentication was removed.

The bulk import request now:

  • sends the OAuth token as Authorization: Bearer <token>;
  • omits access_token from the multipart form;
  • uses the configured MarketoAPIService HTTP client;
  • preserves the CSV file, format=csv, and optional lookupField parts.

Request-level tests cover both configured and absent deduplication fields, the bearer header, token-field omission, and uploaded CSV contents.

Linear Ticket

INT-7415

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Validation

  • make fmt — passed
  • Focused Marketo package tests — passed
  • go vet ./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/... — passed
  • go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/... — passed (0 issues)

⚠️ Known Issues

go test -count=1 ./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/... encounters an unrelated pre-existing failure in TestReadJobsFromFile/No_read_permissions. The sandbox runs tests as root, so opening a chmod 000 file succeeds; the existing test then dereferences a nil error and panics. All other package tests, including the new request test, pass.

@rudder-devbox

rudder-devbox Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from a Linear ticket.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@rudder-devbox

rudder-devbox Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

⚠ CI failed on Tests but I could not fetch any job logs to diagnose the failure.

Errors encountered:
No details available.

View the run

@maheshkutty

Copy link
Copy Markdown
Contributor

Closing in favour of #7505 (targets release/1.91.x).

maheshkutty added a commit that referenced this pull request Oct 20, 2026
…#7505)

Backport of #7504 to `release/1.91.x`.

# Description

Fixes MARKETO_BULK_UPLOAD lead imports returning Marketo 603 errors
after form-field token authentication was removed.

The bulk import request now:
- sends the OAuth token as `Authorization: Bearer <token>`;
- omits `access_token` from the multipart form;
- keeps the upload on its existing HTTP client (moving it to the shared
client with a configurable timeout is a follow-up, since the shared
client's 30s timeout would apply to uploads of up to 10MB);
- preserves the CSV file, `format=csv`, and optional `lookupField`
parts.

Request-level tests cover both configured and absent deduplication
fields, the bearer header, token-field omission, and uploaded CSV
contents.

## Linear Ticket

INT-7415

## Security

- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.

## Validation

- `make fmt` — passed
- Focused Marketo package tests — passed
- `go vet
./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/...` —
passed
- `go run github.com/golangci/golangci-lint/v2/cmd/[email protected]
run
./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/...` —
passed (`0 issues`)

## ⚠️ Known Issues

`go test -count=1
./router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/...`
encounters an unrelated pre-existing failure in
`TestReadJobsFromFile/No_read_permissions`. The sandbox runs tests as
root, so opening a chmod `000` file succeeds; the existing test then
dereferences a nil error and panics. All other package tests, including
the new request test, pass.

---------

Co-authored-by: tech-infra-rudderstack <[email protected]>
Co-authored-by: Mahesh Kutty <[email protected]>
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