# DCesso.ctl:332:Collects Oracle Enterprise Single Sign-On Information # $Id: DCesso.ctl,v 1.7 2015/08/21 15:30:22 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCesso.ctl,v 1.7 2015/08/21 15:30:22 RDA Exp $ # # Change History # 20150821 MSC Improve time consistency. =head1 NAME OFM:DCesso - Collects Oracle Enterprise Single Sign-On (PassLogix) Information =head1 DESCRIPTION This module collects Oracle Enterprise Single Sign-On (PassLogix)-related information. This module is applicable to Microsoft Windows systems only. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.ESSO module ...',tput('off') # Initialisation var $DATA_DIR = ${ENV.APPDATA:''} var $ESSO_HOME = ${D_HOME:''} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:Oracle Enterprise Single Sign-On' # Load the common macros run RDA:library() =head2 registry - Registry Information Collects Oracle Enterprise Single Sign-On registry information. =cut debug 'Inside ESSO module, gathering registry information' report registry title '---+!! Oracle Enterprise Single Sign-On Registry Settings' title $TOC if hasRegOption() {prefix write '---+ Oracle Enterprise Single Sign-On 64-Bit Registry Settings' if writeRegistry64('HKLM\SOFTWARE\Passlogix') write $TOP prefix write '---+ Oracle Enterprise Single Sign-On 32-Bit Registry Settings' if writeRegistry32('HKLM\SOFTWARE\Passlogix') write $TOP if !isCreated(true) write 'There are no Oracle Enterprise Single Sign-On registry entries' } else {if writeRegistry('HKLM\SOFTWARE\Passlogix') write $TOP elsif writeRegistry('HKLM\SOFTWARE\Wow6432Node\Passlogix') write $TOP if !isCreated(true) write 'There are no Oracle Enterprise Single Sign-On registry entries' } if writeRegistry('HKCU\Software\Passlogix') write $TOP if isCreated(true) toc '2:[[',getFile(),'][rda_report][Registry Information]]' =head2 appdata - Application Files Collects application files. =cut pretoc '2:Application Files' debug 'Inside ESSO module, gathering application files' call sort_files(3,0,\ grepDir(catDir($DATA_DIR,'Passlogix'),'\.(ini|xml|log)$','ip')) =head2 secfiles - Secrets Directory Contents Collects the contents of the F directory. =cut debug 'Inside ESSO module, gathering contents of secrets directory' if ?testDir('d',$dir = catDir($DATA_DIR,'Passlogix','Secrets')) {report secfiles write '---+ Secrets Directory Contents' write '---## Information Taken from ',encode($dir) call statDir('an',$dir) if isCreated(true) toc '3:[[',getFile(),'][rda_report][Secrets Directory Contents]]' } unpretoc =head2 ldifde - Active Directory Entries Collects active directory entries from organization unit created to store password reset objects. =cut if ?findCommand('ldifde') {var $cmd = last var $val = cond(hasRegOption(),\ nvl(getReg64Value('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD\\ Servers','Server1'),\ getReg32Value('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD\\ Servers','Server1')),\ nvl(getRegValue('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD\\ Servers','Server1'),\ getRegValue('HKLM\SOFTWARE\Wow6432Node\Passlogix\SSPR\Storage\\ Extensions\AD\Servers','Server1'))) var ($srv,$prt) = split(':',$val) var $obj = cond(hasRegOption(),\ nvl(getReg64Value('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD',\ 'root'),\ getReg32Value('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD',\ 'root')),\ nvl(getRegValue('HKLM\SOFTWARE\Passlogix\SSPR\Storage\Extensions\AD',\ 'root'),\ getRegValue('HKLM\SOFTWARE\Wow6432Node\Passlogix\SSPR\Storage\\ Extensions\AD','root'))) if and($srv,$prt,$obj) {report ldifde var $rpt = $[OUT]->add_report('d','exportEu',0,'.ldf') var $lnk = $rpt->get_raw(true) var $fil = $rpt->get_file eval {var $cmd = concat($cmd,' -f ',$fil,' -s ',isHost($srv),' -t ',isPort($prt),\ ' -d ',quote($obj),' -p subtree -r "(objectClass=*)"') prefix {write '---+ Active Directory Entries' write '---## Using ',encode($cmd) write ' * Links point to files that have been collected in their \ original format. Opening them directly in your browser can \ present risks. To prevent them, access the file outside the \ browser or use the link to save them and use an adequate \ viewer.' write '|*File Name*| *Size*|*Last Modified Date*|' } call command($cmd) } if $siz = getSize($fil) {var $lnk = concat('[[',$lnk,'][_blank][exportEu.ldf]]') write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Active Directory Entries]]' } } =head2 syncstat - Synchronization Status RDA runs the synchronization and then checks if the last modification date of file F<%APPDATA%/Passlogix/aelist.ini> has been modified. =cut if ?testDir('d',$ESSO_HOME) {if ${B_SYNC:true} {var $pth = cond(hasRegOption(),\ nvl(getReg64Value('HKLM\SOFTWARE\Passlogix','Path'),\ getReg32Value('HKLM\SOFTWARE\Passlogix','Path')),\ nvl(getRegValue('HKLM\SOFTWARE\Passlogix','Path'),\ getRegValue('HKLM\SOFTWARE\Wow6432Node\Passlogix','Path'))) if ?$pth {if ?testFile('f',catFile(last,'ssoshell.exe')) {debug 'Inside ESSO module, testing sychronization' report syncstat var $cmd = concat(lastTestCommand(),' /syncmgr /download') var $fil = catFile($DATA_DIR,'Passlogix','aelist.ini') write '---+ Synchronization Status' write '---## Using: ',encode($cmd) write 'Current time is ',replace(${RDA.T_GMTIME},'\s',' ',true) write '---++ File Status before the Synchronization' call statFile('p',$fil) if loadCommand($cmd) {write '---++ Synchronization Output' call writeLastFile() write '---++ File Status after the Synchronization' call statFile('p',$fil) } else {write '---++ Synchronization Error' call writeLastFile() } toc '2:[[',getFile(),'][rda_report][Synchronization Status]]' } } } =head2 versions - Executable and Library Versions Collects the executable and library versions. =cut report versions debug 'Inside ESSO module, gathering executable and library versions' prefix {write '---+!! Version Information' write '%TOC3-2%' } loop $fil (grepDir($ESSO_HOME,'\.(dll|exe|vrs)$','dir')) {write '---+ File ',basename($fil) call statFile('p',$fil) write '%BR%' var $inf = getVersionInfo($fil) loop $key (keys($inf)) write '|*',replace($key,'\012','',true),' *|',\ replace($inf->{$key},'\012','',true),' |' write $TOP } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Executable and Library Versions]]' =head2 instdir - Installation Directory Contents When requested, the report attaches the content of Oracle Enterprise Single Sign-On installation directory. It does not generate this report when there is no archiving utility. =cut if and(testDir('dr',$ESSO_HOME),${B_COLLECT}) {var $rpt = $[OUT]->add_report('d','pass',0,'.zip') var $lnk = $rpt->get_raw(true) var $dst = $rpt->get_file if testCommand('zip -h') var $cmd = concat('zip -9 -q -r ',$dst,' "',$ESSO_HOME,'"') elsif ?findCommand('jar') var $cmd = concat(last,' -cfM ',$dst,' -C "',$ESSO_HOME,'" .') else {var $cmd = undef echo 'Unable to find an utility for archiving the installation directory.' } if $cmd {debug 'Inside ESSO module, gathering install directory contents' if loadCommand($cmd) {report instdir write '---+!! Contents of PassLogix Directory' write '---## Information Taken from ',encode($ESSO_HOME) write '|[[',$lnk,'][_blank][pass.zip]]|',\ getLastModify($dst,''),'| ',getSize($dst),'|' toc '2:[[',getFile(),'][rda_report][Installation Directory Contents]]' } } } } =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.16: Octavian Morariu. =item RDA 4.22: Raju Channabasappa, Joel Flores. =item RDA 4.30: Danny Cahoon. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut