gabstopper / smc-python

Forcepoint Security Management Center python library:(Moved to official Forcepoint repo)
https://github.com/Forcepoint/fp-NGFW-SMC-python
Apache License 2.0
29 stars 13 forks source link

Impossible to define max_prefix_length without define min_prefix_length #34

Closed meandus closed 6 years ago

meandus commented 6 years ago

min and max are not mandatory in SMC : good

if min is not defined, max is defined ==> object store has no max defined

gabstopper commented 6 years ago

Hi Meandus, I'm not entirely sure if I follow, but i'm assuming this has to do with an IP Prefix List? Testing on SMC 6.4.3, and smc-python 0.6.2 rc.8 (should be same as 0.6.1), it is possible to add a min prefix length without defining the max - which is the same as the SMC UI:

IPPrefixList.create(name='foo', entries=[{'subnet': '10.0.0.0/8', 'min_prefix_length': 16, 'action': 'deny'}])

image

Am I missing something? Thanks,

DLP

meandus commented 6 years ago

Hi, I would like to add max without min ;)

RÉMY

Le 30 septembre 2018 22:50:01 GMT+02:00, David LePage notifications@github.com a écrit :

Hi Meandus, I'm not entirely sure if I follow, but i'm assuming this has to do with an IP Prefix List? Testing on SMC 6.4.3, and smc-python 0.6.2 rc.8 (should be same as 0.6.1), it is possible to add a min prefix length without defining the max - which is the same as the SMC UI:

IPPrefixList.create(name='foo', entries=[{'subnet': '10.0.0.0/8',
'min_prefix_length': 16, 'action': 'deny'}])

image

Am I missing something? Thanks,

DLP

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/34#issuecomment-425750984

-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

gabstopper commented 6 years ago

Hi Remy, Which version of SMC do you currently use? Seems that in 6.4.4 this works adding max without min. Even specifying api_version 5.10 on 6.4.3 this works:

IPPrefixList.create(name='foo2345', entries=[{'subnet': '10.0.0.0/8', 'max_prefix_length': 16, 'action': 'deny'}])

image

meandus commented 6 years ago

Hi i have smc 6.4.3

RÉMY

Le 16 octobre 2018 02:32:54 GMT+02:00, David LePage notifications@github.com a écrit :

Hi Remy, Which version of SMC do you currently use? Seems that in 6.4.4 this works adding max without min. Even specifying api_version 5.10 on 6.4.3 this works:

IPPrefixList.create(name='foo2345', entries=[{'subnet': '10.0.0.0/8',
'max_prefix_length': 16, 'action': 'deny'}])

image

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/34#issuecomment-430060199

-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

gabstopper commented 6 years ago

Hi Remy, This also works in 6.4.3. Could you try this and let me know what error you might receive:

IPPrefixList.create(name='foo', entries=[{'subnet': '10.0.0.0/8', 'max_prefix_length': 16, 'action': 'deny'}])

image

gabstopper commented 6 years ago

Hi Remy, Please confirm this works for you. I validated that it does work on your current SMC 6.4.3 version.