Page tree
Skip to end of metadata
Go to start of metadata

What's new?

Please see Repository Credentials Updater - Release Notes for more information.

Purpose

The purpose of the Repository Credentials Updater is to automate the update of extractor credentials for all repository packages and database packages.

If user and password arguments are empty, it will remove the credentials (no authentication)

This tool applies to technologies using database extractors, like :

  • Oracle PL/SQL
  • Microsoft T-SQL
  • Sybase T-SQL
  • DB2 zOs
  • DB2 UDB

And to technologies using repository extractors, such as :

  • Mainframe
  • Oracle Forms
  • Extension com.castsoftware.peoplesoft
  • Extension com.castsoftware.siebel

This tool does not update JEE Maven HTTP Extractors, which have a dedicated tool.

The tool has a SIMULATION mode, and an EXECUTION mode.

If you want to update credentials for a package whose technology is not in the above lists, just run the Tool in simulation mode and inspect the simulation log, in order to know if it applies to your technology.

Repository Credentials Updater consists of :

  • a main component, as a Groovy script : UpdateDBExtractorCredentials.cgroovy 
  • a multi-application batch generator, made of :
    • a JAR file : CAST-AIPVersionsCollector.jar
    • a batch file : generateBatch.bat

This tool is provided by Maintenance Team, and published as an extension com.castsoftware.labs.tools.repositorycredentialsupdater

Applicable in CAST Version
Release
Yes/No
8.3.x(tick) 
Applicable RDBMS
RDBMS
Yes/No
CSS3(tick)
CSS2(tick)

Prerequisites

 Follow the below prerequisites before running the tool:

CAST-AIP

CAST-AIP must be installed on the server(s) where you launch the scripts.

Delivery Folder

The delivery folder should be accessible (local or network drive) from the server where you run the script

BACKUPS

Take a zip of the delivery folder before proceeding

Repository Credentials Updater

Since it is based on the Delivery Manager Tool, for performance reasons, the main component should be launched in one-application mode. Running it on several applications in a row requires a multi-application batch file.

This is why a generator tool needs to be launched on the machine. The generator tool is located in the batch_generator sub folder.

Generator Configuration 

The generator batch file (generateBatch.bat) must be configured with the following mandatory variables : FLATDIR, LOGDIR, DELIVERYFOLDER

Generator Configuration 

REM Mandatory
set "FLATDIR=<CAST AIP Installation PATH>"
set "LOGDIR=<Path to the log folder>"
set "DELIVERYFOLDER=<Delivery Folder>"

REM Optional
set "USERNAME=<User Name>"
set "PASSWORD=<Password>"
set "APP_NAME="

FLATDIR must be set to the CAST Installation path
LOGDIR must be set to the folder where the log file of the Main Component should be generated
DELIVERYFOLDER must be set to the delivery folder 

If you mean to run the tool on one specific application only, then APP_NAME must be set to the application name. Otherwise all applications present in the delivery folder will be processed.

NB: USERNAME and PASSWORD are described as Optional because if both are not set, then the script will remove the credentials. If USERNAME is set, and PASSWORD is not set, then the User will have an empty password. However, if USERNAME is not set and PASSWORD is set, then the script will fail.

Generate multi-application batch file

Launch the generator batch file you have configured (generateBatch.bat).

The output will be 2 multi-application batch files located in the main folder of the extension : 

  • LaunchRepositoryCredentialsUpdater.bat for SIMULATION mode
  • LaunchRepositoryCredentialsUpdaterExecute.bat for EXECUTION mode

Simulate then execute

Launch the simulation batch you have just generated :  LaunchRepositoryCredentialsUpdater.bat

cmd

C:\ProgramData\CAST\CAST\Extensions\com.castsoftware.repositorycredentialsupdater.1.0.0\LaunchRepositoryCredentialsUpdater.bat

The main component will navigate through the applications looking for Database Packages and Repository Packages, and write a summary to the simulation log file : RepositoryCredentialsUpdater-<Timestamp>log

RepositoryCredentialsUpdater-20200518105927
RepositoryCredentialsUpdater - C:\temp\23006\Delivery 
Using arguments:
	ExecuteScript
	-file: UpdateDBExtractorCredentials.cgroovy
	-storagePath: C:\temp\23006\Delivery
	-oneApplicationMode: e90f9fdd-97a2-490f-85de-5a25b303656d
	-param0: Salim
	-param1: Groumpf
	-param2: DummyApp 19797

Unused initial value dmttechnoscanner.SourceFileProject in field dmtxmlscanner.SourceFileDiscoverer.inputProjectType: delivery.ProfileOrProjectType
Log file: C:\Users\SFR~1.CAS\AppData\Local\Temp/DMT.log.txt
Running action: Execute a groovy script
	Database Extractor Credentials Updater - version 1.0
	
	Using CAST-AIP version 8.3.16
	
	Script running in SIMULATION MODE
	
	Processing delivery
	
	Processing application : [Home / DummyApp 19797]
	  Processing version : [Home / DummyApp 19797 / 1802]
	    Processing package : [Home / DummyApp 19797 / Salim / Home / DummyApp 19797 / Salim / Maven]
	    Package is a dmtdevjeemavenresourcesextractor.MavenResourceFilesPackage : skipping

	    Processing package : [Home / DummyApp 19797 / 1802 / Home / DummyApp 19797 / 1802 / Oracle]
	    Package is a dmtdevdbtechno.SQLCASTDatabasePackage : proceeding
	      Processing extractor : [Home / DummyApp 19797 / 1802 / Oracle / Reuse existing CAST extractor output]
	      Extractor is a dmtdevsqlcastextractorextraction.SQLCASTExtraction : proceeding
	      Simulation : replacing credentials for Home / DummyApp 19797 / 1802 / Oracle / Reuse existing CAST extractor output by [Salim/Groumpf]
	
		Processing package : [Home / DummyApp 19797 / 1802 / Home / DummyApp 19797 / 1802 / PeopleSoft_Project]
	      Package is a dmtcastpeoplesofttechno.PeopleSoftOraclePackage : proceeding
	        Processing extractor : [Home / DummyApp 19797 / 1802 / PeopleSoft_Project / PeopleSoft on Oracle]
	        Extractor is a dmtcastpeoplesoftoracleextractor.PeopleSoftOracleExtractor : proceeding
  	        Simulation : replacing credentials for Home / DummyApp 19797 / 1802 / PeopleSoft_Project / PeopleSoft on Oracle by [Salim/Groumpf]
	
[ ... ]

	Delivery processed
Saving document: Execute a groovy script

You can note that the log specifies whenever a package is skipped, and provides its class.

If you are satisfied with the simulation, then run the execution batch you have just generated :  LaunchRepositoryCredentialsUpdaterExecute.bat

cmd

C:\ProgramData\CAST\CAST\Extensions\com.castsoftware.repositorycredentialsupdater.1.0.0\LaunchRepositoryCredentialsUpdaterExecute.bat

Check the execution log file :

RepositoryCredentialsUpdaterExecute-20200518105927
RepositoryCredentialsUpdater - C:\temp\23006\Delivery 
Using arguments:
	ExecuteScript
	-file: UpdateDBExtractorCredentials.cgroovy
	-storagePath: C:\temp\23006\Delivery
	-oneApplicationMode: e90f9fdd-97a2-490f-85de-5a25b303656d
	-param0: Salim
	-param1: Groumpf
	-param2: PeopleTools 19797
	-param4: doit

Unused initial value dmttechnoscanner.SourceFileProject in field dmtxmlscanner.SourceFileDiscoverer.inputProjectType: delivery.ProfileOrProjectType
Log file: C:\Users\SFR~1.CAS\AppData\Local\Temp/DMT.log.txt
Running action: Execute a groovy script
	Database Extractor Credentials Updater - version 1.0
	
	Using CAST-AIP version 8.3.16
	
	Script running in EXECUTION MODE
	
	Processing delivery
	
	Processing application : [Home / DummyApp 19797]
	  Processing version : [Home / DummyApp 19797 / 1802]
	    Processing package : [Home / DummyApp 19797 / Salim / Home / DummyApp 19797 / Salim / Maven]
	    Package is a dmtdevjeemavenresourcesextractor.MavenResourceFilesPackage : skipping

	    Processing package : [Home / DummyApp 19797 / 1802 / Home / DummyApp 19797 / 1802 / Oracle]
	    Package is a dmtdevdbtechno.SQLCASTDatabasePackage : proceeding
	      Processing extractor : [Home / DummyApp 19797 / 1802 / Oracle / Reuse existing CAST extractor output]
	      Extractor is a dmtdevsqlcastextractorextraction.SQLCASTExtraction : proceeding
	      Replacing credentials for Home / DummyApp 19797 / 1802 / Oracle / Reuse existing CAST extractor output by [Salim/Groumpf]
	
	    Processing package : [Home / DummyApp 19797 / 1802 / Home / DummyApp 19797 / 1802 / PeopleSoft_Project]
	    Package is a dmtcastpeoplesofttechno.PeopleSoftOraclePackage : proceeding
	      Processing extractor : [Home / DummyApp 19797 / 1802 / PeopleSoft_Project / PeopleSoft on Oracle]
	      Extractor is a dmtcastpeoplesoftoracleextractor.PeopleSoftOracleExtractor : proceeding
	      Replacing credentials for Home / DummyApp 19797 / 1802 / PeopleSoft_Project / PeopleSoft on Oracle by [Salim/Groumpf]
[ ... ]

	Delivery processed
Saving document: Execute a groovy script

You can now open DMT. The package extractor credentials should have been updated.


Notes




  • No labels