Skip to content
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

How to filter for a specific asset/account in the get-A2A-password.sh #72

Open
sgundlach3 opened this issue Feb 29, 2024 · 1 comment
Open

Comments

@sgundlach3
Copy link

Hi.
I have a customer that is trying to credential retrieval via bash for a certificate user that has 48 accounts, and only wants the pw for one assetaccount.

In Powershell, you are able to filter to select the asset/account:
“$myapikey = $myAvailableAccts | where {(($.assetname -eq $mysystem) -and ($.Accountname -eq $myaccount))} | % APIKey”

The customer want sto know how can they handle the same in bash script.

Sorry I am not a bash expert-- hopefully this is an easy question. We checked the other A2A shell scripts and they all use an API key for the specific account. What is needed is a script or additional commands to request the API key for the specific asset/account, so that API key can be passed to get-A2A-password.sh

@petrsnd
Copy link
Member

petrsnd commented Jul 2, 2024

You can use the https://github.com/OneIdentity/safeguard-bash/blob/master/src/get-a2a-retrievable-account.sh script if you have A2A registration visible to certificate users:
image

By default, the get-a2a-retrievable-account.sh script will get all accounts available using that credential, but you should be able to filter the results from there. We could take an enhancement to allow searching for a specific account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants