Discussion:
Failed Password Store update using Property file.
Add Reply
Shashi Booshan
2018-01-12 08:58:47 UTC
Reply
Permalink
Raw Message
Hi Everyone,

I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.

failed.pwStore = LDAP // LDAP or File

{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}

{
filePath = c:/users/failedpwd.csv
}

so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.

If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.

Is it doable? If not is there any alternative solution.

Please Help.

Thanks in Advance


Regards
Shashi
Eddie Hartman
2018-01-12 13:28:53 UTC
Reply
Permalink
Raw Message
Post by Shashi Booshan
Hi Everyone,
I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.
failed.pwStore = LDAP // LDAP or File
{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}
{
filePath = c:/users/failedpwd.csv
}
so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.
If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.
Is it doable? If not is there any alternative solution.
Please Help.
Thanks in Advance
Regards
Shashi
Absolutely. Just add a Branch (IF) to your AL - for example, IF: Write To File. For the Condition choose script and do something like:

return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");

Drag your FileConnector on top of the IF Branch. Then have this connector only initialized when (if) it is ever used. You do this via the More... button to the right of the Inherit From button. This makes the Initialize drop-down visible. If you set this to 'only when used' then it will be just-in-time initialization.

For LDAP you could either go with an ELSE and drop the LDAP Connector here. Or you could do another IF and configure to write both places at the same time. In this case the scripted condition above would look like this:

// Breaking this into two lines that can easily be combined. This way makes debugging easier :)
provValue = system.getTDIProperty("failed.pwdStore") || "File"; // File is my default here if prop not set
return provValue.toLowerCase().indexOf("file") >= 0; // Does the prop value contain 'file', e.g. file,ldap.

Hope this helps, Shashi
Shashi Booshan
2018-01-15 07:33:10 UTC
Reply
Permalink
Raw Message
Post by Eddie Hartman
Post by Shashi Booshan
Hi Everyone,
I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.
failed.pwStore = LDAP // LDAP or File
{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}
{
filePath = c:/users/failedpwd.csv
}
so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.
If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.
Is it doable? If not is there any alternative solution.
Please Help.
Thanks in Advance
Regards
Shashi
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
Drag your FileConnector on top of the IF Branch. Then have this connector only initialized when (if) it is ever used. You do this via the More... button to the right of the Inherit From button. This makes the Initialize drop-down visible. If you set this to 'only when used' then it will be just-in-time initialization.
// Breaking this into two lines that can easily be combined. This way makes debugging easier :)
provValue = system.getTDIProperty("failed.pwdStore") || "File"; // File is my default here if prop not set
return provValue.toLowerCase().indexOf("file") >= 0; // Does the prop value contain 'file', e.g. file,ldap.
Hope this helps, Shashi
Thank You very much for the reply Eddie.
if i drag my FileConnector before the IF Branch i.e on Top of IF Branch, will it write to the file based on the below script ?

return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");

As mentioneded i am doing the below:
FileConnector
IF:WriteToFile (Initiaze "only when used")
Else:
LDAPConnector


Thanks in Advance
Eddie Hartman
2018-01-16 06:58:10 UTC
Reply
Permalink
Raw Message
Post by Shashi Booshan
Post by Eddie Hartman
Post by Shashi Booshan
Hi Everyone,
I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.
failed.pwStore = LDAP // LDAP or File
{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}
{
filePath = c:/users/failedpwd.csv
}
so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.
If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.
Is it doable? If not is there any alternative solution.
Please Help.
Thanks in Advance
Regards
Shashi
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
Drag your FileConnector on top of the IF Branch. Then have this connector only initialized when (if) it is ever used. You do this via the More... button to the right of the Inherit From button. This makes the Initialize drop-down visible. If you set this to 'only when used' then it will be just-in-time initialization.
// Breaking this into two lines that can easily be combined. This way makes debugging easier :)
provValue = system.getTDIProperty("failed.pwdStore") || "File"; // File is my default here if prop not set
return provValue.toLowerCase().indexOf("file") >= 0; // Does the prop value contain 'file', e.g. file,ldap.
Hope this helps, Shashi
Thank You very much for the reply Eddie.
if i drag my FileConnector before the IF Branch i.e on Top of IF Branch, will it write to the file based on the below script ?
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
FileConnector
IF:WriteToFile (Initiaze "only when used")
LDAPConnector
Thanks in Advance
I am going to ask you to hit the Debug button (next to Run In Console) for your AssemblyLine. Then in the next screen that appears, press the Debugger button you see appear at the far right of the next screen. (This second step of choosing the full Debugger over the DataStepper you will only have to do once)

Once in the AL Debugger you can use the second stepping button to move from one component to the next. In this way you will answer your own question, Shashi :)

For more hints on using the debugger: https://ibm.biz/Bdjiy3
Shashi Booshan
2018-01-18 07:29:05 UTC
Reply
Permalink
Raw Message
Post by Eddie Hartman
Post by Shashi Booshan
Post by Eddie Hartman
Post by Shashi Booshan
Hi Everyone,
I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.
failed.pwStore = LDAP // LDAP or File
{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}
{
filePath = c:/users/failedpwd.csv
}
so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.
If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.
Is it doable? If not is there any alternative solution.
Please Help.
Thanks in Advance
Regards
Shashi
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
Drag your FileConnector on top of the IF Branch. Then have this connector only initialized when (if) it is ever used. You do this via the More... button to the right of the Inherit From button. This makes the Initialize drop-down visible. If you set this to 'only when used' then it will be just-in-time initialization.
// Breaking this into two lines that can easily be combined. This way makes debugging easier :)
provValue = system.getTDIProperty("failed.pwdStore") || "File"; // File is my default here if prop not set
return provValue.toLowerCase().indexOf("file") >= 0; // Does the prop value contain 'file', e.g. file,ldap.
Hope this helps, Shashi
Thank You very much for the reply Eddie.
if i drag my FileConnector before the IF Branch i.e on Top of IF Branch, will it write to the file based on the below script ?
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
FileConnector
IF:WriteToFile (Initiaze "only when used")
LDAPConnector
Thanks in Advance
I am going to ask you to hit the Debug button (next to Run In Console) for your AssemblyLine. Then in the next screen that appears, press the Debugger button you see appear at the far right of the next screen. (This second step of choosing the full Debugger over the DataStepper you will only have to do once)
Once in the AL Debugger you can use the second stepping button to move from one component to the next. In this way you will answer your own question, Shashi :)
For more hints on using the debugger: https://ibm.biz/Bdjiy3
I can't thank you enough Eddie. I got it figured out. Thanks again :-)
Eddie Hartman
2018-01-18 20:10:58 UTC
Reply
Permalink
Raw Message
Post by Shashi Booshan
Post by Eddie Hartman
Post by Shashi Booshan
Post by Eddie Hartman
Post by Shashi Booshan
Hi Everyone,
I am configuring a password sync solution. I have the password going from password plugin to AD and EBS.
I am able to update those failed passwords in a csv file or LDAP separately.
However, i have a strange requirement which i am unable to think about.
I am having the ldap and csv file details like file path, ldapUrl, password, orgname etc in a property file.
Here it comes, I need to set an attribute in a property file and based on the attribute i need to write the Failed passwords in a File OR in LDAP.
For example, this is my imaginary property file.
failed.pwStore = LDAP // LDAP or File
{
ldapSearchBase = ou=passwordstore,dc=com
ldapUrl = ldap://localhost:389
ldapPassword = xyz
}
{
filePath = c:/users/failedpwd.csv
}
so if i set failed.pwStore = LDAP it should write the failed passwords to the Ldap having the LDAP details.
If i set failed.pwStore = File it should write the failed passwords to the file with filePath i mentioned in the property file.
Is it doable? If not is there any alternative solution.
Please Help.
Thanks in Advance
Regards
Shashi
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
Drag your FileConnector on top of the IF Branch. Then have this connector only initialized when (if) it is ever used. You do this via the More... button to the right of the Inherit From button. This makes the Initialize drop-down visible. If you set this to 'only when used' then it will be just-in-time initialization.
// Breaking this into two lines that can easily be combined. This way makes debugging easier :)
provValue = system.getTDIProperty("failed.pwdStore") || "File"; // File is my default here if prop not set
return provValue.toLowerCase().indexOf("file") >= 0; // Does the prop value contain 'file', e.g. file,ldap.
Hope this helps, Shashi
Thank You very much for the reply Eddie.
if i drag my FileConnector before the IF Branch i.e on Top of IF Branch, will it write to the file based on the below script ?
return system.getTDIProperty("failed.pwdStore").equalsIgnoreCase("File");
FileConnector
IF:WriteToFile (Initiaze "only when used")
LDAPConnector
Thanks in Advance
I am going to ask you to hit the Debug button (next to Run In Console) for your AssemblyLine. Then in the next screen that appears, press the Debugger button you see appear at the far right of the next screen. (This second step of choosing the full Debugger over the DataStepper you will only have to do once)
Once in the AL Debugger you can use the second stepping button to move from one component to the next. In this way you will answer your own question, Shashi :)
For more hints on using the debugger: https://ibm.biz/Bdjiy3
I can't thank you enough Eddie. I got it figured out. Thanks again :-)
So glad you liked it. It's at multiple spots in my getting started recipe (https://ibm.biz/BdjiM6)
:Ddie

Loading...