Skip to content

CAMEL-24236: camel-cyberark-vault - add support for cyberark policies - #25012

Merged
tdiesler merged 1 commit into
apache:mainfrom
tdiesler:CAMEL-24236-cyberark
Jul 23, 2026
Merged

CAMEL-24236: camel-cyberark-vault - add support for cyberark policies#25012
tdiesler merged 1 commit into
apache:mainfrom
tdiesler:CAMEL-24236-cyberark

Conversation

@tdiesler

@tdiesler tdiesler commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

  • Update method on how to setup Conjur and obtain an API key (i.e. file not server logs)
  • Update tests to install their respective policy

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

AI-assisted contributions

  • If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., Co-authored-by trailers) and the PR description identifies the AI tool used.

@tdiesler
tdiesler force-pushed the CAMEL-24236-cyberark branch 3 times, most recently from d1ae255 to 6fc53ce Compare July 22, 2026 09:49

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well-executed test infrastructure refactoring. The three integration test classes (ProducerIT, MultipleSecretsIT, PropertiesSourceIT) each had their own copy of authenticate() and createSecret() — this PR consolidates them into a shared CyberArkTestSupport base class with improved error handling (requireSuccess). Net result: -7 lines despite adding the new base class.

What's good:

  • Each test class now explicitly declares the Conjur policy variables it needs via loadPolicy() in its @BeforeAll, making prerequisites clear and each class independently runnable
  • requireSuccess() validates HTTP status codes — the old ProducerIT and MultipleSecretsIT authenticate() implementations didn't check status codes at all
  • Documentation updated consistently (.adoc and README.md) for file-based API key retrieval instead of log parsing
  • Account name standardized to myConjurAccount across all files
  • Clean CyberArkVaultConfiguration local variable extraction in PropertiesSourceIT reduces chained calls

Minor observations (not blocking):

  • CyberArkTestSupport.authenticate() uses Accept-Encoding: base64 (server-side encoding) while the production ConjurClientImpl uses client-side Base64.getEncoder().encodeToString(). Both are functionally equivalent per the Conjur API, but aligning with the production pattern would make the codebase easier to reason about.
  • URLEncoder.encode("root", ...) in loadPolicy() is a no-op since "root" has no characters needing encoding — harmless but unnecessary.

Checklist:

  • Tests — JUnit 5, *IT.java suffix, no Thread.sleep()
  • Documentation — .adoc and README.md updated
  • Commit convention — CAMEL-24236: prefix
  • No production code changes — backward compatible
  • Security — no hardcoded secrets, API key is commented out in pom.xml
  • CI — pending

Reviewed with Claude Code on behalf of gnodet. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@tdiesler
tdiesler force-pushed the CAMEL-24236-cyberark branch from 6fc53ce to 20c9152 Compare July 22, 2026 10:01
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus

Copy link
Copy Markdown
Contributor

There are uncommitted changes
HEAD detached at pull/25012/merge
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/cyberark-vault-component.adoc

@tdiesler
tdiesler force-pushed the CAMEL-24236-cyberark branch from 20c9152 to 3b7aafe Compare July 22, 2026 12:03
@tdiesler
tdiesler force-pushed the CAMEL-24236-cyberark branch from 3b7aafe to d4219f8 Compare July 22, 2026 13:01

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean test refactoring that extracts common CyberArk Conjur test setup into a shared base class and adds proper policy loading. The documentation improvements are nice.

A few minor observations:

Documentation consistency: The .adoc file has a mix of docker compose (modern plugin form, used in the newly added lines) and docker-compose (hyphenated legacy form, on existing unchanged lines) within the same code block. The README.md was correctly updated throughout to use docker compose. Consider updating the .adoc for consistency.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-cyberark-vault

🔬 Scalpel shadow comparison — Scalpel: 10 tested, 28 compile-only — current: 9 all tested

Maveniverse Scalpel detected 38 affected modules (current approach: 9).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 10 modules (2 direct + 8 downstream), skip tests for 28 (generated code, meta-modules)

Modules Scalpel would test (10)
  • camel-catalog
  • camel-cyberark-vault
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
Modules with tests skipped (28)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (38 modules)
  • Camel :: All Components Sync point
  • Camel :: Assembly
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Suggest
  • Camel :: Component DSL
  • Camel :: Coverage
  • Camel :: CyberArk Vault
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: Integration Tests
  • Camel :: JBang :: Core
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Main
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Closes apache#24236

Signed-off-by: Thomas Diesler <tdiesler@redhat.com>

* Update method on how to setup Conjur and obtain an API key (i.e. file not server logs)
* Update tests to install their respective policy
@tdiesler
tdiesler force-pushed the CAMEL-24236-cyberark branch from d4219f8 to 4b3dc2d Compare July 22, 2026 21:03
@tdiesler
tdiesler merged commit 1935862 into apache:main Jul 23, 2026
6 checks passed
@tdiesler
tdiesler deleted the CAMEL-24236-cyberark branch July 23, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants