Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/20/2023 05:56 AM
Hi Team,
Is there any way to upload custom.properties file in Saviynt, We have multiple Jar files and for now we have pass hardcoded username and password in the code. But I want to keep them in properties file so that if we can upload in Saviynt and from saviynt_home code will ready it? Or any other design for this ??
Solved! Go to Solution.
10/22/2023 10:22 AM
We have asked Saviynt to upload it in their conf folder in backend and we referenced it in our Jar's and passed the property file path as parameter (Arguments) in Jar job. There isn't a way at this point to upload from UI.
Only Jar's can be uploaded from UI.
10/22/2023 05:25 PM
In our case we have uploaded properties file used for jar into datafiles using postman API, but production is SSO hence we changed properties file to .csv which we can upload from UI.
Please submit idea ticket
10/22/2023 10:18 PM
Please submit an idea ticket in Saviynt Ideas Portal.
Regards,
Dhruv Sharma
If this reply answered your question, please accept it as Solution to help others who may have a similar problem.
10/23/2023 03:37 AM
Okay , But How I can read data file in code ? any reference ?
10/25/2023 01:49 AM
Hi @rushikeshvartak , How we can read Datafile in Code ?
10/25/2023 02:29 AM
Hi @gwagh ,
You can use FileInputStream class present in java.io package to read the properties/csv file in your jar code. Here is snippet we used:
public static Properties getProperties() {
Properties prop = null;
prop = new Properties();
String propFileLoc = "/saviynt_shared/saviynt/Import/Datafiles/codeproperties.csv"
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(propFileLoc);
prop.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
return prop;
}
Use returned properties object to get any property value in your properties file
Example: String username = prop.getProperty("username");
10/25/2023 06:21 AM
Thanks, Its working now.