Skip to content

[Connectors Forge] Add $api_key_header support for custom auth headers - #54

Open
rkulkund wants to merge 1 commit into
IBM:mainfrom
rkulkund:rkulkund/api-key-header-support
Open

[Connectors Forge] Add $api_key_header support for custom auth headers#54
rkulkund wants to merge 1 commit into
IBM:mainfrom
rkulkund:rkulkund/api-key-header-support

Conversation

@rkulkund

Copy link
Copy Markdown

Summary

Add support for the $api_key_header DSL field to allow REST connectors to specify a custom HTTP header name for API key authentication.

Problem

The Kintone connector uses X-Cybozu-API-Token for authentication, but image 1.0.4 hardcodes Authorization: ApiKey for all api_key auth type connectors, causing HTTP 401 responses and returning 0 records.

Changes

  • RestApiMapping.java — Store apiKeyHeader field, expose via getApiKeyHeader()
  • RestApiMappingLoader.java — Parse $api_key_header from connector JSON config
  • RestSourceInteraction.java — Use custom header when $api_key_header is set, fall back to Authorization: ApiKey when not specified
  • deploy-codeengine.sh — Bump image reference to 1.0.5

Testing

Verified Kintone returns HTTP 200 / 5 records with X-Cybozu-API-Token, HTTP 401 with Authorization: ApiKey.

Add support for the $api_key_header DSL field so connectors can specify a
custom HTTP header name for API key authentication.

Without this, all api_key connectors hardcode 'Authorization: ApiKey', which
breaks APIs that require a different header (e.g. Kintone requires
X-Cybozu-API-Token and returns HTTP 401 with the default header).

Changes:
- RestApiMapping: add apiKeyHeader field and getApiKeyHeader() getter
- RestApiMappingLoader: parse $api_key_header constant from connector JSON
- RestInputInteraction: use custom header when $api_key_header is set,
  fall back to Authorization: ApiKey when not specified
@rkulkund
rkulkund force-pushed the rkulkund/api-key-header-support branch from 979c306 to 4fc489d Compare August 18, 2026 15:23
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.

1 participant