Powershell-based API SDK for Conjur OSS.
PS C:\> Import-Module .\CyberarkConjur.psm1
$env:CONJUR_ACCOUNT="dev"
$env:CONJUR_AUTHN_LOGIN="admin"
$env:CONJUR_AUTHN_API_KEY="adminPassword"
$env:CONJUR_APPLIANCE_URL="https://conjur.yourorg.com:443"
Get-ConjurSecret -SecretIdentifier "secrets/db-password"
secretPasswordHere
Set-ConjurSecret -SecretIdentifier "secrets/db-password" -SecretValue "brandNewSecret"
Get-ConjurHealth
services database ok
-------- -------- --
@{possum=ok; ui=ok; ok=True} @{ok=True; connect=; free_space=; re... True
Update-ConjurPolicy -PolicyIdentifier "root" -PolicyFilePath ".\test-policy.yml"
created_roles version
------------- -------
@{dev:host:database/another-host=} 4
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=---
New-ConjurApiKey -RoleKind host -RoleId testing/app1
kdkjhd83hh399fhjjd93939hfjfkdkdshjfhe834hnf83
You can Get-Help on all of the functions mentioned above.
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