[Connectors Forge] Add $api_key_header support for custom auth headers - #54
Open
rkulkund wants to merge 1 commit into
Open
[Connectors Forge] Add $api_key_header support for custom auth headers#54rkulkund wants to merge 1 commit into
rkulkund wants to merge 1 commit into
Conversation
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
force-pushed
the
rkulkund/api-key-header-support
branch
from
August 18, 2026 15:23
979c306 to
4fc489d
Compare
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.
Summary
Add support for the
$api_key_headerDSL field to allow REST connectors to specify a custom HTTP header name for API key authentication.Problem
The Kintone connector uses
X-Cybozu-API-Tokenfor authentication, but image 1.0.4 hardcodesAuthorization: ApiKeyfor allapi_keyauth type connectors, causing HTTP 401 responses and returning 0 records.Changes
RestApiMapping.java— StoreapiKeyHeaderfield, expose viagetApiKeyHeader()RestApiMappingLoader.java— Parse$api_key_headerfrom connector JSON configRestSourceInteraction.java— Use custom header when$api_key_headeris set, fall back toAuthorization: ApiKeywhen not specifieddeploy-codeengine.sh— Bump image reference to1.0.5Testing
Verified Kintone returns HTTP 200 / 5 records with
X-Cybozu-API-Token, HTTP 401 withAuthorization: ApiKey.