<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00007rpCTJCA2Okta Identity EngineWorkflowsAnswered2024-04-15T13:02:24.000Z2022-07-27T19:37:53.000Z2022-07-28T19:56:06.000Z

k5hmx (k5hmx) asked a question.

would like to create email activity based on security report

is it possible to setup an email that triggers when something is found on this report? typically it is blank / null, but it would be cool if we could either setup an email alert, or trigger a test so we can setup the alert in the SIEM..

Image is not available


  • Hey @k5hmx (k5hmx)​,

     

    I'd take a look at doing something like this:

    screenshot of Okta Workflow 

    Here's how I set this up:

    • Use a Scheduled Flow - set it to run at your desired frequency.
    • Use a Date - Subtract card to generate the time that the flow last ran...
      • e.g., if the flow runs every 24 hours, subtract a day... if it runs every 4 hours, subtract 4 hours, etc.
      • this allows us to select the time window we're searching in, so that we don't continue to pick up the same events in subsequent searches
    • Use an Okta - Search System Logs card with the "Event Type" and "Since" inputs selected.
      • use security.threat.detected for the event type, and drag the output from your Date - Subtract into the since input.

     

    I've attached a sample flow for you to take a look at as well. You can import it into your Workflows environment.

     

    Some notes:

    • If 'security.threat.detected' were available as an Okta Event Hook, my preference would be to set the flow up to run off of that trigger rather than use a scheduling (polling) design that looks for events that already happened. A webhook would be more immediate. If that event becomes Event Hook eligible in the future, I would use that instead.
    • In my example, I'm only looking for the first matching event in the Okta - Search System Logs card, meaning the card will return a maximum of one record. In the case that you may have multiple events you wish to handle, you'll need to use a List function to handle each event. Here's a video in case you need a refresher on that: https://www.youtube.com/watch?v=H-E_ONzYNwA&list=PLSAWywyhniCMgo-IPIR-tleTPgNYiJwZn&index=19

     

     

    As always, feel free to join us in a Community Office Hours session where you can join the Okta team and other customers to discuss what you're working on, get help with roadblocks, or just listen in and see what's happening. You can book anytime here: https://calendly.com/oktaworkflows - and there is also a link from the homepage of Workflows:

    office hours link

    Expand Post
  • k5hmx (k5hmx)

    thx for this feedback. was also wondering if it is possible to accomplish this through api and maybe some python / ruby / go code. but maybe this is the way to automate Okta..

    • I highly recommend you explore Okta Workflows for these types of automations. It was very easy to build the flow that I shared with you, opening up the ability to build automations to members of your org who might not have much experience with scripting or programming languages. Additionally, letting Okta host and manage your automations rather than having to maintain your own custom scripts is another way Workflows makes life easier.

       

      If you're not familiar with the product, you can check out a quick demo here - we have free training and lots of other materials to help get started.

       

      If you wanted to write your own script, it shouldn't be too hard. We're just using Workflows to call the Okta API under the hood, so you could certainly make the same call with a script.

       

      For instance, a cURL would look something like:

       

      curl -v -X GET \

      -H "Accept: application/json" \

      -H "Content-Type: application/json" \

      -H "Authorization: SSWS ${api_token}" \

      "https://${yourOktaDomain}/api/v1/logs?filter=event_type+eq+%22security.threat.detected%22"

       

      See here for more API info: https://developer.okta.com/docs/reference/api/system-log/#examples

       

      Expand Post
This question is closed.
Loading
would like to create email activity based on security report