Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF integration with AD

managed BEANFeb 26 2016 — edited Feb 29 2016

Hello experts

Very respectfully i come to you wishing some expertise clarifications.

I am researching about users login in ADF application (Jdev 12.1.3, but will update to 12.2.1) with AD credentials.

Standard way to make LDAP calls in ADF

http://java2go.blogspot.pt/2012/05/oracle-adf-with-sso-definitive-guide.html

I´m new at ADF and don´t have a minimal ideia about security logins.

What i need is to know if it´s possible to authenticate in ADF applications with AD username and password.

For what i saw, the answer is yes. But they start mentioning OIM, OID, ADFS, OVD, LDAP, etc..., and this got me confused like: OIM, OID and ADF - Confused!!!

So this got me to the very begining: The only way to achieve the ADF logins with ADUsers is with the above mentioned technologys?

My requirement is to get users login in the ADF application with the same credentials as stored in AD, but without the need to copy them to weblogic (with some provider), nor with the use of any aditional cost expensive tecnhology. Is it possible? How? Any tutorials well detailed would be nice to me.

I also need to be able to manage/create the groups/roles for each user for ADF application wich differ of AD roles/groups.

Hope to made my self clear.

Thanks everyone.

Regards,

Carlos

Comments

vijai
Hi,

I hope you would have gone through these links

http://jobinesh.blogspot.co.uk/2010/12/using-oraclejbodomainarray-with.html
http://jobinesh.blogspot.co.uk/2011/07/tips-on-using-oraclejbodomainarray-as.html

Hoping so, I guess from the details, since the error is ORA , it is raised by the database. please cross check once where you are setting the bind variables that it is set as you intended.

Last but not the least, please verify if the user used to connect with the database by the application has enough rights on 'STRARRAY' object.
vanna
I went through those links, and I am sure the user has enough rights on STRARRAY object.
I noticed that when running application module things work fine if I firstly execute RootView - Master view.
and then double click on VL which shows detail view in table.

The error occurs if I click on ViewLink first. I am not sure if I am even "allowed" to do that.
I set the parameters with "setNamedWhereClauseParam" and print them out before i call super.executeQueryForCollection() and this the output i get:
ExecuteQueryForCollectionRoot
Permission: [AdfIn2Ogrodje.ROOT, AdfIn2Ogrodje.ADMINISTRACIJA, HOME]
[87] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(listOfUserPermission, oracle.jbo.domain.Array@e1af74d9)
[88] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(menuRoot, AdfIn2Ogrodje.ROOT)
//Print before execution.
EXECUTE_MENUROOT menuRoot: AdfIn2Ogrodje.ROOT
EXECUTE_MENUROOT permission: oracle.jbo.domain.Array@e1af74d9
    Permission: AdfIn2Ogrodje.ROOT
    Permission: AdfIn2Ogrodje.ADMINISTRACIJA
    Permission: HOME
[89] MetVMenuRoot1>#q computed SQLStmtBufLen: 537, actual=447, storing=477
[90] SELECT MetVMenu.CHILD_ID,         MetVMenu.CHILD_IME_MODULA,         MetVMenu.PARENT_ID,         MetVMenu.PARENT_IME_MODULA,         MetVMenu.ZST,         MetVMenu.NIVO,         MetVMenu.CHILD_NAZIV_V_MENIJU,         MetVMenu.CHILD_TIP_MODULA,         MetVMenu.CHILD_OPIS_MODULA FROM MET_V_MENU MetVMenu WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
[91] ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1 Created new QUERY statement
[92] Bind params for ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1
[93] Binding null of type 12 for "menuRoot"
[94] Binding null of type 12 for "listOfUserPermission"
protected void executeQueryForCollection(Object object, Object[] object2, int i) {
        System.out.println("ExecuteQueryForCollectionRoot");
        setParametersForSessionTest(); // method where i set the parameters.
        printExecute(); // printing
        super.executeQueryForCollection(object, object2, i);
    }
After a few clicks on OK button the query executes normally.
What I am guessing is, that executeQueryForCollection just takes whatever is in object2 and that's null at the beginning.
I tried to use this method, which sets the bind variables in object2. And it gives me "Invalid column type" error.
http://packtlib.packtpub.com/library/9781849684767/ch04lvl1sec07
vanna
After printing out object2 elements I found out, that I must pass Array as oracle.sql.ARRAY.
I got the Invalid column type because I used oracle.jbo.domain.Array
Any idea how to do that?
vanna
With further exploration I now use only prepareRowSetForQuery(), where bind variables are set before executeQuery or executeQueryForCollection are called.
executeQuery or executeQueryForCollection methods are now not overridden anymore.
public void prepareRowSetForQuery(ViewRowSetImpl viewRowSetImpl) {
        System.out.println("PrepareRowSetForQueryROOT");
       // Number departmentId = vrsImpl.ensureVariableManager().setVariableValue( "DepartmentId", departmentId); super.prepareRowSetForQuery(vrsImpl); }
        viewRowSetImpl.ensureVariableManager().setVariableValue("menuRoot", "ROOT");
        viewRowSetImpl.ensureVariableManager().setVariableValue("listOfUserPermission", getUserPermissionArray().getArray());

        super.prepareRowSetForQuery(viewRowSetImpl);
    }
	
	getUserPermissionArray() returns oracle.jbo.domain.Array
	
It's wokring fine in application module, however on a jsp page I get only the first result of every level in tree table.
For exampe if this is my menu:
ROOT
	 -MENU1
		- ITEM1
		- TTEM2
	 -MENU2
		- ITEM1
		- TTEM2	
the tree table only shows this:
 ROOT
	-MENU1
		-ITEM1
	-MENU2
		-ITEM1	
Edited by: vanna on 29.1.2013 3:33
vanna
Answer
prepareRowSetForQuery() solved the problem for me. The Array bind variable was null and that was the reason for inconsistent datatype error.
What concerns the tree error -> it was a mistake in cardinality definition.
Marked as Answer by vanna · Sep 27 2020
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 28 2016
Added on Feb 26 2016
10 comments
2,080 views