CyberArk: Get --input-file working with machinehub mode#707
Merged
wallrj-cyberark merged 1 commit intomasterfrom Sep 4, 2025
Merged
CyberArk: Get --input-file working with machinehub mode#707wallrj-cyberark merged 1 commit intomasterfrom
--input-file working with machinehub mode#707wallrj-cyberark merged 1 commit intomasterfrom
Conversation
--input-file working with machinehub mode
8928ca0 to
8ffabec
Compare
…tests for machinehub mode - Implemented custom JSON unmarshaling for `DataReading` to handle dynamic parsing of the `Data` field. - Added `UnmarshalJSON` for `GatheredResource` to support strict JSON decoding. - Introduced `TestOutputModes` to validate the `--machine-hub` mode with example configuration and input files. - Added example files `config.yaml` and `input.json` for `machinehub` mode testing. Signed-off-by: Richard Wall <richard.wall@cyberark.com>
8ffabec to
d825569
Compare
mladen-rusev-cyberark
approved these changes
Sep 4, 2025
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.
I wanted to get the
--input-pathfeature working with machinehub mode. It wasn't working because the cyberark snapshot conversion requires the datareadings to have concrete types, but the existing input mode just treats the data asinterface{}.I've added tests which demo the input-file working with machinehub mode. They only run if you have the ARK_ environment variables set.
DataReadingto handle dynamic parsing of theDatafield.UnmarshalJSONforGatheredResourceto support strict JSON decoding.TestOutputModesto validate the--machine-hubmode with example configuration and input files.config.yamlandinput.jsonformachinehubmode testing.Testing
Here's an example of me running the machinehub output mode test locally.
The test is currently skipped in CI: