TEST: Difference between revisions

From Calidus HUB
No edit summary
(#tagtest)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="noprint">
= 325145 Device Audit Log Improvements =
{{#vardefine:Client|TEST}}
{{#vardefine:ClientName|Testing Customer}}
{{#vardefine:System|''CALIDUS'' ePOD}}
{{#vardefine:Doc_Title|Test Document}}
{{#vardefine:Version|0.1}}
{{#vardefine:Date|25th January 2019}}
{{#vardefine:Reference|123456 TEST01}}
{{#vardefine:Year|2019}}
{{ #vardefine: Figure | 0 }}{{ #vardefine: Example | 0 }}
<!--
Sample Xref:
{{Xref
|Type=Figure
|Num={{ #vardefineecho: Figure| {{ #expr: {{ #var: Figure}} + 1 }} }}
|Text=Data Upload - Import screen.}}
-->
</div>
{{Doc_TitleNew
|Client={{#var:ClientName}}
|System={{#var:System}}
|Title={{#var:Doc_Title}}
|Reference=FS {{#var:Reference}}
|Version={{#var:Version}}
|Date={{#var:Date}}
|Year={{#var:Year}}
}}


<!-- TOC -->
== Requirements ==
<div class="noprint">
* Send the device audit log through a new web service method, rather than through email.
= FUNCTIONAL OVERVIEW  =
* Request that the device send through the audit log by making a setting on the server.
== Client Requirement  ==
* Allow configuration of the audit log:
<!-- Include a statement describing the client’s work request requirement. -->
** Per device and default for the system.
Statement
** What is to be audited (types of audit log messages).
** Number of records to store on the audit log.
* Admin screen available to OBSL users only, to configure audit logs and request them to be sent (Devices screen).


== Solution Overview  ==
<!-- Include a summary of the solution explaining how the client’s requirement will be delivered.  This might be as a result of software development or system configuration and implementation. -->
Statement


== Overview of Solution ==
=== Device Audit Log Web Service Method ===
The PDA Audit Log screen will be modified to build a message onto the pending queue, containing all the logged data.


== Scope  ==
A new message request will be created for this (AUDIT_LOG).
<!-- This change will be applied to system version (enter the version) on (enter the test database e.g. CONTST) and once approved (enter the production database e.g.: CONPRD).


Describe the scope of work and be clear about what is included and what is excluded. -->
Structure to be defined, but it is assumed this will follow the structure of the existing XF_AUDIT device table.
Statement


The server PDA web service will be modified to receive this message and save this to a file in a server-side folder. The folder will be defined as a system web configuration parameter. The name to be confirmed, but will likely comprise:
* "AUDIT_LOG_"
* device_id
* date
* time
* ".XML"


== Impact ==
<!-- Identify the potential consequences of the changes described in this Functional Specification.


Relating to the scope of work, document any identified dependencies necessary to maintain consistency of the solution.  Highlight those not addressed within this solution specification.
=== Request Device Audit Log ===
The EPOD_DEVICE table will be modified to add the following fields:
* EPD_AUDIT_LOG_REQUESTED_IND - int default 0
* EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
* EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0
* EPD_LAST_AUDIT_LOG_RECEIVED_DATE - int default 0
* EPD_LAST_AUDIT_LOG_RECEIVED_TIME - int default 0
* EPD_LAST_AUDIT_LOG_RECEIVED - nvarchar(100) NULL


Include any considered and related opportunities for improvement not addressed within this solution specification. -->
The server PDA web service will be modified to recognise this flag on the following existing web service methods:
Statement
* LOGON_REQUEST
* AUTO_UPDATE_REQUEST


The device will be extracted and, if EPD_AUDIT_LOG_REQUESTED_IND is set to 1, the following additional information will be returned on the message:
* EPD_AUDIT_LOG_REQUESTED_IND - int default 0
* EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
* EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0


<!-- NEW PAGE -->
Structure to be defined, but it is assumed this will follow the structure of the existing EPOD_DEVICE table.
= CONFIGURATION SET-UP  =
== Pre-requisites  ==
<!-- Think about dependent functionality or configuration that is required to support this deliverable and describe here. -->
Statement




== Menu Structure  ==
The device will be modified to check the responses to these messages (including a grace logon) and check the value of the indicator. If the flag is set to 1, the process will check the last requested date and time is different to the last request received. If so, the device will call the same code as the Audit screen i.e. generate a new AUDIT_LOG web service call.
<!-- Describe how the menu system will change to accommodate this requirement if relevant. -->
Statement




== Data  ==
The server PDA web service AUDIT_LOG method will be modified to extract the device from the message and update the following fields:
<!-- Document any configuration data set up necessary to enable or control the solution e.g. the new report will be added to the standing data to allow it to be selected from the standard reports form. The selection criteria for the report will be (insert selection criteria). -->
* EPD_AUDIT_LOG_REQUESTED_IND - set to 0
Statement
* EPD_LAST_AUDIT_LOG_RECEIVED_DATE - set to sysdate
* EPD_LAST_AUDIT_LOG_RECEIVED_TIME - set to systime
* EPD_LAST_AUDIT_LOG_RECEIVED - set to the name of the audit log file created.




== Implementation Advice ==
=== Device Audit Log Configuration ===
<!-- Include any relevant notes that will help OBSL or Client implementer to successfully enable the solution on delivery. -->
{{Note}} This supersedes the Audit Logging configuration on the device.
Statement


The EPOD_DEVICE table will be modified to add the following fields:
* EPD_AUDIT_LOGGING_IND - int, default 0
* EPD_AUDIT_LOG_TYPES - nvarchar(MAX) -
* EPD_AUDIT_LOG_LIMIT - int, default 2000


<!-- NEW PAGE -->
Defaults for the system will be set to be:
= FUNCTIONAL DESCRIPTION =
* EPD_AUDIT_LOGGING_IND - 0
== Heading  ==
* EPD_AUDIT_LOG_TYPES - "{}"
=== Sub Heading  ===
* EPD_AUDIT_LOG_LIMIT - 2000
<!-- Describe functionally how the solution will satisfy the client requirement. Include statements to define all of the new capabilities or changes to be developed.  Include pictures to illustrate and support design.


Note that this section will usually be reviewed and signed off by the client.  Think about the audience and ensure the information documented is easy to read and understand.
The server PDA web service will be modified for the LOGON_REQUEST method to return the content of the EPD_DEVICE table for the device.


Group the functional description into logical areas and use sub-headings where appropriate -->
Statement


The device will be modified to check the LOGON_RESPONSE message and store the devices flags. The value of EPD_AUDIT_LOG_TYPES will be stored as a JSON object or as a delimited list of areas.


<!-- NEW PAGE -->
{{Note}} This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.
= TECHNICAL NOTES =
== Modules Changed ==
<!-- List the modules or objects that will be changed by this development -->
{| class="wikitable" border="1" width:"100%"
|-bgcolor="#FFFF99"
! Module Name !! Module Type !! Notes
|-
| 1 || 2 || 3
|}


The device will store the log indicator and limit (EPD_AUDIT_LOGGING_IND and EPD_AUDIT_LOG_LIMIT) as new global variables or system properties.


== Table Updates ==
The device audit logging process (XF_AUDIT) will be modified to use the limit (EPD_AUDIT_LOG_LIMIT) instead of the fixed limit (2000). If the limit has changed, all messages will be removed from the table.
<!-- Detail any changes to the data model including additional tables, columns, indexes etc -->
{| class="wikitable" border="1" width:"100%"
|-bgcolor="#FFFF99"
! Name !! Type !! Nullable !! Default !! Storage !! Comments
|-
| 1 || 2 || 3 || 4 || 5 || 6
|}


The device logging process will be modified to check whether the area exists in EPD_AUDIT_LOG_TYPES. If so, and audit logging is enabled (EPD_AUDIT_LOGGING_IND = 1), the device will write the debug message to the audit log.


== Developer Notes ==
<!-- Include technical notes and definitions to assist the developer where appropriate -->


=== Devices Maintenance Screen ===
The EPOD_DEVICE table will be modified to add the following fields:
* EPD_NAME - nvarchar(50)


<!-- MEDIA LANDSCAPE YES -->
EPOD_LISTS and EPOD_LIST_ITEMS records will be created with all logging areas.
= TEST PLAN  =
{{TestPlan_Header
|Title={{#var:Doc_Title}}
|Log={{#var:Reference}}
|Description=description of what is to be achieved
|MenuAccess=Where on the menus the item can be found
|Prerequisites=The prerequisites of the test
|Objective=The details of what each group of tests is to achieve
}}
{{ #vardefine: Cycle | 0 }}{{ #vardefine: SubCycle | 0 }}
{{TestPlan_CycleHeader
|Cycle={{ #vardefineecho: Cycle | {{ #expr: {{ #var: Cycle }} + 1 }} }}{{ #vardefine: SubCycle | {{ #var: Cycle }} }}
|Title=Area being tested in this cycle
|Notes=Any notes or prerequisites for the tests following.
}} <!--INSERT TESTS HERE --> {{TestPlan_Test
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }}
|Action=The actions to follow
|Result=The expected result
|Remarks=
|PassFail=
}} {{TestPlan_Test
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }}
|Action=The actions to follow
|Result=The expected result
|Remarks=
|PassFail=
}} {{TestPlan_Test
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }}
|Action=The actions to follow
|Result=The expected result
|Remarks=
|PassFail=
}} {{TestPlan_CycleFooter}}


<!-- MEDIA LANDSCAPE NO -->
{{Note}} This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.
{{Doc_AppendixNew
 
|Appendix=A
 
|Estimate=Y
A new Devices screen will be created to maintain the device table, including the new logging functionality.
|Glossary=EPOD
 
|Ref1=Reference1
This screen is available to OBSL users only, to configure audit logs and request them to be sent. This screen will not be added to any menus.
|RefV1=0.1
 
|RefDate1=01/01/2011
This will be created as a new MVC screen. This requires the existing EPOD_DEVICE and EPOD_DEVICE_TYPE DAL classes to be converted to the new models.
|REQ=0
 
|EST=0
The screen will allow work similarly to existing screens, for finding and editing data.
|FS=0
 
|TS=0
New devices cannot be created from this screen.
|DEV=0
 
|ST=0
The screen will allow searching for devices using the following criteria:
|IMP=0
* ''Device ID'' - text box with fuzzy match.
|PM=0
* ''Device Name'' - text box with fuzzy match.
|Client={{#var:Client}}
* ''Date Type'' selector, one of:
|Year={{#var:Year}}
** ''Last Used''.
|FSEST=Y
** ''Audit Requested''.
|Rev1=Rev1
** ''Audit Received''.
|Rev1Title=OBS Project Manager
* ''Date Range'' - a date range from/to, defaulting to the last week.
|Rev2=Rev2
* ''User'' - textbox.
|Rev2Title=Customer Representative
* ''Site'' - textbox, defaulting to the logged-on site.
}}</div>
* ''Audit Logging'' - a checkbox, defaulting to unchecked.
[[Category:{{#var:Client}} FS]]
 
The results will be displayed in a jQuery datatable-enabled gridview.
 
The columns will be:
* ''Device ID''.
* ''Device Name''.
* ''Last Used'' (Date/Time).
* ''User''.
* ''Site''.
 
Clicking on a row will display the actions:
* '''Show Audit Logs''' - optional, allowing showing all logs associated to that device ID. This requires opening a folder on the IIS web server for browsing, like the PDAUpdates folder on the server.
* '''Select'''.
 
Pressing '''Select''' shows the details of the device:
* ''Device ID'' - read only
* ''Device Name'' - textbox.
* ''Last Used Date/Time'' - read only
* ''User'' - read only
* ''Site'' - read only
* ''Audit Logging'' section:
** ''Last Requested Date/Time'' - read only
** ''Last Received Date/Time'' - read only
** ''Last Audit Log'' - read only
** ''Enable Audit Logging'' - checkbox.
** ''Audit Log Types'' - a multi-select list. This is disabled if audit logging is disabled. This list will be populated from EPOD_LIST_ITEMS for the requisite list.
** '''Request Audit Log''' button - clicking this button enables the EPD_AUDIT_LOG_REQUESTED_IND field. This button is disabled if the indicator is already 1. This button is disabled if audit logging is disabled on the device.
 
 
A '''Save''' and '''Cancel''' button will also be provided.

Latest revision as of 17:13, 25 April 2019

325145 Device Audit Log Improvements

Requirements

  • Send the device audit log through a new web service method, rather than through email.
  • Request that the device send through the audit log by making a setting on the server.
  • Allow configuration of the audit log:
    • Per device and default for the system.
    • What is to be audited (types of audit log messages).
    • Number of records to store on the audit log.
  • Admin screen available to OBSL users only, to configure audit logs and request them to be sent (Devices screen).


Overview of Solution

Device Audit Log Web Service Method

The PDA Audit Log screen will be modified to build a message onto the pending queue, containing all the logged data.

A new message request will be created for this (AUDIT_LOG).

Structure to be defined, but it is assumed this will follow the structure of the existing XF_AUDIT device table.

The server PDA web service will be modified to receive this message and save this to a file in a server-side folder. The folder will be defined as a system web configuration parameter. The name to be confirmed, but will likely comprise:

  • "AUDIT_LOG_"
  • device_id
  • date
  • time
  • ".XML"


Request Device Audit Log

The EPOD_DEVICE table will be modified to add the following fields:

  • EPD_AUDIT_LOG_REQUESTED_IND - int default 0
  • EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
  • EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0
  • EPD_LAST_AUDIT_LOG_RECEIVED_DATE - int default 0
  • EPD_LAST_AUDIT_LOG_RECEIVED_TIME - int default 0
  • EPD_LAST_AUDIT_LOG_RECEIVED - nvarchar(100) NULL

The server PDA web service will be modified to recognise this flag on the following existing web service methods:

  • LOGON_REQUEST
  • AUTO_UPDATE_REQUEST

The device will be extracted and, if EPD_AUDIT_LOG_REQUESTED_IND is set to 1, the following additional information will be returned on the message:

  • EPD_AUDIT_LOG_REQUESTED_IND - int default 0
  • EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
  • EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0

Structure to be defined, but it is assumed this will follow the structure of the existing EPOD_DEVICE table.


The device will be modified to check the responses to these messages (including a grace logon) and check the value of the indicator. If the flag is set to 1, the process will check the last requested date and time is different to the last request received. If so, the device will call the same code as the Audit screen i.e. generate a new AUDIT_LOG web service call.


The server PDA web service AUDIT_LOG method will be modified to extract the device from the message and update the following fields:

  • EPD_AUDIT_LOG_REQUESTED_IND - set to 0
  • EPD_LAST_AUDIT_LOG_RECEIVED_DATE - set to sysdate
  • EPD_LAST_AUDIT_LOG_RECEIVED_TIME - set to systime
  • EPD_LAST_AUDIT_LOG_RECEIVED - set to the name of the audit log file created.


Device Audit Log Configuration

Note Note: This supersedes the Audit Logging configuration on the device.

The EPOD_DEVICE table will be modified to add the following fields:

  • EPD_AUDIT_LOGGING_IND - int, default 0
  • EPD_AUDIT_LOG_TYPES - nvarchar(MAX) -
  • EPD_AUDIT_LOG_LIMIT - int, default 2000

Defaults for the system will be set to be:

  • EPD_AUDIT_LOGGING_IND - 0
  • EPD_AUDIT_LOG_TYPES - "{}"
  • EPD_AUDIT_LOG_LIMIT - 2000

The server PDA web service will be modified for the LOGON_REQUEST method to return the content of the EPD_DEVICE table for the device.


The device will be modified to check the LOGON_RESPONSE message and store the devices flags. The value of EPD_AUDIT_LOG_TYPES will be stored as a JSON object or as a delimited list of areas.

Note Note: This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.

The device will store the log indicator and limit (EPD_AUDIT_LOGGING_IND and EPD_AUDIT_LOG_LIMIT) as new global variables or system properties.

The device audit logging process (XF_AUDIT) will be modified to use the limit (EPD_AUDIT_LOG_LIMIT) instead of the fixed limit (2000). If the limit has changed, all messages will be removed from the table.

The device logging process will be modified to check whether the area exists in EPD_AUDIT_LOG_TYPES. If so, and audit logging is enabled (EPD_AUDIT_LOGGING_IND = 1), the device will write the debug message to the audit log.


Devices Maintenance Screen

The EPOD_DEVICE table will be modified to add the following fields:

  • EPD_NAME - nvarchar(50)

EPOD_LISTS and EPOD_LIST_ITEMS records will be created with all logging areas.

Note Note: This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.


A new Devices screen will be created to maintain the device table, including the new logging functionality.

This screen is available to OBSL users only, to configure audit logs and request them to be sent. This screen will not be added to any menus.

This will be created as a new MVC screen. This requires the existing EPOD_DEVICE and EPOD_DEVICE_TYPE DAL classes to be converted to the new models.

The screen will allow work similarly to existing screens, for finding and editing data.

New devices cannot be created from this screen.

The screen will allow searching for devices using the following criteria:

  • Device ID - text box with fuzzy match.
  • Device Name - text box with fuzzy match.
  • Date Type selector, one of:
    • Last Used.
    • Audit Requested.
    • Audit Received.
  • Date Range - a date range from/to, defaulting to the last week.
  • User - textbox.
  • Site - textbox, defaulting to the logged-on site.
  • Audit Logging - a checkbox, defaulting to unchecked.

The results will be displayed in a jQuery datatable-enabled gridview.

The columns will be:

  • Device ID.
  • Device Name.
  • Last Used (Date/Time).
  • User.
  • Site.

Clicking on a row will display the actions:

  • Show Audit Logs - optional, allowing showing all logs associated to that device ID. This requires opening a folder on the IIS web server for browsing, like the PDAUpdates folder on the server.
  • Select.

Pressing Select shows the details of the device:

  • Device ID - read only
  • Device Name - textbox.
  • Last Used Date/Time - read only
  • User - read only
  • Site - read only
  • Audit Logging section:
    • Last Requested Date/Time - read only
    • Last Received Date/Time - read only
    • Last Audit Log - read only
    • Enable Audit Logging - checkbox.
    • Audit Log Types - a multi-select list. This is disabled if audit logging is disabled. This list will be populated from EPOD_LIST_ITEMS for the requisite list.
    • Request Audit Log button - clicking this button enables the EPD_AUDIT_LOG_REQUESTED_IND field. This button is disabled if the indicator is already 1. This button is disabled if audit logging is disabled on the device.


A Save and Cancel button will also be provided.