Powershell-based API SDK for Conjur OSS.
PS C:\> Import-Module .\CyberarkConjur.psm1
PS C:\> $env:CONJUR_ACCOUNT="dev"
PS C:\> $env:CONJUR_AUTHN_LOGIN="admin"
PS C:\> $env:CONJUR_AUTHN_API_KEY="adminPassword"
PS C:\> $env:CONJUR_APPLIANCE_URL="https://conjur.yourorg.com:443"
PS C:\> $env:CONJUR_ACCOUNT="dev"
PS C:\> $env:CONJUR_AUTHN_LOGIN="host/cust-portal/622703825757/ubuntu-client-conjur-identity"
PS C:\> $env:CONJUR_IAM_AUTHN_BRANCH="authnBranchName"
PS C:\> $env:CONJUR_APPLIANCE_URL="https://conjur.yourorg.com:443"
PS C:\> Get-ConjurSecret -SecretIdentifier "secrets/db-password"
secretPasswordHere
PS C:\> Set-ConjurSecret -SecretIdentifier "secrets/db-password" -SecretValue "brandNewSecret"
PS C:\> Get-ConjurHealth
services database ok
-------- -------- --
@{possum=ok; ui=ok; ok=True} @{ok=True; connect=; free_space=; re... True
PS C:\> Replace-ConjurPolicy -PolicyIdentifier "root" -PolicyFilePath ".\test-policy.yml"
created_roles version
------------- -------
@{dev:host:database/another-host=} 4
PS C:\> Append-ConjurPolicy -PolicyIdentifier "root" -PolicyFilePath ".\test-policy.yml"
created_roles version
------------- -------
@{dev:host:database/another-host=} 5
PS C:\> Update-ConjurPolicy -PolicyIdentifier "root" -PolicyFilePath ".\test-policy.yml"
created_roles version
------------- -------
@{dev:host:database/another-host=} 6
PS C:\> Get-ConjurResources
created_at : 2019-05-29T16:42:56.284+00:00
id : dev:policy:root
owner : dev:user:admin
permissions : {}
annotations : {}
policy_versions : {@{version=1; created_at=2019-05-29T16:42:56.284+00:00; policy_text=---
You can Get-Help on all of the functions mentioned above.
PS C:\> Get-Help Update-ConjurPolicy
NAME
Update-ConjurPolicy
SYNOPSIS
Update a policy in conjur
SYNTAX
Update-ConjurPolicy [-PolicyIdentifier] <String> [-PolicyFilePath] <String> [-ConjurAccount <Object>]
[-ConjurUsername <Object>] [-ConjurPassword <Object>] [-ConjurApplianceUrl <Object>] [-IgnoreSsl]
[<CommonParameters>]
DESCRIPTION
Modifies an existing Conjur policy. Data may be explicitly deleted using the !delete, !revoke, and !deny
statements.
Unlike “replace” mode, no data is ever implicitly deleted.
RELATED LINKS
https://www.conjur.org/api.html#policies-update-a-policy-patch
REMARKS
To see the examples, type: "get-help Update-ConjurPolicy -examples".
For more information, type: "get-help Update-ConjurPolicy -detailed".
For technical information, type: "get-help Update-ConjurPolicy -full".
For online help, type: "get-help Update-ConjurPolicy -online"
We store instructions for development and guidelines for how to build and test this project in the CONTRIBUTING.md - please refer to that document if you would like to contribute.
This project is licensed under Apache License v2.0