- package com.oimacademy.NeedEvaluate;
- import java.util.List;
- import jxxload_help.PackageManager;
- import com.oimacademy.connection.Platform;
- import oracle.iam.platform.entitymgr.NoSuchEntityException;
- import oracle.iam.platform.entitymgr.exception.AccessDeniedException;
- import oracle.iam.platform.entitymgr.exception.EntityAlreadyExistsException;
- import oracle.iam.platform.entitymgr.exception.EntityCreateException;
- import oracle.iam.platform.entitymgr.exception.EntitySearchException;
- import oracle.iam.platform.entitymgr.exception.ValidationFailedException;
- import oracle.iam.platform.entitymgr.vo.AbstractEntityTypeManagerResult;
- import oracle.iam.platform.entitymgr.vo.EntityConstants;
- import oracle.iam.platform.entitymgr.vo.SearchCriteria;
- import oracle.iam.policyengine.api.PolicyTypeManager;
- import oracle.iam.policyengine.api.RuleManager;
- import oracle.iam.policyengine.vo.Condition;
- import oracle.iam.policyengine.vo.PolicyType;
- import oracle.iam.policyengine.vo.Rule;
- public class CreateIDARule {
- protected RuleManager ruleManager;
- public static void main(String[] args) throws ValidationFailedException, EntityAlreadyExistsException, EntityCreateException, AccessDeniedException, EntitySearchException, NoSuchEntityException {
- //API to retrieve policy Type Manager
- PackageManager ptm = Platform.getService(PolicyTypeManager.class);
- SearchCriteria sc1 = new SearchCriteria(EntityConstants.NAME, "Identity Audit", SearchCriteria.Operator.EQUAL);
- List<PolicyType> ptList = ptm.search(sc1, null, null);
- PolicyType pt = ptList.get(0);
- RuleManager ruleManager = Platform.getService(RuleManager.class);
- String ruleName = "TestRule_3";
- String lhs ="appType[ABC].appInstance[ABC].account[*]";
- String rhs ="CN=ABC,DC=abc,DC=com";
- Rule ruleCreate = new Rule();
- Condition trivialCondition = new Condition(lhs, rhs, Condition.Operator.ENDS_WITH);
- ruleCreate.setAttribute(Rule.Attribute.NAME.attributeName,ruleName);
- ruleCreate.setAttribute(Rule.Attribute.DESCRIPTION.attributeName," API Rule Creation "+ruleName);
- ruleCreate.setAttribute(Rule.Attribute.TYPE_ID.attributeName,(String)pt.getEntityId());
- ruleCreate.setAttribute(Rule.Attribute.CONDITION.attributeName,trivialCondition);
- AbstractEntityTypeManagerResult result = ruleManager.create(ruleCreate);
- System.out.println(" ID -> "+result.getEntityId());
- }
- }
Oracle Identity Manager(OIM) is the Provisioning Solution from oracle. This page contains an index with references to all OIM related posts in the oracle identity manager Academy blog. The posts included herein are intended to provide oracle identity management customers and developers with technical information about best practices for implementing OIM based solutions.
OIM API to Create IDA Rule
Subscribe to:
Post Comments (Atom)
-
Connection Related API's : OIM DB Connection/ Data Source connection OIMClient API / OIMConnection API OIM Platform API to getSer...
-
Error : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframewor...
-
In this post, we set the middle name as “MiddleName” if user does not provide middle name during user create operation. Below are high...
No comments:
Post a Comment