Repository navigation
Add integration management and Connected Apps discovery - #130
ayushdubey003 wants to merge 1 commit into
Conversation
c784c06 to
053a576
Compare
|
@ayushdubey003 can we do this?
|
053a576 to
96adf02
Compare
propp-orkes
left a comment
There was a problem hiding this comment.
Nice work. Several things here are done carefully:
updatedoes GET → merge → POST, which is right: I checked the server, andPOST /integrations/provider/{name}replaces configuration, description, enabled and category wholesale.- The resolved config stays in memory and the transport never logs bodies.
$.env.Xresolves only in the caller's patch, never in stored values.UseNumberkeeps numeric precision.- Tests assert that no secret reaches output or errors.
Some things to sort out before merge:
1. create doesn't require or default category. The server stores whatever arrives (provider.setCategory(config.getCategory())), so a payload without category saves a connection with a null category. A later conductor integration update on it then fails with "incomplete saved integration". Suggest: when category is omitted, fetch /integrations/def/{type} and use its category. That also rejects an unknown type before the write.
2. Create/update hide the server's error message. You get integration creation failed (HTTP 400) and nothing else. Configuration keys are an enum on the server (Map<ConfigKey, Object>), so a misspelled field name should fail with a 400 like this and no hint about which field. I understand this is there to avoid echoing secrets. Could we instead show the server message with any resolved $.env values replaced by ***? The existing "no secret in output" test would still cover it.
3. The Enterprise-gate message.
- The existing Orkes-only commands (
secret,webhook,api-gateway) sayNot supported in OSS Conductor.CONTEXT.mdsays to use "Orkes Conductor" and to keep "Enterprise" for the literal server-type value only. - The check is the local
--server-type/CONDUCTOR_SERVER_TYPE(defaultOSS), not the server, so the usual cause is a profile that was never set to Enterprise. - Suggest reusing the shared wording and adding the fix:
… set --server-type Enterprise or CONDUCTOR_SERVER_TYPE=Enterprise. - conductor-skills#28 matches this exact string, so change both together.
4. $.env can read any variable, including the CLI's own credentials. The feature exists to keep secrets out of an agent's view. But a JSON payload an agent writes (or a prompt-injected one) could set "api_key": "$.env.CONDUCTOR_AUTH_SECRET" on a connection whose endpoint it controls, and the worker would then send the value there. At minimum, refuse CONDUCTOR_*. An opt-in allowlist (--allow-env NAME) would be stronger. This is a judgement call, but cheap to add now.
5. Output conventions and test coverage.
- The other list commands print a table by default and offer
--json/--csv(AddOutputFlags/GetOutputFormat). Here, output is always JSON and--jsononly pretty-prints. Either adopt the shared helpers or rename the flag to--pretty. - A declined
deleteexits silently, whilesecret deleteprints "Deletion cancelled". - Tests cover only
create/updateand the gate. Thehttptestsetup you already have makes the rest quick to add:types(enabled +--categoryfilter)list --typeget(lists only non-empty field names, never values)operations(--typevs connection, the "one of" argument check, unknown--name)deletewith--yes
96adf02 to
9fe5923
Compare
Addressed all comments except this one. We can have reserved keywords like CONDUCTOR_KEY, CONDUCTOR_AUTH_SECRET but imo it does not make sense to refuse CONDUCTOR_* because I can define keys with prefixes like CONDUCTOR_ for my local to segregate. |
9fe5923 to
f91a0d0
Compare
f91a0d0 to
22fb10e
Compare
22fb10e to
a2ed68d
Compare
Summary:
Add integration management commands and operation discovery by provider type or saved connection.
Commands
Testing:
https://drive.google.com/file/d/1545uUDcU8sbC_XytMkD4EMh4sbChxsXK/view?usp=sharing