{"id":4757,"date":"2012-08-20T00:00:35","date_gmt":"2012-08-20T05:00:35","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=4757"},"modified":"2023-03-21T11:56:10","modified_gmt":"2023-03-21T16:56:10","slug":"auditing-m-power-login-activity","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/auditing-m-power-login-activity","title":{"rendered":"Auditing m-Power Login Activity"},"content":{"rendered":"\n<p>m-Power developers have the ability to log end-user activity for signon\/signoff of generated applications. This functionality is quite useful for a number of reasons, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logging which users have accessed their account, when and at what time.<\/li>\n\n\n\n<li>Logging which application a user has accessed.<\/li>\n\n\n\n<li>Logging how long someone stays active before they sign off.<\/li>\n\n\n\n<li>Capturing various components of a user\u2019s information, including their IP address.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Configuration<\/h3>\n\n\n\n<p>To configure, install the mrcSignon2 logic into your data dictionary. Next, modify this tag:<\/p>\n\n\n\n<p>&lt;callrpg aftersignon=&#8221;SIGNON&#8221;&nbsp; beforesignoff=&#8221;SIGNOFF&#8221; rpglocal=&#8221;0&#8243; \/&gt; to<br>&lt;callrpg aftersignon=&#8221;NAME_OF_SIGNON_PGM&#8221;&nbsp; beforesignoff=&#8221;NAME_OF_SIGNOFF_PGM&#8221; rpglocal=&#8221;1&#8243; \/&gt;<\/p>\n\n\n\n<p>Notice that, by default, rpglocal is set to 0. This indicates that the ability to log user activity has been disabled. Please set this value to 1 to activate this functionality.<\/p>\n\n\n\n<p>When a user signs on, m-Power will immediately call the program referenced at the aftersignon=\u201d\u201d value. Conversely, when a user signs out, m-Power will immediately call the program referenced at the beforesignoff value. To utilize this functionality, you <strong>do not <\/strong>need to utilize both values.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note: <\/strong>Since auditing needs are vastly different with each client, m-Power does not ship any auditing programs. Instead, these procedures need to be created and customized by each client. Auditing programs should be written in SQL. If you are not familiar with the syntax of an SQL procedure, please click <a rel=\"noreferrer noopener\" href=\"https:\/\/www.mrc-productivity.com\/docs\/images\/Sample%20SQL%20Sign%20on%20Procedure.sql\" target=\"_blank\">here<\/a> for a sample SQL program. Alternatively, our m-Power experts would be more than happy to create the necessary programs for you, on an hourly basis.<\/p>\n\n\n\n<p>By default, both the signon and signoff procedures accept two values: a User ID parameter and a Session ID parameter. These values are automatically passed from m-Power to the applicable procedure. However, if you wish to have even more flexibility within your auditing, add this line of code directly after the &lt;callrpg&gt; tag:<br>&lt;parms_to_SIGNON value=&#8221; &#8221; \/&gt;<br>This tag allows you to pass additional values directly to the auditing programs. Available options are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>userId \u2013 User Name used by user to log in.<\/li>\n\n\n\n<li>sessionId \u2013 User\u2019s current session ID<\/li>\n\n\n\n<li>remoteIp \u2013 The IP address of the client\u2019s broswer<\/li>\n\n\n\n<li>remoteUrl \u2013 The URL the client utilized to access the Sign on page.<\/li>\n<\/ul>\n\n\n\n<p>You can utilize any combination of the above parameters. Be sure to separate them with a \u201c;\u201d. Additionally, be sure that the parameters you are passing are in the same order as they are referenced in your external procedure.<\/p>\n\n\n\n<p>Verify the accuracy of your program by examining the table referenced in your external procedure to determine if signon\/signoff activity is being logged.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>m-Power developers have the ability to log end-user activity for signon\/signoff of generated applications. This functionality is quite useful for a number of reasons, including: Configuration To configure, install the mrcSignon2 logic into your data dictionary. Next, modify this tag: &lt;callrpg aftersignon=&#8221;SIGNON&#8221;&nbsp; beforesignoff=&#8221;SIGNOFF&#8221; rpglocal=&#8221;0&#8243; \/&gt; to&lt;callrpg aftersignon=&#8221;NAME_OF_SIGNON_PGM&#8221;&nbsp; beforesignoff=&#8221;NAME_OF_SIGNOFF_PGM&#8221; rpglocal=&#8221;1&#8243; \/&gt;&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[257],"ht-kb-tag":[280],"class_list":["post-4757","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-security","ht_kb_tag-audit"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/4757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=4757"}],"version-history":[{"count":17,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/4757\/revisions"}],"predecessor-version":[{"id":12333,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/4757\/revisions\/12333"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=4757"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=4757"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=4757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}