-
Notifications
You must be signed in to change notification settings - Fork 25
[VC-43753] CyberArk(client): extract cluster UID from data readings #687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
wallrj-cyberark
wants to merge
3
commits into
VC-43403-inventory-api-2
Choose a base branch
from
VC-43403-inventory-api-3
base: VC-43403-inventory-api-2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[VC-43753] CyberArk(client): extract cluster UID from data readings #687
wallrj-cyberark
wants to merge
3
commits into
VC-43403-inventory-api-2
from
VC-43403-inventory-api-3
Conversation
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
88c1cc7
to
8b9a233
Compare
6e029d7
to
4c3cbe5
Compare
This was referenced Aug 14, 2025
Merged
8b9a233
to
5196fc9
Compare
4c3cbe5
to
919c73d
Compare
59dbac7
to
2d44e46
Compare
caadaf0
to
e8f50da
Compare
- Introduced a new `MachineHub` output mode in the agent configuration. - Added `--machine-hub` flag to enable the `MachineHub` mode. - Implemented `CyberArkClient` for publishing data readings to CyberArk's API. - Created `LoadClientConfigFromEnvironment` to load CyberArk client configuration from environment variables. - Updated tests to cover `MachineHub` mode and CyberArk client functionality. - Modified mock data and discovery logic to support CyberArk integration. Signed-off-by: Richard Wall <[email protected]>
- Introduced `ConvertDataReadingsToCyberarkSnapshot` to transform data readings into CyberArk snapshot format. - Enhanced `PostDataReadingsWithOptions` to utilize the new snapshot conversion. - Added `DynamicData` and `DiscoveryData` types for structured data handling. - Updated `DataGathererDynamic` and `DataGathererDiscovery` to return strongly typed data. - Implemented `ParseDataReadings` in `testutil` for decoding and testing data readings. - Added test data and golden file support for snapshot conversion validation. Signed-off-by: Richard Wall <[email protected]>
e8f50da
to
7686607
Compare
- Added `extractClusterUIDFromReading` to derive the cluster UID from `ark/namespaces` data readings. - Updated `ConvertDataReadingsToCyberarkSnapshot` to include the cluster UID in the snapshot. - Modified tests to validate cluster UID extraction logic. - Updated example test data to include `ark/namespaces` data gatherer. - Removed `pkg/clusteruid` package as its functionality is now integrated into the client logic. Signed-off-by: Richard Wall <[email protected]>
919c73d
to
339f991
Compare
ee3d84d
to
a04cdad
Compare
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.
Stacked on #684
The problem with the first approach to getting the cluster ID (#670), -- the UID of the kube-system namespace -- is that it requires the agent to have a connection to a target Kubernetes cluster at startup.
But this breaks one of operating modes of the agent; it is designed so data can be collected and stored to a file by one instance, (
--one-shot --output-file
) and then the data read from a file and uploaded to Venafi TLSPK (or CyberArk Discovery) by another separate instance (--one-shot --input-file
).In this alternative approach, we use a dynamic data-gatherer to get all the namespaces, and extract the UID from the kube-system namespace before uploading to CyberArk.
extractClusterUIDFromReading
to derive the cluster UID fromark/namespaces
data readings.ConvertDataReadingsToCyberarkSnapshot
to include the cluster UIDin the snapshot.
ark/namespaces
data gatherer.pkg/clusteruid
package as its functionality is now integratedinto the client logic.
Part of: https://venafi.atlassian.net/browse/VC-43753
Followup PRs