000025066 - How to test EFN Functionality

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000025066
IssueHow to test EFN Functionality
Resolution

The following procedure can be used to add an IP address into the EFN data tables for testing purposes


1)  Save the atatched code as HashIP.java


2)  Compile the java class"


    javac HashIP.java


3) Run the java program to generate the hash value


   java HashIP 192.168.0.24


   String: 192.168.0.24 hashedValue is: zfcUMKgfIfVH/wwJ9CZBmDRvhHI=


4) Insert the hashed value into the efn Data tables use SQL


insert into efn_local_data values(getdate(),getdate(),'IP','zfcUMKgfIfVH/wwJ9CZBmDRvhHI=',-1,-1,-1,'1/1/09',920,getdate());


insert into efn_local_metadata values(getdate(),'S',0,1);


5) Test Adaptive Authentication from the machine with IP address 192..168.0.24 your EFN rule should fire. 


 

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;


public class HashIP {



 public static void main(String[] args)
 {
  String IP=args[0];
  try
  {
      MessageDigest m_md = MessageDigest.getInstance("SHA1");
      String hashed_ip = new sun.misc.BASE64Encoder().encode(m_md.digest(IP.getBytes()));
      System.out.println("String: "+IP+" hashedValue is: "+hashed_ip);
  }catch (Exception ex)
  {
   System.out.println("catched exception"+ex.getMessage());
  }
 }
  
}

Legacy Article IDa38923

Attachments

    Outcomes