Imperva Cyber Community

Expand all | Collapse all

Update DB security policy through api

  • 1.  Update DB security policy through api

    Posted 07-23-2020 08:09

    Dear all,

     I want to create one Db security policy then update it frequently through API calls.

    here I can see only create and get options.

    does SecureSphere API supports this option?
    Your help is appreciated.

    Best Regards


    #APISecurity

    ------------------------------
    abdo yousri
    ------------------------------


  • 2.  RE: Update DB security policy through api

    Imperva Employee
    Posted 07-26-2020 06:24
    Hi Abdo,

    You are right, I don't see any examples of updating a DB Security Policy.
    Can you give me an example of what you are trying to achieve?
    I will be able to find out if that is possible then..
    Thanks,

    ------------------------------
    Ira Miga
    Imperva
    Knowledge Engineer
    ------------------------------



  • 3.  RE: Update DB security policy through api

    Posted 07-28-2020 00:00
    Hi Ira,

    Thanks for your response, I want to block users automatically when some external condition happen. So I decided to create a policy then update it with target users frequently.

    Regards,

    ------------------------------
    abdo yousri
    ------------------------------



  • 4.  RE: Update DB security policy through api

    Imperva Employee
    Posted 07-28-2020 10:06
    Hi Abdo,

    I've tried to check what can be done internally.
    As you suggested, there is no such option to update a policy (unfortunately).
    What can be done instead, it getting the list of all existing policies, then modifying the specific policy as needed and deleting the previous policy.
    I know it's not ideal, but it can be a solution for your needs for now until the API commands get updated.
    Thanks,

    ------------------------------
    Ira Miga
    Imperva
    Knowledge Engineer
    ------------------------------



  • 5.  RE: Update DB security policy through api

    Posted 07-28-2020 16:00
    Hi Ira,

    Thanks for all your assistance.

    Best Regards,

    ------------------------------
    abdo yousri
    ------------------------------



  • 6.  RE: Update DB security policy through api

    Imperva Employee
    Posted 07-29-2020 10:39
    Hi - Reading this thread, I think there may be a different approach needed that may work for you.
    if you create a lookup table of your users that you want to update, this can be updated via the API using the lookup data set update feature
    then in your security policy use the "lookup data set search" match criteria.​
    The added benefit is that you are not updating your security policy all the time.
    Regards

    ------------------------------
    Trevor Jackson
    ------------------------------



  • 7.  RE: Update DB security policy through api

    Imperva Employee
    Posted 07-29-2020 11:09
    Hi Trevor,

    I think it's a great approach and this will work.
    Thank you!

    ------------------------------
    Ira Miga
    Imperva
    Knowledge Engineer
    ------------------------------