You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1400 Manage multiple patterns for allowed/blocked IPs via Security Options config section (#1399)
* Add IpAddressRange package and manage multiple pattern in order to allow or block ip addresses
* Update SecurityOptions.cs
* Update FileSecurityOptions.cs
* Fix Issues
* Update routing.rst
Fix typos and mistakes in the Security Options paragraph
* Update FileSecurityOptions.cs
Add developer's XML docs with description from #1400
* Update configuration.rst
* Update docs with License Reference
* SecurityOptions init moved to SecurityOptionsCreator
* Update unit test
* SecurityOptionsCreator: File-scoped namespace declaration
* Fix SA1312: Variable 'xxx' should begin with lower-case letter
* Remove using alias and make logical reference to the package
* Fix SA1609: Property documentation should have value
* FileSecurityOptions: File-scoped namespace declaration
* Fix SA1135: Using directive for namespace 'Ocelot.Responses' should be qualified.
Sort usings.
Convert to file-scoped namespace.
* Fix test code style
* Refactor SecurityOptions
* FileSecurityOptions: Add constructors
* Refactor SecurityOptions: Add constructors
* Using constructors for SecurityOptions creation, not initialization
* Fix unit test after latest infrastructure updates
* Convert to block scoped namespace
* Update IPAddressRange to v.6.0.0
* Update src/Ocelot/Configuration/Creator/SecurityOptionsCreator.cs
Co-authored-by: Raynald Messié <[email protected]>
* Revert "Update src/Ocelot/Configuration/Creator/SecurityOptionsCreator.cs"
This reverts commit a77a30e.
* Update comment con IPAddressRange reference
* Use Select<IPAddress, string> instead of AsEnumerable
* Remove and Sort Usings
---------
Co-authored-by: Fabrizio Mancin <[email protected]>
Co-authored-by: Raman Maksimchuk <[email protected]>
Co-authored-by: Raman Maksimchuk <[email protected]>
Co-authored-by: Raynald Messié <[email protected]>
Copy file name to clipboardExpand all lines: docs/features/routing.rst
+48
Original file line number
Diff line number
Diff line change
@@ -237,3 +237,51 @@ Ocelot will also allow you to put query string parameters in the UpstreamPathTem
237
237
238
238
In this example Ocelot will only match requests that have a matching url path and the query string starts with unitId=something. You can have other queries after this
239
239
but you must start with the matching parameter. Also Ocelot will swap the {unitId} parameter from the query string and use it in the downstream request path.
240
+
241
+
Security Options
242
+
^^^^^^^^^^^^^^^^
243
+
244
+
Ocelot allows you to manage multiple patterns for allowed/blocked IPs using the `IPAddressRange <https://github.com/jsakamoto/ipaddressrange>`_ package with `MPL-2.0 License <https://github.com/jsakamoto/ipaddressrange/blob/master/LICENSE>`_.
245
+
246
+
This feature is designed to allow greater IP management in order to include or exclude a wide IP range via CIDR notation or IP range.
247
+
The current patterns managed are the following:
248
+
249
+
* Single IP: :code:`192.168.1.1`
250
+
* IP Range: :code:`192.168.1.1-192.168.1.250`
251
+
* IP Short Range: :code:`192.168.1.1-250`
252
+
* IP Range with subnet: :code:`192.168.1.0/255.255.255.0`
253
+
* CIDR: :code:`192.168.1.0/24`
254
+
* CIDR for IPv6: :code:`fe80::/10`
255
+
* The allowed/blocked lists are evaluated during configuration loading
256
+
* The *ExcludeAllowedFromBlocked* property is intended to provide the ability to specify a wide range of blocked IP addresses and allow a subrange of IP addresses.
257
+
Default value: :code:`false`
258
+
* The absence of a property in **SecurityOptions** is allowed, it takes the default value.
0 commit comments