|
| 1 | +# Access Extension Notification Scheduled Task |
| 2 | + |
| 3 | +This asset contains the code and deployment items for a scheduled task designed to notify users of any expiring access and to allow them to extend expiration dates by a set number of days. This is achieved by including unique actionable links in the notification emails. |
| 4 | + |
| 5 | +The scheduled task needs to be used in conjunction with the Extend Access WebService in order to provide the end-to-end access extension functionality. |
| 6 | + |
| 7 | +Developed on and compatible with OIG 11g R2 PS3 and above. |
| 8 | + |
| 9 | +## When to use this asset? |
| 10 | + |
| 11 | +When there's a need to provide or demonstrate the functionality described above or something similar, which can be adapted from the provided code. |
| 12 | + |
| 13 | +## How to use this asset? |
| 14 | + |
| 15 | +### Pre-requisites and dependencies |
| 16 | + |
| 17 | +The scheduled task uses the `javax.mail` interface in order to send emails, and also parts of the `jaxb-api` interface for generating UUIDs. |
| 18 | + |
| 19 | +As such, the following jar files are required as dependencies and need to be used during the build process, **and also uploaded as third party jars** to the OIM deployment node: |
| 20 | +- javax.mail.jar |
| 21 | +- jaxb-api-2.3.1.jar |
| 22 | + |
| 23 | +### Building and deployment |
| 24 | + |
| 25 | +Here's a short build and deployment checklist: |
| 26 | + |
| 27 | +1. Use an SQL client, such as SQLDeveloper, to connect to the OIM DB schema (e.g. DEV_OIM) and execute `EXTEND_ACCESS.sql` to create the required data table |
| 28 | +2. Import any additional artifacts using deployment manager, such as the `Access_Extension_Template.xml` file |
| 29 | +3. Generate a jar file containing the sample code. |
| 30 | +4. Upload the jar file to an OIG environment using OIG's command line "Jar Upload" utility. Also remember to upload the dependencies as "3. ThirdParty" jars. |
| 31 | +5. Use the Enterprise Manager web interface to upload the scheduled task metadata/definition into the MDS repository. |
| 32 | +6. Create a scheduled task in OIG based on the uploaded definition. |
| 33 | + |
| 34 | +Please see the useful link below for detailed build and deployment steps. |
| 35 | + |
| 36 | +### Executing the scheduled task |
| 37 | + |
| 38 | +The following items need to be populated as part of the scheduled job parameters: |
| 39 | +- Days Before Expiration: Number of days before the email is sent, e.g. 7 |
| 40 | +- Extension Days: Extension days to be added to existing end dates, e.g. 60 |
| 41 | +- Extension Link Text: Text to be included part of the actionable extension links, e.g. Click here to extend access |
| 42 | +- REST WS Endpoint URL: Endpoint URL for the access extension REST webservice, e.g. http://127.0.0.1:14000/extend_access/rest |
| 43 | +- Email Template Name: Email template name for the email, e.g. Access_Extension_Template |
| 44 | +- SMTP Mail Server Hostname: Hostname of the SMTP Mail server, e.g. localhost |
| 45 | +- SMTP Mail Server TLS: Enable or disable SMTP TLS, e.g. No |
| 46 | +- SMTP Mail Server Port: Port of the SMTP Mail server, e.g. 25 |
| 47 | + |
| 48 | +[Consult this section](https://docs.oracle.com/en/middleware/idm/identity-governance/12.2.1.4/omusg/managing-jobs-1.html#GUID-71BB3623-AEE2-4F64-BBD4-D921DCA39D7C) on how to manually start or schedule a job. |
| 49 | + |
| 50 | +## Useful Links |
| 51 | + |
| 52 | +[Oracle Identity Governance developer's guide - Developing scheduled tasks](https://docs.oracle.com/en/middleware/idm/identity-governance/12.2.1.4/omdev/developing-scheduled-tasks.html#GUID-F62EF833-1E70-41FC-9DCC-C1EAB407D151) |
| 53 | + |
| 54 | +# License |
| 55 | + |
| 56 | +Copyright (c) 2023 Oracle and/or its affiliates. |
| 57 | + |
| 58 | +Licensed under the Universal Permissive License (UPL), Version 1.0. |
| 59 | + |
| 60 | +See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details. |
0 commit comments