Skip to content

Commit

Permalink
adding ip-restriction feat (Azure#19841)
Browse files Browse the repository at this point in the history
* adding ip-restriction feat

* remove from stable, add to preview

* fix lintDiff error

* fix modelvalidation error

* fix formatting changes

* rename names, add note to all allow or all deny

* fix spell check error

* update name and examples

* rename `ipAddress` to `ipAddressRange`

* making small change to re-run build pipeline

* trigger GitHub actions

* resolve comments

Co-authored-by: Taher Darolywala <tdarolywala@microsoft.com>
  • Loading branch information
tdaroly and Taher Darolywala committed Aug 12, 2022
1 parent 94d84ee commit 3450a5c
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,16 @@
"allowInsecure": {
"description": "Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections",
"type": "boolean"
},
"ipSecurityRestrictions": {
"description": "Rules to restrict incoming IP address.",
"type": "array",
"items": {
"$ref": "#/definitions/IpSecurityRestrictionRule"
},
"x-ms-identifiers": [
"name"
]
}
}
},
Expand Down Expand Up @@ -791,6 +801,41 @@
}
}
},
"IpSecurityRestrictionRule": {
"description": "Rule to restrict incoming IP address.",
"type": "object",
"required": [
"name",
"ipAddressRange",
"action"
],
"properties": {
"name": {
"description": "Name for the IP restriction rule.",
"type": "string"
},
"description": {
"description": "Describe the IP restriction rule that is being sent to the container-app. This is an optional field.",
"type": "string"
},
"ipAddressRange": {
"description": "CIDR notation to match incoming IP address",
"type": "string"
},
"action": {
"description": "Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny",
"enum": [
"Allow",
"Deny"
],
"type": "string",
"x-ms-enum": {
"name": "action",
"modelAsString": true
}
}
}
},
"CustomHostnameAnalysisResult": {
"description": "Custom domain analysis.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
"revisionName": "testcontainerApp0-ab1234",
"label": "production"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down Expand Up @@ -125,6 +139,20 @@
"revisionName": "testcontainerApp0-ab4321",
"label": "staging"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@
"revisionName": "testcontainerApp0-ab4321",
"label": "staging"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@
"revisionName": "testcontainerApp0-ab4321",
"label": "staging"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@
"revisionName": "testcontainerApp0-ab4321",
"label": "staging"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
"revisionName": "testcontainerApp0-ab1234",
"label": "production"
}
],
"ipSecurityRestrictions": [
{
"name": "Allow work IP A subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/32",
"action": "Allow"
},
{
"name": "Allow work IP B subnet",
"description": "Allowing all IP's within the subnet below to access containerapp",
"ipAddressRange": "192.168.1.1/8",
"action": "Allow"
}
]
},
"dapr": {
Expand Down

0 comments on commit 3450a5c

Please sign in to comment.