4.7 Configuring Identity Reporting

After installing Identity Reporting, you can still modify many of the installation properties. To make changes, run the configuration update utility (configupdate.sh) file.

If you change any setting for Identity Reporting with the configuration tool, you must restart Tomcat for the changes to take effect. However, you do not need to restart the server after making changes in the web user interface for Identity Reporting.

4.7.1 Manually Adding the DataSource in the Identity Data Collection Services Page

  1. Log in to Identity Reporting application.

  2. Click Data Sources.

  3. Click Add.

  4. In the Add Data Source dialog box, click the Select from predefined list radio button.

  5. Select IDMDCSDataSource.

  6. Click Save.

4.7.2 Running Reports on an Oracle Database

Identity Reporting provides the ability to run reports against remote Oracle databases. Ensure that you have the ojbc8.jar file on the server where you are running the Oracle Database.

4.7.3 Manually Generating the Database Schema

To manually generate the database schema after installation, perform one of the following procedures for your database:

Configuring Create_rpt_roles_and_schemas.sql Schema against PostgreSQL Database

  1. Add the required roles to the database using the create_dcs_roles_and_schemas.sql and create_rpt_roles_and_schemas.sql SQLs located in C:\NetIQ\idm\apps\IdentityReporting\sql.

  2. Log in to PGAdmin as a postgres user.

  3. Run the Query tool.

  4. To create Create_rpt_roles_and_schemas and Create_dcs_roles_and_schemas procedures, copy the content from these SQLs to the Query tool and execute against the connected database.

  5. To create IDM_RPT_DATA, IDM_RPT_CFG, and IDMRPTUSER roles, execute the following commands in the given order:

    Select CREATE_DCS_ROLES_AND_SCHEMAS('<Set pwd for IDM_RPT_DATA>', '<Set pwd for IDMRPTUSER>');
    Select CREATE_RPT_ROLES_AND_SCHEMAS('<Set pwd for IDM_RPT_CFG>');

    For example, if the password for IDM_RPT_DATA, IDMRPTUSER, and IDM_RPT_CFG are password, password1, and password2 respectively, then you must execute the following commands:

    Select CREATE_DCS_ROLES_AND_SCHEMAS('password', 'password1');
    Select CREATE_RPT_ROLES_AND_SCHEMAS('password2');
  6. Copy the content of get_formatted_user_dn.sql from C:\NetIQ\idm\apps\IdentityReporting\sql to the Query tool and execute against the connected database.

    NOTE:The get_formatted_user_dn.sql function must be added manually when you select database schema creation option as File. If you select the database schema creation option as Now or Startup, the installer will add this function to the database.

Configuring Create_rpt_roles_and_schemas.sql Schema against Oracle Database

  1. Log in to SQL Developer as a database admin user.

  2. Create Create_rpt_roles_and_schemas by copying the content of the following SQL into SQL Developer and executing it against the connected database:

    alter session set "_ORACLE_SCRIPT"=true;
     
    CREATE OR REPLACE PROCEDURE create_rpt_roles_and_schemas(
       idm_rpt_cfg_password character varying)
    AUTHID CURRENT_USER
    AS
       cnt number;
    BEGIN
       /* Create user IDM_RPT_CFG if it does not exist */
       select count(*) into cnt from ALL_USERS WHERE USERNAME = 'IDM_RPT_CFG'; 
       IF cnt = 0 THEN
           execute immediate 'CREATE USER idm_rpt_cfg IDENTIFIED BY ' || idm_rpt_cfg_password;
           DBMS_OUTPUT.put_line('Created user idm_rpt_cfg');
       END IF;
     
       /* Grant rights to the idm_rpt_cfg user */
       execute immediate 'GRANT CREATE SESSION, CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER, UNLIMITED TABLESPACE to idm_rpt_cfg';
       DBMS_OUTPUT.put_line('Granted rights to user idm_rpt_cfg');
       execute immediate 'alter session set "_ORACLE_SCRIPT"=true';
       execute immediate 'alter session set "_ORACLE_SCRIPT"=false';
    END;
    /
    exec CREATE_RPT_ROLES_AND_SCHEMAS('Novell123');
    /
    alter session set "_ORACLE_SCRIPT"=false;
    /
  3. Login as a System user and create Create_dcs_roles_and_schemas by copying the content of the following SQL into SQL Developer and executing it against the connected database:

    alter session set "_ORACLE_SCRIPT"=true;
     
    CREATE OR REPLACE PROCEDURE create_dcs_roles_and_schemas(
       idm_rpt_data_password character varying,
       idmrptuser_password character varying)
    AUTHID CURRENT_USER
    AS
       cnt number;
    BEGIN
    /* Create user IDM_RPT_DATA if it does not exist already */
       select count(*) into cnt from ALL_USERS WHERE USERNAME = 'IDM_RPT_DATA'; 
       IF cnt = 0 THEN
           execute immediate 'CREATE USER idm_rpt_data IDENTIFIED BY ' || idm_rpt_data_password;
           DBMS_OUTPUT.put_line('Created user idm_rpt_data');
       END IF;
       
       /* Grant rights to the idm_rpt_data user */
       execute immediate 'GRANT CREATE SESSION, CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER, UNLIMITED TABLESPACE to idm_rpt_data';
       execute immediate 'GRANT CREATE PUBLIC SYNONYM to IDM_RPT_DATA';
       execute immediate 'GRANT SELECT ON DBA_SEGMENTS TO IDM_RPT_DATA';
       DBMS_OUTPUT.put_line('Granted rights to user idm_rpt_data');
       /* Create user IDMRPTUSER if it does not exist */
       select count(*) into cnt from ALL_USERS WHERE USERNAME = 'IDMRPTUSER'; 
       IF cnt = 0 THEN
           execute immediate 'CREATE USER idmrptuser IDENTIFIED BY ' || idmrptuser_password;
           DBMS_OUTPUT.put_line('Created user idmrptuser');
       END IF;
       
       /* Grant rights to the idmrptuser user */
       execute immediate 'GRANT CREATE SESSION to idmrptuser';
       execute immediate 'GRANT SELECT ON sys.all_tables TO idmrptuser';
       DBMS_OUTPUT.put_line('Granted rights to user idmrptuser');
    END;
    /
  4. To create IDM_RPT_CFG role, execute the following command:

    begin
    CREATE_RPT_ROLES_AND_SCHEMAS('<Set pwd for IDM_RPT_CFG>');
    end; 

    For example, if the password for IDM_RPT_CFG is password, then you must execute the following command:

    begin
    CREATE_RPT_ROLES_AND_SCHEMAS('password');
    end; 
  5. Copy the content of get_formatted_user_dn-oracle.sql to SQL Developer from C:\NetIQ\idm\apps\IdentityReporting\sql and execute against the connected database.

    NOTE:The get_formatted_user_dn-oracle.sql function must be manually added to the database when you select database schema creation option as File. If you select the database schema creation option as Now or Startup, the installer will add this function to the database.

Configuring Create_rpt_roles_and_schemas.sql Schema against MS SQL Database

  1. Execute delete_create_dcs_roles_and_schemas-mssql.sql and delete_get_formatted_user_dn-mssql.sql.

  2. Add the required roles to the database using create_dcs_roles_and_schemas.mssql and create_rpt_roles_and_schemas.mssql from C:\NetIQ\idm\apps\IdentityReporting\sql.

  3. Log in to SQL Developer as a database admin user.

  4. To create Create_rpt_roles_and_schemas and Create_dcs_roles_and_schemas procedures, copy the content from create_dcs_roles_and_schemas.mssql and create_rpt_roles_and_schemas.mssql to SQL Developer and execute against the connected database.

  5. To create IDM_RPT_DATA, IDM_RPT_CFG, and IDMRPTUSER roles, execute the following commands in the given order:

    execute CREATE_DCS_ROLES_AND_SCHEMAS '<Set pwd for IDM_RPT_DATA>', '<Set pwd for IDMRPTUSER>'

    execute CREATE_DCS_ROLES_AND_SCHEMAS '<Set pwd for IDM_RPT_DATA>', '<Set pwd for IDMRPTUSER>'

  6. Copy the content of get_formatted_user_dn.sql to SQL Developer from C:\NetIQ\idm\apps\IdentityReporting\sql and execute against the connected database.

Clearing the Database Checksums

  1. Locate the following .sql files in C:\NetIQ\idm\apps\IdentityReporting\sql.

    • DbUpdate-01-run-as-idm_rpt_cfg.sql

    • DbUpdate-02-run-as-idm_rpt_cfg.sql

    • DbUpdate-03-run-as-idm_rpt_data.sql

    • DbUpdate-04-run-as-idm_rpt_data.sql

    • DbUpdate-05-run-as-idm_rpt_data.sql

    • DbUpdate-06-run-as-idm_rpt_cfg.sql

  2. Clear the database checksums

    1. To run the clearchsum command with each .sql, append the following line at the beginning of each file:

      update DATABASECHANGELOG set MD5SUM = NULL; 

      The modified content should look similar to the following:

      -- *********************************************************************
      -- Update Database Script
      -- *********************************************************************
      -- Change Log: IdmDcsDataDropViews.xml
      -- Ran at: 2/23/18 5:17 PM
      -- Against: IDM_RPT_CFG@jdbc:oracle:thin:@192.99.170.20:1521/orcl
      -- Liquibase version: 3.5.1
      -- *********************************************************************
      update databasechangelog set md5sum = null; 
    2. Run each .sql with the corresponding user.

  3. Commit the changes to the database.

4.7.4 Deploying REST APIs for Identity Reporting

Identity Reporting incorporates several REST APIs that enable different features within the reporting functionality. These REST API uses the OAuth2 protocol for authentication.

On Tomcat, the rptdoc war and the dcsdoc war are automatically deployed when Identity Reporting is installed.

4.7.5 Connecting to a Remote PostgreSQL Database

If your PostgreSQL database is installed on a separate server, you need to change the default settings in the postgresql.conf and pg_hba.conf files in the remote database.

  1. Change the listening address in the postgresql.conf file.

    By default, PostgreSQL allows to listen for the localhost connection. It does not allow a remote TCP/IP connection. To allow a remoteTCP/IP connection, add the following entry to the C:\NetIQ\IDM\apps\postgres\data\postgresql.conf file:

    listen_addresses = '*'

    If you have multiple interfaces on the server, you can specify a specific interface to be listened.

  2. Add a client authentication entry to the pg_hba.conf file.

    By default, PostgreSQL accepts connections only from the localhost. It refuses remote connections. This is controlled by applying an access control rule that allows a user to log in from an IP address after providing a valid password (the md5 keyword). To accept a remote connection, add the following entry to the C:\NetIQ\IDM\apps\postgres\data\pg_hba.conf file.

    host all all 0.0.0.0/0 md5

    For example, 192.168.104.24/26 trust

    This works only for IPv4 addresses. For IPv6 addresses, add the following entry:

    host all all ::0/0 md5

    If you want to allow connection from multiple client computers on a specific network, specify the network address in the CIDR-address format in this entry.

    The pg_hba.conf file supports the following client authentication formats.

    • local database user authentication-method [authentication-option]

    • host database user CIDR-address authentication-method [authentication-option]

    • hostssl database user CIDR-address authentication-method [authentication-option]

    • hostnossl database user CIDR-address authentication-method [authentication-option]

    Instead of CIDR-address format, you can specify the IP address and the network mask in separate fields using the following format:

    • host database user IP-address IP-mask authentication-method [authentication-option]

    • hostssl database user IP-address IP-mask authentication-method [authentication-option]

    • hostnossl database user IP-address IP-mask authentication-method [authentication-option]

  3. Test the remote connection.

    1. Restart the remote PostgreSQL server.

    2. Log in to the server remotely using the username and password.

4.7.6 Post-Install steps for Identity Reporting

During installation, if you select startup or file option for the prompt when to create schema for Identity Reporting, you must manually add the data source from the Identity Reporting user interface. To add, navigate to the Data sources option, click Add, and then choose IDMDCSDataSource from the list.

Also, restart Tomcat after you have started it once to ensure that the available database runs properly.