Skip to content

[ConnectorsForge] Expanding user authentication possibilities - #53

Open
marek-zuwala wants to merge 13 commits into
mainfrom
mzuw_auth_headers
Open

[ConnectorsForge] Expanding user authentication possibilities#53
marek-zuwala wants to merge 13 commits into
mainfrom
mzuw_auth_headers

Conversation

@marek-zuwala

@marek-zuwala marek-zuwala commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

This PR expands the authentication capabilities of connectors created with ConnectorsForge. It also fixes several issues that were discovered during testing.

Advanced authentication DSL

  • New AuthConfig model + object-form $authentication in the DSL supports custom headers, base64(…) encoding, and a new CUSTOM auth type for arbitrary headers.
  • RestDatasourceType.
  • Full backward-compat: bare-string form (e.g. "api_key") is auto-expanded.

Custom Accept header — new $accept_header DSL field, defaults to application/json.

Field types invisible in CP4D discovery UI (root cause fix)

  • ForgeSchemaBuilder.toArrowField() was building Arrow fields with no metadata map. CP4D reads field types from Arrow metadata (a serialised CustomFlightAssetField embedded by ArrowConversions.toArrow()). Without it, all columns showed up typeless.
  • Fixed by delegating to RestFieldTypeMapper.toAssetField() + ArrowConversions.toArrow() instead of building FieldType directly.
  • RestFieldTypeMapper also needed setLength(0) on INTEGER, BIGINT, SMALLINT, TINYINT, and BOOLEAN — without a length, ArrowConversions left those fields indeterminate.
  • A separate getFlightInfo() call to Utils.getAssetFields(schema) was overwriting correctly-populated fields with an empty list. Removed.

Liberty gRPC deadlock (CallbackBackpressureStrategy removed)

  • Liberty's grpc-1.0 transport never fires onReady(). The strategy loop waited 5 seconds per batch and logged forever. Removed entirely; listener.putNext() is now called directly.

In the previous PR, while solving the hostname issue, a change was made unnoticed that changed the URL creation logic. The host and port should be taken from the connection properties, not the DSL. This logic has been restored in this PR, without affecting the fix for the previous hostname problem.

Test coverage — 2 new test classes + 12 new tests in existing classes; all 45 tests passing.

@marek-zuwala
marek-zuwala force-pushed the mzuw_auth_headers branch 2 times, most recently from ca0790e to 33654f5 Compare August 18, 2026 10:10
Comment thread .bob/rules-connectors-forge-rest/6_deployment_execution.xml Outdated
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
…Liberty gRPC transport layer never fires onReady and uses onStreamAllocated instead

Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Signed-off-by: marek-zuwala <marek.zuwala@ibm.com>
Comment on lines +164 to +166
final String host = (hostProp != null && !hostProp.toString().isBlank())
? hostProp.toString()
: configUrl.getHost();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have some tests for the host/port override change?

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