Understanding how to use conjur policy replace.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Understanding how to use conjur policy replace.

L3 Networker

Hey everyone,

I was trying to demystify the Conjur policy replace command because all my colleagues have nightmares with it.

For my first test, I tried using replace on the root policy, and as I expected… I lost everything! So, be very careful when running:

conjur load policy -b root -f <file>.yml

 

For my second test, I created a policy with several sub-policies inside it. I gave one of them the wrong name and tried to use replace to fix it, but… it didn’t work as I expected.

Here’s the first yaml that I used to create the policies:

 

Field_Content_versions_oct20__068Vy00000nLKSrIAO.pngThen, I created a second yaml, trying to fix the policy name, note that I used the replace command with this yaml:

 

Field_Content_versions_oct20__068Vy00000nLc68IAC.pngBut instead of replacing all the policie within test-replace, it just added a new one. I thought

replace would delete the old policy and recreate everything, but apparently, that’s not what happens.

I know the easiest way to fix the policy name is to delete it and recreate it with the correct name, but my goal here was to better understand how conjur policy replace actually works.

Could anyone help me clarify this behavior?

Thanks in advance!

1 accepted solution

Accepted Solutions

L4 Transporter

Hi @l b​ 

 

I suppose the explanation you are looking for is mentioned in the official documentation here (Example: Replace nested policy objects)

 

https://docs.cyberark.com/conjur-enterprise/latest/en/content/operations/policy/statement-ref-policy.htm#Examples

 

Does it clarify this behaviour you've got in your labs?

 

View solution in original post

1 REPLY 1

L4 Transporter

Hi @l b​ 

 

I suppose the explanation you are looking for is mentioned in the official documentation here (Example: Replace nested policy objects)

 

https://docs.cyberark.com/conjur-enterprise/latest/en/content/operations/policy/statement-ref-policy.htm#Examples

 

Does it clarify this behaviour you've got in your labs?

 

  • 1 accepted solution
  • 115 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!