Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
rishrapsody1612
Contributor

Trigger external Email before publishing change with SmartTask

Team -

Requirement: We want to trigger an email from management server whenever any change gets published by the user. There should be a validation check for user's email address in order to trigger this task.

Can this be accomplished with SmartTask feature of Management server. Is there any alternate possible. We are using Management server to manage Multiple Domains using Quantum VNF Firewalls. Script should run locally on Management server.

0 Kudos
8 Replies
Tomer_Noy
Employee
Employee

Currently, SmartTasks can invoke two types of triggers:

  1. Script - this is a local script that you place on your Management server and will get the parameters from the SmartTask event. You can use the send_mail command, similarly to other features that can send an email (like rule alerts)
  2. Webhook - this calls a REST API of your choice. This can have the implementation to send the mail for you. There are various online services that you can integrate with (like Zapier or IFTTT) that can get the webhook and either send an email or do various other things.

We got feedback from the field that sending an email is a common case and should be easier to do. In R81.20 we are adding another built-in option to send email using an SMTP server that you will define in the SmartConsole UI. The returning Workflow feature will use this capability to send emails to potential approvers.

Note that for sending an email it will probably be better to use a "post publish" task and not "pre publish" since you are just looking to send an email, not affect the publish operation, so there is no need to wait for the email sending to complete before completing the publish.

0 Kudos
rishrapsody1612
Contributor

Thanks for the details. I agree that the trigger should be Post-Publish. However, for my requirement, email should only trigger if the user's email suffix matches a regex. Is it possible to get username(publishing the change) within custom bash script(script to verify user and then send email)? 

0 Kudos
Tomer_Noy
Employee
Employee

If you want to do custom logic to decide whether to send an email, you should be able to do that with a script or webhook using an "After Publish" SmartTask.

Basically, when a SmartTask triggers, it will include a lot of information on the action that happened. For Before/After Publish that includes the admin that made the change and the details of what he changed.

You can see below an example payload from a simple session that created a host "host3" and added it to a rule. You can also see in the JSON the "admin" reference which was the name of my user, which you could use to decide whether to invoke the command to send an email.

If you want to experiment yourself, it's easy to do it with Demo mode. You can create a target URL using a service like RequestBin and set that URL in a SmartTask. After that, triggers will invoke that URL and you can see the data in the RequestBin site.

 

{
    "event":{
        "method":"POST",
        "path":"/",
        "query":{
            
        },
        "client_ip":"18.192.124.124",
        "url":"https://eocpmrftf4k8fs.m.pipedream.net/",
        "headers":{
            "host":"eocpmrftf4k8fs.m.pipedream.net",
            "content-length":"15230",
            "accept":"application/json",
            "content-type":"application/json",
            "user-agent":"Check Point Security Management Server SmartTask",
            "accept-encoding":"gzip,deflate"
        },
        "body":{
            "session":{
                "publish-time":{
                    "iso-8601":"2022-03-10T14:09+0000",
                    "posix":1646921354432
                },
                "user-name":"admin",
                "domain-info":{
                    "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                    "domain-type":"domain",
                    "name":"SMC User"
                },
                "session-name":"admin@10-Mar-22",
                "session-description":"My test webhook session",
                "published":true,
                "session-uid":"5a17b22e-3e24-4038-acb1-34a898dea65e"
            },
            "operations":{
                "modified-objects":[
                    {
                        "old-object":{
                            "destination-negate":false,
                            "destination":[
                                {
                                    "nat-settings":{
                                        "auto-rule":false
                                    },
                                    "interfaces":[
                                        
                                    ],
                                    "comments":"",
                                    "color":"black",
                                    "icon":"Objects/host",
                                    "meta-info":{
                                        "creator":"admin",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-28T14:32+0000",
                                            "posix":1624890755572
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-28T14:32+0000",
                                            "posix":1624890755572
                                        },
                                        "lock":"unlocked",
                                        "last-modifier":"admin"
                                    },
                                    "type":"host",
                                    "tags":[
                                        
                                    ],
                                    "uid":"97c85663-82f1-4cd3-9dbe-b0c6ae31aaf3",
                                    "ipv4-address":"151.20.4.15",
                                    "domain":{
                                        "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                        "domain-type":"domain",
                                        "name":"SMC User"
                                    },
                                    "name":"Public FTP Server",
                                    "read-only":false
                                }
                            ],
                            "meta-info":{
                                "creator":"admin",
                                "validation-state":"ok",
                                "last-modify-time":{
                                    "iso-8601":"2021-06-28T14:34+0000",
                                    "posix":1624890845080
                                },
                                "creation-time":{
                                    "iso-8601":"2021-06-28T14:34+0000",
                                    "posix":1624890844893
                                },
                                "lock":"unlocked",
                                "last-modifier":"admin"
                            },
                            "source":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "type":"access-rule",
                            "content-direction":"any",
                            "layer":"2d78c122-64cf-4489-b6af-0548154ae464",
                            "content":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "enabled":true,
                            "uid":"34b3fff9-11fd-4121-b21d-65d63356fffd",
                            "action":{
                                "uid":"ea28da66-c5ed-11e2-bc66-aa5c6188709b",
                                "comments":"Apply inline layer in case of rule match",
                                "color":"none",
                                "customFields":null,
                                "domain":{
                                    "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                    "domain-type":"data domain",
                                    "name":"Check Point Data"
                                },
                                "name":"Inner Layer",
                                "meta-info":{
                                    "creator":"System",
                                    "validation-state":"ok",
                                    "last-modify-time":{
                                        "iso-8601":"2021-06-26T02:47+0000",
                                        "posix":1624675675220
                                    },
                                    "creation-time":{
                                        "iso-8601":"2021-06-26T02:47+0000",
                                        "posix":1624675675220
                                    },
                                    "last-modifier":"System"
                                },
                                "icon":"ApplicationFirewall/Rulebase",
                                "type":"Global",
                                "tags":[
                                    
                                ]
                            },
                            "track":{
                                "per-session":false,
                                "per-connection":false,
                                "alert":"none",
                                "enable-firewall-session":false,
                                "accounting":false,
                                "type":{
                                    "uid":"29e53e3d-23bf-48fe-b6b1-d59bd88036f9",
                                    "comments":"No tracking.",
                                    "color":"none",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"None",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674677
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674677
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsNone",
                                    "type":"Track",
                                    "tags":[
                                        
                                    ]
                                }
                            },
                            "service-resource":"",
                            "source-negate":false,
                            "comments":"",
                            "service-negate":false,
                            "inline-layer":{
                                "implicit-cleanup-action":"drop",
                                "shared":false,
                                "comments":"",
                                "color":"black",
                                "content-awareness":true,
                                "icon":"ApplicationFirewall/rulebase",
                                "meta-info":{
                                    "creator":"admin",
                                    "validation-state":"ok",
                                    "last-modify-time":{
                                        "iso-8601":"2021-06-28T14:33+0000",
                                        "posix":1624890806810
                                    },
                                    "creation-time":{
                                        "iso-8601":"2021-06-28T14:33+0000",
                                        "posix":1624890806069
                                    },
                                    "lock":"unlocked",
                                    "last-modifier":"admin"
                                },
                                "type":"access-layer",
                                "detect-using-x-forward-for":false,
                                "applications-and-url-filtering":false,
                                "tags":[
                                    
                                ],
                                "uid":"546535a6-5154-4110-91f8-ec4dd53dc186",
                                "firewall":true,
                                "domain":{
                                    "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                    "domain-type":"domain",
                                    "name":"SMC User"
                                },
                                "name":"Public FTP Layer",
                                "parent-layer":"2d78c122-64cf-4489-b6af-0548154ae464",
                                "read-only":false,
                                "mobile-access":false
                            },
                            "vpn":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "service":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "domain":{
                                "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                "domain-type":"domain",
                                "name":"SMC User"
                            },
                            "content-negate":false,
                            "name":"Public FTP Access",
                            "time":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "install-on":[
                                {
                                    "uid":"6c488338-8eec-4103-ad21-cd461ac2c476",
                                    "comments":"The policy target gateways",
                                    "color":"none",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Policy Targets",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674582
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674582
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"Global",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "action-settings":{
                                
                            },
                            "custom-fields":{
                                "field-1":"",
                                "field-2":"",
                                "field-3":""
                            }
                        },
                        "new-object":{
                            "destination-negate":false,
                            "destination":[
                                {
                                    "nat-settings":{
                                        "auto-rule":false
                                    },
                                    "interfaces":[
                                        
                                    ],
                                    "comments":"",
                                    "color":"black",
                                    "icon":"Objects/host",
                                    "meta-info":{
                                        "creator":"admin",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-28T14:32+0000",
                                            "posix":1624890755572
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-28T14:32+0000",
                                            "posix":1624890755572
                                        },
                                        "lock":"unlocked",
                                        "last-modifier":"admin"
                                    },
                                    "type":"host",
                                    "tags":[
                                        
                                    ],
                                    "uid":"97c85663-82f1-4cd3-9dbe-b0c6ae31aaf3",
                                    "ipv4-address":"151.20.4.15",
                                    "domain":{
                                        "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                        "domain-type":"domain",
                                        "name":"SMC User"
                                    },
                                    "name":"Public FTP Server",
                                    "read-only":false
                                },
                                {
                                    "nat-settings":{
                                        "auto-rule":false
                                    },
                                    "interfaces":[
                                        
                                    ],
                                    "comments":"",
                                    "color":"black",
                                    "icon":"Objects/host",
                                    "meta-info":{
                                        "creator":"admin",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2022-03-10T14:08+0000",
                                            "posix":1646921307677
                                        },
                                        "creation-time":{
                                            "iso-8601":"2022-03-10T14:08+0000",
                                            "posix":1646921307677
                                        },
                                        "lock":"unlocked",
                                        "last-modifier":"admin"
                                    },
                                    "type":"host",
                                    "tags":[
                                        
                                    ],
                                    "uid":"950e13b7-58b7-4ed8-9a18-08a82611b196",
                                    "ipv4-address":"3.3.3.3",
                                    "domain":{
                                        "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                        "domain-type":"domain",
                                        "name":"SMC User"
                                    },
                                    "name":"host3",
                                    "read-only":false
                                }
                            ],
                            "meta-info":{
                                "creator":"admin",
                                "validation-state":"ok",
                                "last-modify-time":{
                                    "iso-8601":"2022-03-10T14:08+0000",
                                    "posix":1646921337330
                                },
                                "creation-time":{
                                    "iso-8601":"2021-06-28T14:34+0000",
                                    "posix":1624890844893
                                },
                                "lock":"unlocked",
                                "last-modifier":"admin"
                            },
                            "source":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "type":"access-rule",
                            "content-direction":"any",
                            "layer":"2d78c122-64cf-4489-b6af-0548154ae464",
                            "content":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "enabled":true,
                            "uid":"34b3fff9-11fd-4121-b21d-65d63356fffd",
                            "action":{
                                "uid":"ea28da66-c5ed-11e2-bc66-aa5c6188709b",
                                "comments":"Apply inline layer in case of rule match",
                                "color":"none",
                                "customFields":null,
                                "domain":{
                                    "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                    "domain-type":"data domain",
                                    "name":"Check Point Data"
                                },
                                "name":"Inner Layer",
                                "meta-info":{
                                    "creator":"System",
                                    "validation-state":"ok",
                                    "last-modify-time":{
                                        "iso-8601":"2021-06-26T02:47+0000",
                                        "posix":1624675675220
                                    },
                                    "creation-time":{
                                        "iso-8601":"2021-06-26T02:47+0000",
                                        "posix":1624675675220
                                    },
                                    "last-modifier":"System"
                                },
                                "icon":"ApplicationFirewall/Rulebase",
                                "type":"Global",
                                "tags":[
                                    
                                ]
                            },
                            "track":{
                                "per-session":false,
                                "per-connection":false,
                                "alert":"none",
                                "enable-firewall-session":false,
                                "accounting":false,
                                "type":{
                                    "uid":"29e53e3d-23bf-48fe-b6b1-d59bd88036f9",
                                    "comments":"No tracking.",
                                    "color":"none",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"None",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674677
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674677
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsNone",
                                    "type":"Track",
                                    "tags":[
                                        
                                    ]
                                }
                            },
                            "service-resource":"",
                            "source-negate":false,
                            "comments":"",
                            "service-negate":false,
                            "inline-layer":{
                                "implicit-cleanup-action":"drop",
                                "shared":false,
                                "comments":"",
                                "color":"black",
                                "content-awareness":true,
                                "icon":"ApplicationFirewall/rulebase",
                                "meta-info":{
                                    "creator":"admin",
                                    "validation-state":"ok",
                                    "last-modify-time":{
                                        "iso-8601":"2021-06-28T14:33+0000",
                                        "posix":1624890806810
                                    },
                                    "creation-time":{
                                        "iso-8601":"2021-06-28T14:33+0000",
                                        "posix":1624890806069
                                    },
                                    "lock":"unlocked",
                                    "last-modifier":"admin"
                                },
                                "type":"access-layer",
                                "detect-using-x-forward-for":false,
                                "applications-and-url-filtering":false,
                                "tags":[
                                    
                                ],
                                "uid":"546535a6-5154-4110-91f8-ec4dd53dc186",
                                "firewall":true,
                                "domain":{
                                    "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                    "domain-type":"domain",
                                    "name":"SMC User"
                                },
                                "name":"Public FTP Layer",
                                "parent-layer":"2d78c122-64cf-4489-b6af-0548154ae464",
                                "read-only":false,
                                "mobile-access":false
                            },
                            "vpn":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "service":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "domain":{
                                "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                                "domain-type":"domain",
                                "name":"SMC User"
                            },
                            "content-negate":false,
                            "name":"Public FTP Access",
                            "time":[
                                {
                                    "primaryManagement":false,
                                    "uid":"97aeb369-9aea-11d5-bd16-0090272ccb30",
                                    "comments":null,
                                    "color":"black",
                                    "display-name":"Any",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Any",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675656251
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"CpmiAnyObject",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "install-on":[
                                {
                                    "uid":"6c488338-8eec-4103-ad21-cd461ac2c476",
                                    "comments":"The policy target gateways",
                                    "color":"none",
                                    "customFields":null,
                                    "domain":{
                                        "uid":"a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
                                        "domain-type":"data domain",
                                        "name":"Check Point Data"
                                    },
                                    "name":"Policy Targets",
                                    "meta-info":{
                                        "creator":"System",
                                        "validation-state":"ok",
                                        "last-modify-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674582
                                        },
                                        "creation-time":{
                                            "iso-8601":"2021-06-26T02:47+0000",
                                            "posix":1624675674582
                                        },
                                        "last-modifier":"System"
                                    },
                                    "icon":"General/globalsAny",
                                    "type":"Global",
                                    "tags":[
                                        
                                    ]
                                }
                            ],
                            "action-settings":{
                                
                            },
                            "custom-fields":{
                                "field-1":"",
                                "field-2":"",
                                "field-3":""
                            }
                        }
                    }
                ],
                "deleted-objects":[
                    
                ],
                "added-objects":[
                    {
                        "nat-settings":{
                            "auto-rule":false
                        },
                        "interfaces":[
                            
                        ],
                        "comments":"",
                        "color":"black",
                        "icon":"Objects/host",
                        "meta-info":{
                            "creator":"admin",
                            "validation-state":"ok",
                            "last-modify-time":{
                                "iso-8601":"2022-03-10T14:08+0000",
                                "posix":1646921307677
                            },
                            "creation-time":{
                                "iso-8601":"2022-03-10T14:08+0000",
                                "posix":1646921307677
                            },
                            "lock":"unlocked",
                            "last-modifier":"admin"
                        },
                        "type":"host",
                        "tags":[
                            
                        ],
                        "uid":"950e13b7-58b7-4ed8-9a18-08a82611b196",
                        "ipv4-address":"3.3.3.3",
                        "domain":{
                            "uid":"41e821a0-3720-11e3-aa6e-0800200c9fde",
                            "domain-type":"domain",
                            "name":"SMC User"
                        },
                        "name":"host3",
                        "read-only":true
                    }
                ]
            }
        }
    },
    "context":{
        "id":"26CIuj6U5sLLQBs95BZaDeFKtZu",
        "ts":"2022-03-10T14:09:25.934Z",
        "pipeline_id":null,
        "workflow_id":"p_A2CqGAk",
        "deployment_id":"d_4nsvE7y",
        "source_type":"COMPONENT",
        "verified":false,
        "hops":null,
        "test":false,
        "replay":false,
        "owner_id":"u_DKhvnBP",
        "platform_version":"3.23.0",
        "workflow_name":"RequestBin",
        "resume":null,
        "trace_id":"26CIuheDgMGneTwundN4TZGhLST"
    }
}

 

 

rishrapsody1612
Contributor

How do you send the published session details as json payload when using Webhook requests. Should anything be included in custom data?

I am able to trigger email using IFTTT(email when webhook is received). I want to get session information sent across since I want to develop a logic for user name and bunch of other fields.

or even easier, if that logic can be added within Management server when a webhook HTTPs post is triggerred.

0 Kudos
Tomer_Noy
Employee
Employee

The published session details are added automatically. You don't need to put anything in the custom data.

If you're not seeing the info, check that you target webhook URL is set to POST and not GET.

0 Kudos
rishrapsody1612
Contributor

Updated my Webhook to include JSON now. Able to receive json payload now,

Also - It seems that curl cannot be installed on mgmt server. If I want to write bash script to develop some logic on the published session details and then trigger webhook using curl, how do I achieve that?

If this is not possible, how do i filter data before triggering  Webhook Web request from Management server Event(instead of filtering json data once received by IFTTT applet - which isn't free)

 

0 Kudos
rishrapsody1612
Contributor

.

0 Kudos
rishrapsody1612
Contributor

Updated my Webhook to include JSON now. Able to receive json payload now,

Also - It seems that curl cannot be installed on mgmt server. If I want to write bash script to develop some logic on the published session details and then trigger webhook using curl, how do I achieve that?

If this is not possible, how do i filter data before triggering  Webhook Web request from Management server Event(instead of filtering json data once received by IFTTT applet - which isn't free)

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events