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 14 forks source link

How add Exceptions on Phase-1ID in Engine Endpoints #80

Open fgazelot opened 8 months ago

fgazelot commented 8 months ago

Hello,

I dont know if I missed something, I have to create a exceptions on a Phase-1 ID (change default IP addres ID to a email ID to a specific PolicyVPN.

However, i dont find a way to make this :

e = Engine("ClusterFW-1")

endpoints = list(e.vpn_endpoint.all())

ep = endpoints[0]

pprint(vars(ep.data))
{'_etag': '"MTMzOTgwMjExNjk3NjE1MDE4OTQ0"',
 'data': {'address': '10.0.10.1',
          'connection_type_ref': 'http://X.X.X.X:8082/6.10/elements/connection_type/4',
          'deducted_name': '10.0.10.1',
          'dynamic': False,
          'enabled': True,
          'force_nat_t': False,
          'ike_phase1_id_type': 3,
          'ipsec_vpn': True,
          'key': 1339,
          'link': [{'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339',
                    'rel': 'self',
                    'type': 'internal_endpoint'},
                   {'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339/history',
                    'rel': 'history'},
                   {'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339/lock',
                    'rel': 'lock'}],
          'locked': False,
          'nat_t': True,
          'physical_interface': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/physical_interface/1337',
          'read_only': False,
          'ssl_vpn_portal': True,
          'ssl_vpn_tunnel': True,
          'system': False,
          'system_key': -1,
          'trashed': False,
          'udp_encapsulation': False}}

In this exemple, the exceptions is created on this printed endpoint, but we dont saw data dedicated to that ...

Information of my environement :

session.api_version = 6.10

pip list | grep SMC                                                                                                                                                             
fp-NGFW-SMC-python 1.0.21

Thank you in advance for your help.

Kind regards, Fgazelot

sebbbastien commented 8 months ago

[like] Sébastien Boulet reacted to your message:


From: fgazelot @.> Sent: Wednesday, October 18, 2023 11:09:52 AM To: gabstopper/smc-python @.> Cc: Subscribed @.***> Subject: [gabstopper/smc-python] How add Exceptions on Phase-1ID in Engine Endpoints (Issue #80)

Hello,

I dont know if I missed something, I have to create a exceptions on a Phase-1 ID (change default IP addres ID to a email ID to a specific PolicyVPN.

However, i dont find a way to make this :

e = Engine("ClusterFW-1")

endpoints = list(e.vpn_endpoint.all())

ep = endpoints[0]

pprint(vars(ep.data)) {'_etag': '"MTMzOTgwMjExNjk3NjE1MDE4OTQ0"', 'data': {'address': '10.0.10.1', 'connection_type_ref': 'http://X.X.X.X:8082/6.10/elements/connection_type/4', 'deducted_name': '10.0.10.1', 'dynamic': False, 'enabled': True, 'force_nat_t': False, 'ike_phase1_id_type': 3, 'ipsec_vpn': True, 'key': 1339, 'link': [{'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339', 'rel': 'self', 'type': 'internal_endpoint'}, {'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339/history', 'rel': 'history'}, {'href': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/internal_gateway/1340/internal_endpoint/1339/lock', 'rel': 'lock'}], 'locked': False, 'nat_t': True, 'physical_interface': 'http://X.X.X.X:8082/6.10/elements/fw_cluster/5588/physical_interface/1337', 'read_only': False, 'ssl_vpn_portal': True, 'ssl_vpn_tunnel': True, 'system': False, 'system_key': -1, 'trashed': False, 'udp_encapsulation': False}}

In this exemple, the exceptions is created on this printed endpoint, but we dont saw data dedicated to that ...

Information of my environement :

session.api_version = 6.10

pip list | grep SMC fp-NGFW-SMC-python 1.0.21

Thank you in advance for your help.

Kind regards, Fgazelot

— Reply to this email directly, view it on GitHubhttps://github.com/gabstopper/smc-python/issues/80, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIVVG5BB54OWGJEURA62FDX762IBAVCNFSM6AAAAAA6FKOXTWVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2DSNBYGMYDSNY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

fgazelot commented 8 months ago

Hello,

I oppened this issue in the correct repository : https://github.com/Forcepoint/fp-NGFW-SMC-python/issues/51

We can close this one, i guess.

Kind regards, FGazelot

gabstopper commented 8 months ago

Thanks - sorry for the confusion on repos. I'll close this one since we've migrated the code to Forcepoint.