-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support Restapi/gnmi control plane acls in 202012 branch #11903
Merged
ZhaohuiS
merged 5 commits into
sonic-net:202012
from
ZhaohuiS:feature/caclmgrd_external_client
Sep 5, 2022
Merged
Support Restapi/gnmi control plane acls in 202012 branch #11903
ZhaohuiS
merged 5 commits into
sonic-net:202012
from
ZhaohuiS:feature/caclmgrd_external_client
Sep 5, 2022
Conversation
This file contains 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
Signed-off-by: Zhaohui Sun <[email protected]>
Signed-off-by: Zhaohui Sun <[email protected]>
prsunny
approved these changes
Sep 1, 2022
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
reviewed
Sep 1, 2022
…ines for ACL_RULE in json file Signed-off-by: Zhaohui Sun <[email protected]>
Signed-off-by: Zhaohui Sun <[email protected]>
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Zhaohui Sun <[email protected]>
ZhaohuiS
changed the title
Support Restapi/gnmi control plane acls
Support Restapi/gnmi control plane acls in 202012 branch
Sep 4, 2022
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.
Signed-off-by: Zhaohui Sun [email protected]
Why I did it
Currently Sonic supports the following ACL tables.
IPV6_SNMP_ACL
EVERFLOW
SSH_ONLY
..
For the Restapi/gnmi use-cases, Sonic has to support a new Table: EXTERNAL_CLIENT of type CTRLPLANE, stage ingress
This shall match on 'src ip prefix' and dst port '8080'. Caclmgrd must parse this from acl.json and install as in the below example:
iptables -A INPUT -s 20.20.20.20/27 -p tcp --dport 8080 -j ACCEPT
or ip6tables if the 'src ip prefix' is IPv6.
This change for master branch is in PR sonic-net/sonic-host-services#9
How I did it
Steps:
acl-loader update full external_acl.json
external_acl.json looks like this:
IPv4:
IPv6:
IPv4:
IPv6:
Sep 2 02:56:42.117150 vlab-03 WARNING caclmgrd[3841175]: Required destination port not found for ACL table 'EXTERNAL_CLIENT'. Skipping table...
Signed-off-by: Zhaohui Sun [email protected]
How to verify it
Boot up testbed,
caclmgrd
will run automatically.Add
EXTERNAL_CLIENT_AC
L table inconfig_db.json
Load acl.json which contains external_client acl rules.
Verify if the specific traffic is blocked or forwarded.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)