- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Generic API, List Index
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generic API, List Index
Hello,
in dbedit, according to the documentation, you can edit elements of a list in the following way:
dbedit> modify network_objects My_FW interfaces:3:ipaddr IP_ADDRESS
This changes the attribute ipaddr of the 3rd interface.
How is this achieved which the gerneic api? How does one change attributes of a object in a list. Note that I am not asking how to change an ip address via api. My question is about general API syntax.
My use case is to go into a firewall object, navigate to the realmsForBlades section and change the userloginattr.
Something like
set generic-object uid="something'" realmsForBlades.1.directory.userloginattr SAMACOUNTNAME
, but that specific syntax does not work.
Probably, it's something like
set generic-object uid="something'" realmsForBlades.set .... ,but I cannot find the correct syntax anywhere.
Can anyone help?
Thanks
Christian Riede
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding (confirmed by R&D) is the generic-object API doesn't provide a way to edit these sorts of attributes.
See: https://community.checkpoint.com/t5/CloudGuard-IaaS/Azure-VMSS-Gaia-Certificates/m-p/80948#M1745
You can still use dbedit, however.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well. "generic"... ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
on dbedit:
# dbedit
Enter Server name (ENTER for 'localhost'):
Please enter a command, -h for help or -q to quit:
dbedit> modify network_objects <name-of-firewall> realmsForBlades:0:directory:userloginattr SAMACCOUNTNAME
failed to get field realmsForBlades
Reason: in objects_5.0.C, it's realms_for_blades, not realmsForBlades. And it's not SAMACCOUNTNAME, but sAMAccountName
the following works:
modify network_objects <name-of-firewall> realms_for_blades:0:directory:UserLoginAttr sAMAccountName
Now please Checkpoint, can we get rid of dbedit soon?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding support for indexes like in dbedit to the generic API seems to be a low hanging fruit and would solve the problem in a general way.
Having a specific API for all the objects is probably the long term solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So the question is: What happens first - get rid of dbedit by making the generic api functional or get rid of dbedit and generic api at the same time once the specific api is available? 😂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once there is formal API support for something, there's no need to have support for it via generic-object, which was never meant to be a formally supported API to begin with.
Which means: the second option is most likely.
