Changed the configuration file format

This commit is contained in:
Keith Armstrong 2025-01-02 13:57:16 -05:00
parent eb333754a1
commit 9b189174b4

View File

@ -13,6 +13,7 @@ soapClient.jar allows you to send data to a SOAP service using an XML template f
<li>Whether to use SSL</li>
<li>Java Keystore</li>
<li>Java Keystore Password</li>
<li>Whether to allow empty values</li>
</ul>
## Command line parameters
@ -71,7 +72,8 @@ SHIM_URL = https://test.mycompany.com:8443/IDMProv/role/service
PASSWORD = PT9TKHwFgJCxATJtAAMtMwtIF0UjFal6fo5riBN+ExY=
USERNAME = cn=keitha,ou=active,ou=users,o=belkast
XML_FILE = USER_TO_ROLE.xml
INPUT_FILE = msalah.csv
CSV_FILE = msalah.csv
CSV_ALLOW_EMPTY_COLUMN_VALUES = true
SSL = true
JAVA_KS_LOCATION = ldap.keystore
JAVA_KS_PASSWORD = changeit
@ -147,10 +149,11 @@ Running the <i>linux_verify.sh</i> bash script would result in the following out
./linux_verify.sh
Please enter the name of the CSV file to verify : msalah.csv
Block on empty column values (Y/n) : Y
CSV input file : msalah.csv
CSV token count : 3
CSV token list : USER_DN,ROLE_DN,DESC
CSV input file : msalah.csv
CSV block on empty : true
CSV header tokens : USER_DN,ROLE_DN,DESC
## 2 [passed]
@ -169,6 +172,27 @@ CSV file records : 1
CSV file is valid : true
```
If we had a second line with a missing DESC value, the program would return an error as shown below.
```zsh
...
USER_DN,ROLE_DN,DESC
"cn=msalah,ou=admins,o=belkast","cn=TestRole,o=belkast","Test Load 1"
"cn=msalah,ou=admins,o=belkast","cn=TestRole,o=belkast",""
## line 2 [passed]
!! line 3 [failed] : the DESC token value is empty
!! line 3 [failed] : "cn=msalah,ou=admins,o=belkast","cn=TestRole,o=belkast",""
!! line 3 [failed] : {DESC=, ROLE_DN=cn=TestRole,o=belkast, USER_DN=cn=msalah,ou=admins,o=belkast}
CSV lines read : 2
CSV lines passed : 1
CSV lines failed : 1
CSV file records : 0
CSV file is valid : false
```
## Example usage
To run the program, just run the <i>linux_runner.sh</i> bash script shown at the beginning of this README.