markDeviceSafe IsDeviceMarkedSafe Oracle Adaptive Access Manager APIs

4-14 Oracle Fusion Middleware Developers Guide for Oracle Adaptive Access Manager

4.5.13 clearSafeDeviceList

clearSafeDeviceList clears the user safe device list of the user associated with a request. public VCryptBooleanResponse clearSafeDeviceListString requestId;

4.6 Rules Engine

The Rules Engine is the part of the OAAM that enforces policies at checkpoint. OAAM includes APIs to evaluate policies that return results depending on the calling context. The following section provides details of the method processRules and on how to get the device ID.

4.6.1 processRules

processRules processes policy sets for the passed checkpoints. public VCryptRulesResult processRulesString requestId, List runtimeTypes, Map contextMap; public VCryptRulesResult processRulesString requestId, Date requestTime, List runtimeTypes, Map contextMap; processRules calls the methods related to the Rules Engine, gets an instance of the Rules Engine by calling the method VCryptTrackerUtil.getVCryptRulesEngineInstance . Table 4–12 IsDeviceMarkedSafe Parameters Parameter Description requestId The login session ID; this is the ID that should be used in all API calls for the login session Table 4–13 clearSafeDeviceList Parameters Parameter Description requestId The ID for the login session. The same ID should be used for all the calls to Bharosa API for the login session. Table 4–14 processRules Parameters Parameter Description requestId The login session ID; this is the ID that should be used in all API calls for the login session runtimeTypes The list of checkpoints to be evaluated; each checkpoint in this list is evaluated. The runtimeTypes is a singleton list of Integer type. Refer to the Information about execution of multiple checkpoints in the processRules method section below. For example, to run a pre-authentication checkpoint, create the following list: List PRE_AUTH_RUNTIME_LIST = Collections.singletonListnew Integer1; requestTime The time at which the request was made contextMap A list of key-value pairs identifying the context data; rules in policies can make decisions based on this data Integrating Native Java Applications 4-15 Information about execution of multiple checkpoints in the processRules method 1. The order of checkpoint evaluation is based on the order of those in the List. The OAAM Rules Engine iterates over the list of checkpoints and evaluates one checkpoint at a time. 2. The result of each checkpoint evaluation is stored into ResultMap with CheckPointId as the key and VCryptRulesResult as the value. 3. The ResultMap is then set onto VCryptRulesResult. 4. VCryptRulesResult is returned as the result of processRules method. 5. If there is a failure in execution of any checkpoint, the corresponding VCryptRulesResult in ResultMap will capture that information, but the execution of other checkpoints is not impacted. However, if there is a system failure, then the result of processRules itself will have the details of the error. It is recommended to test the success status of result from processRules method before the caller tries to fetch result of each checkpoint execution. Getting Device ID In addition to rule results, the Rules Engine can return a device ID, an internal identifier identical to the user session. The following code sample illustrates how to get a device ID: VCryptRulesResult rulesResult = new VCryptRulesEngineImpl.processRulesparams..; If rulesResult.getVCryptResponse.isSuccess { Logger.errorError running rules + rulesResult.getVCryptResponse.getErrorMessage; } Long deviceId = rulesResult.getDeviceId; When getting a device ID, make sure that: ■ The Oracle Adaptive Access Manager version is 10.1.4.5 or above ■ The property bharosa.tracker.send.devideId is set to true, so the device ID can be captured: bharosa.tracker.send.deviceId=true Valid Checkpoints For list of valid checkpoints, refer to the OAAM enumeration profile.type.enum. For example profile.type.enum.preauth=1 indicates that the Pre-Authentication checkpoint is indicated using the numeric value 1. Location and Device Data With property bharosa.tracker.sendLocationData=true set, location city, state, country names and device data is returned when processRules API is called. VCryptRulesResult rulesResult = processRulesparams; VCryptResponse response = rulesResult.getVCryptResponse; If response.isSuccess {