Repository navigation
feat(contract-toolkit): let a contract emit additional and legacy-shaped credential configs [FND-4755] - #4794
Conversation
…ntial configs [FND-4755]
App.pkl emitted exactly one credential configmap per contract,
<connectorConfigName>.json, always wrapped in the Atlan credential envelope.
Two shapes in the field could not be expressed: a second credential type
selected by the same entrypoint's form, and a legacy wrapper-less config
such as the @atlan/connectors csa-connectors-objectstore form.
- New CredentialConfig class and additionalCredentialConfigs listing. Each
entry renders through the same renderer as the primary config, which is
refactored to take a spec; the primary is built from the top-level
credential* properties and its output is byte-identical.
- CredentialConfig.bare emits only {"config": {properties, anyOf}}: no
wrapper keys and no hidden name/connector/connectorType properties. The
wrapper is not neutral for a legacy type: the SDK configmap route returns
defaultConnectorType, and the hidden properties land in every credential
body the form submits.
- AuthOption gains optional nestedHelp / nestedGrid (omitted when null).
- Bundles hoist and dedupe additional configs like the primary.
- Generation is refused for a missing uiConfig, a name without the
atlan-connectors-/csa-connectors- prefix (the SDK's credential-template
rule; any other stem can be served as the setup form), duplicate or
colliding names, and a wrapped entry with no connector.
New example examples/credential-configs and tests. A bare object-store
config built with it matches the committed csa-connectors-objectstore.json
up to two no-op keys (required: false on panes, help: "" on the radio).
Claude-Session: https://claude.ai/code/session_01AbKqGZBmKKFUgJnacX4QB1
… close review gaps [FND-4755] Design review: `bare` coupled two independent choices. generic-miner's Credential.pkl object-store config keeps the envelope (incl. defaultConnectorType, which the SDK route returns) but has no hidden identity properties, a combination `bare` could not express. - Replace `bare` with `wrapper` (envelope keys) and `identityProperties` (hidden name/connector/connectorType), both default true. - Refuse fields a flag makes unused instead of ignoring them. - Rename AuthOption.nestedGrid -> nestedWidth, matching authWidth / width. Correctness review: - A bundle root's additionalCredentialConfigs were silently dropped (only single-entrypoint mode emits them). Now refused with a pointer to the entrypoint contracts. - Names were checked for prefix only, so `csa-connectors-x/../../evil` wrote outside app/generated/. Names must now be the prefix plus lowercase kebab-case. Docs point Credential.pkl + additionalOutputFiles users at the new API. Claude-Session: https://claude.ai/code/session_01AbKqGZBmKKFUgJnacX4QB1
|
/lens |
lens summary · updated after round 2 (re-review · only commits since b84a4e8)✅ Ready to merge — every finding is resolved Open findings: 🔴 0 critical · 🟠 0 high · 🟡 0 medium · ⚪ 0 low (nit) lens reads this PR as — A single App.pkl entrypoint could emit only its primary wrapped credential configmap, so it could not express another credential type selected by the same form or reproduce legacy credential templates with missing envelope or identity fields. How: The PR adds Approach check — ✅ every concern has been addressed.
✔️ Resolved (3)
🕘 Round history (2)
round 2 · $0.076 of $1.00 · 51 model calls · 0 failed requests · 83% prompt cache hits · gpt-6-luna |
…r flag is off [FND-4755] lens F-ac04d8 / F-1f422c: with wrapper = false a custom connectorType, and with identityProperties = false a custom namePlaceholder, were dropped silently, contradicting the documented refusal of flag-disabled fields. Both are now nullable (renderer defaults "rest" / "Host Name"), so an explicit setting is detectable exactly and refused. lens F-86c1ee: check-invariants.sh gains a section for the additionalCredentialConfigs guard (path-traversal name, both flag-disabled fields, plus a generating control). Verified red against the previous guard. Claude-Session: https://claude.ai/code/session_01AbKqGZBmKKFUgJnacX4QB1
|
/lens |
|
✅ lens · round 2 · re-review · only commits since b84a4e8 — ready to merge — every finding resolved · $0.08 Open findings: 🔴 0 critical · 🟠 0 high · 🟡 0 medium · ⚪ 0 low (nit) Approach check — ✅ concerns addressed
$0.076 of $1.00 · 51 model calls · 0 failed requests |
atlan-ci
left a comment
There was a problem hiding this comment.
lens: ready to merge — every finding at every level is resolved (round 2).
Summary
An App.pkl contract could emit only one credential configmap,
<connectorConfigName>.json, and it was always wrapped. That left two shapes in the field inexpressible:@atlan/connectorscsa-connectors-objectstoreform (bare{"config": ...}) and generic-miner's Credential.pkl object-store form (envelope, no identity properties).This PR adds:
additionalCredentialConfigs: Listing<CredentialConfig>. Each entry is rendered by the same renderer as the primary config. That renderer is refactored to take a spec, and the primary is now built from the top-levelcredential*properties. The primary's output is byte-identical; a differential eval old vs new checked this, including the JDBCcredentialUrlGrouppath and everycredential*knob.CredentialConfig.wrapper/.identityProperties(both defaulttrue). They independently drop the envelope keys (icon,helpdeskLink,logo,connector,defaultConnectorType) and the hiddenname/connector/connectorTypeproperties. Neither is neutral for an existing credential type:defaultConnectorTypeto the frontend;AuthOption.nestedHelp/nestedWidth. Both are optional and omitted when null.uiConfig;atlan-connectors-/csa-connectors-plus kebab-case. These are the SDK's credential-template stems (is_form_configmap), so any other stem can be served as the setup form, and/or..would write outsideapp/generated/;New example
examples/credential-configs/andtests/additional_credential_configs_test.pkl(19 tests). README,docs/reference.mdand CLAUDE.md are updated.Fixes FND-4755. This unblocks FND-4752 (csa-uber onto App.pkl). In that repo, the orphaned
...-asset-export-advanced-delivery.jsonshould be deleted: nothing has referenced it since csa-uber dfc7065. The App.pkl half of generic-miner's deferred credential redesign (FND-4741) is also covered.Security-relevant
app/generated/and stops a credential template from being served as a setup form.Test plan
./scripts/regenerate-all.sh: no drift in existing examples./scripts/check-invariants.shpkl test tests/*.pkl: 634 passedtest-sdk-import.py: 63 files importcheck-ruff-stable.py: 0 unstablecsa-connectors-objectstore.json, apart from two no-op keys (required: falseon panes,help: ""on the radio)🤖 Generated with Claude Code
https://claude.ai/code/session_01AbKqGZBmKKFUgJnacX4QB1