Monday, October 11, 2010

OIM Howto: Date based enable/disable of resources

In some cases you don't want to give a user access to a resource immediately but rather start the access at a certain point in time. In a similar fashion you may not want to give the access permanently but rather up until a certain end date.

There is a number of ways to implement this but I would recommend using the following approach:
  1. Add start date and end date to the process form.
  2. As a part of the provisioning process add a step that disables the resource if the start date hasn't happened yet or end date has passed.
  3. Create a scheduled task that checks all provisioned resources of this type and enables/disables as appropriate given the start date and end dates.
Another option is to hold the object in provisioning state until the start date hits (add a task to the provisioning process that checks the date, let the scheduled task re execute the provisioning task).

2 comments:

  1. Hi Martin,

    Nice info. Thx.

    Cheers,
    Vijay Chinnasamy

    ReplyDelete
  2. So what would the code look like for the scheduled task? I'm new to the OIM API so I'm not sure how to look at all the resources of a certain type, and enable/disable them in Java. Thanks.

    ReplyDelete