I have a retail system where the central node is corp-0 and store node is store-1, store-2, etc. I am using SymmetricDS 3.5.13 to do sync between a store node and a corp node. I have to authenticate every store node that tries to connect the corp node, even after successful registration using my business logic. Using a class implementing INodePasswordFilter, how can I retrieve the connection requesting store's external-id ? Any help on the configuration and work flow of SymmetricDS password rendering and saving is appreciated. The class implementation I tried is as given below.
public class AuthenticationClinic implements INodePasswordFilter,IParameterFilter, INodeGroupExtensionPoint{
@Override
public String onNodeSecurityRender(String password) {
// I have to get the NodeGroupId and ExternalId of the
// requesting node here
// String external_id= *Method to retrieve External Id of Requesting Node*
// if(checking.checknodeauthenticity(external_id)) return password;
// else return "dummy";
return "dummy";
}
@Override
public String onNodeSecuritySave(String password) {
return password;
}
@Override
public String[] getNodeGroupIdsToApplyTo() {
return new String[] { "store" };
}
@Override
public String filterParameter(String key, String value) {
return value;
}
public boolean isAutoRegister() {
return false;
}