[confcom] Add commands to support radius policy generation #9427
Draft
DomAyre wants to merge 18 commits intoAzure:mainfrom
Draft
[confcom] Add commands to support radius policy generation #9427DomAyre wants to merge 18 commits intoAzure:mainfrom
DomAyre wants to merge 18 commits intoAzure:mainfrom
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| confcom | sub group confcom updated property sub_groups from {} to {'confcom containers': {'name': 'confcom containers', 'commands': {'confcom containers from_radius': {'name': 'confcom containers from_radius', 'is_aaz': False, 'parameters': [{'name': 'template', 'options': [], 'type': 'string', 'required': True}, {'name': 'parameters', 'options': ['--parameters', '-p'], 'nargs': '+', 'has_completer': True}, {'name': 'container_index', 'options': ['--idx'], 'type': 'int'}, {'name': 'platform', 'options': ['--platform'], 'type': 'string', 'default': 'aci'}]}}, 'sub_groups': {}}, 'confcom radius': {'name': 'confcom radius', 'commands': {}, 'sub_groups': {'confcom radius policy': {'name': 'confcom radius policy', 'commands': {'confcom radius policy insert': {'name': 'confcom radius policy insert', 'is_aaz': False, 'parameters': [{'name': 'policy_file', 'options': [], 'type': 'custom_type', 'required': True, 'nargs': '?', 'default': "<_io.BufferedReader name='<stdin>'>"}, {'name': 'template_path', 'options': ['--template-file', '-f']}, {'name': 'container_index', 'options': ['--idx'], 'type': 'int'}]}}, 'sub_groups': {}}}}} |
|
Hi @DomAyre, |
Collaborator
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
containers from_radius and radius policy insert commands |
Hi @DomAyre Release SuggestionsModule: confcom
Notes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Being able to generate security policies will make it easy to deploy confidential radius applications.
How
The general approach can be summed up with:
Here's a more detailed breakdown
--with-containerswhich lets the user specify partial rego container definitions which will be added to the final policy--with-containersis specified--with-containerflag to acifragmentgenaz confcom containers from_radius my_radius.bicepwhich outputs a partial container definition based on the information in the radius template (by partial I mean differences from a base default container)Usage
To try this out, you can first try generating the partial container policy definition from a radius.bicep
Then you can try generating a full policy
You can also generate a fragment in the same way
Once you have your policy, you can programatically insert it into your radius template with
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)