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

What about "source": "action" instead of "field": "<whatever>" ? #5899

Closed
jtuliani opened this issue Mar 16, 2018 — with docs.microsoft.com · 13 comments
Closed

What about "source": "action" instead of "field": "<whatever>" ? #5899

jtuliani opened this issue Mar 16, 2018 — with docs.microsoft.com · 13 comments

Comments

Copy link

In various sources (for example, https://docs.microsoft.com/en-us/cli/azure/policy/definition?view=azure-cli-latest), I see policy definition examples that use the line "source": "action" instead of a "field" in the policy rule.

The ability to use "source": "action", assuming it works, is not documented on this page. Shouldn't it be?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@bandersmsft
Copy link
Member

#in-process
azure-policy

@Mike-Ubezzi-MSFT
Copy link
Contributor

@jtuliani Thanks for the feedback! We are currently investigating and will update you shortly.

Copy link
Member

We've updated the article to change the example from "source": "action", to "field": "type", since policy only evaluates on /write actions. "source": "action", becomes basically equivalent to “field”: “type”.

#please-close

@jtuliani
Copy link
Author

Thanks. To clarify, are you saying that "source": "action" is deprecated?

@MohitGargMSFT
Copy link
Member

@bandersmsft Please help respond on above.

@bandersmsft
Copy link
Member

The source field is a supported, but probably isn't the best to show in programmatic examples. It only accepts one value of "action". It allows you to filter on the “Authorization Action” of the request. You can see various operations authorization actions in the activity log under authorization.action.

@jtuliani
Copy link
Author

Thanks. That helps clarify.

Simply removing the example doesn't really work, since there are other examples all over the place (including in training materials, existing customer configurations that a new developer is trying to make sense of, etc)

If this is a supported syntax and behaviour, then it really should be documented--that was my original point, it's not described in the documentation that defines the policy definition syntax.

@bandersmsft
Copy link
Member

@jtuliani I'll loop in the engineering team to see if they can assist.

Copy link
Member

@jtuliani We're in the process of updating the article to add additional details and explanation around operators, conditions, fields, an effects in policy rules. Hopefully the updates will provide the clarity and level of detail you're looking for. The updated article should go live later today or Monday of next week. I'll reply here when it does.

@jtuliani
Copy link
Author

Super, thanks Bill

Copy link
Member

@jtuliani My pleasure. The article is now updated. Are you we good to close on this now?

@femsulu
Copy link
Member

femsulu commented Mar 24, 2018

@jtuliani Now closing this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

@femsulu femsulu closed this as completed Mar 24, 2018
@jtuliani
Copy link
Author

Looks good. My only suggestion would be that where the policy definition describes the "source": "action" option, it would be good to include the comment above that this is equivalent to "field": "type", without the '/write' on the field value.

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

No branches or pull requests

6 participants