Comments on: Implement JAAS based Authentication and Authorization for ADF Faces applications on OC4J 10.1.3 https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/ Friends of Oracle and Java Sat, 01 Aug 2015 11:10:05 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Peter https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4114 Wed, 24 Jun 2009 07:12:29 +0000 http://technology.amis.nl/blog/?p=1426#comment-4114 Hi Lucas,
I’ve a problem. isUserInRole() method returns everytime true.
I don’t know why.
Please reply me which will help me .

Thanks
Peter

]]>
By: Laci P. https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4113 Mon, 22 Jun 2009 13:22:29 +0000 http://technology.amis.nl/blog/?p=1426#comment-4113 I solved!

L.

]]>
By: Laci P. https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4112 Mon, 22 Jun 2009 13:04:46 +0000 http://technology.amis.nl/blog/?p=1426#comment-4112 I can write out the role name in isUserInRole() method.
But it returns false everytime.

Laci

]]>
By: Laci P. https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4111 Mon, 22 Jun 2009 13:02:24 +0000 http://technology.amis.nl/blog/?p=1426#comment-4111 Hi Lucas,
your tutorial is very usefull for me, the authentication is working very well but the authorization it’s not :(
I added the test user to the manager role on weblogic admin console.
When I would like to show an adf component only for the manager role the method:

public boolean isUserInRole(String role) {
return FacesContext.getCurrentInstance().getExternalContext().isUserInRole(role);
}

return with false.
I have no errors.
What’s the problem?
Thank you for your help!
Laci

]]>
By: zakir https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4110 Mon, 18 May 2009 17:06:58 +0000 http://technology.amis.nl/blog/?p=1426#comment-4110 Hi Lucas Jellema ,

Is there such demo source for Jdeveloper 11g version? or can I need to know about process J_security form action and its use case process .
Please reply me which will help me .

Thanks
zakir
====

]]>
By: Vimalan Balan https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4109 Sat, 10 May 2008 09:47:30 +0000 http://technology.amis.nl/blog/?p=1426#comment-4109 Hi,

I need help to run my application in standalone oc4j instance. I developed application using JDeveloper 10.1.3.3, EJB3.0, Toplink and ADF. Its working fine when i run through the embedded oc4j in JDeveloper and onPageLoad method is called and executed perfectly but its not happening in the standalone server.

After deploying my application in standalone oc4j instance, i am facing issues now.

1. 2008-05-10 12:11:29.039 WARNING could not create validator for validatorId:null and binding:#{bindings.deductionAmt.validator}
2008-05-10 12:11:29.961 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.

2. onPageLoad method is not calling when the page is loaded.

Thanks & Regards
Vimalan Balan

]]>
By: Anshuman https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4108 Fri, 25 Jan 2008 15:14:09 +0000 http://technology.amis.nl/blog/?p=1426#comment-4108 I am getting the following Error while i hit logout

The problem seems to be in the send redirect.

Caused by: java.lang.IllegalStateException: Response has already been committed
at com.evermind.server.http.EvermindHttpServletResponse.resetBuffer(EvermindHttpServletResponse.java:2107)
at javax.servlet.ServletResponseWrapper.resetBuffer(ServletResponseWrapper.java:202)
at javax.servlet.ServletResponseWrapper.resetBuffer(ServletResponseWrapper.java:202)
at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:249)
at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:168)
at oracle.oc4j.security.OC4JPrivilegedAction.run(OC4JPrivilegedAction.java:41)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.oc4j.security.OC4JSecurity.internalDoPrivileged(OC4JSecurity.java:374)
at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:389)
at com.evermind.server.http.OC4JRequestDispatcher.executeAction(OC4JRequestDispatcher.java:161)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:172)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:633)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
… 16 more

]]>
By: SOnu https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4107 Thu, 17 Jan 2008 12:12:56 +0000 http://technology.amis.nl/blog/?p=1426#comment-4107 Target URL — http://host:port/testapp-context-root/testservlet
Jan 17, 2008 5:20:18 PM oracle.security.jazn.oc4j.OC4JUtil doJAASLogin
WARNING: Login Failure: all modules ignored
javax.security.auth.login.LoginException: Login Failure: all modules ignored
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

]]>
By: Sonu https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4106 Thu, 17 Jan 2008 12:10:44 +0000 http://technology.amis.nl/blog/?p=1426#comment-4106 Hi tried this sample, worked very well in the first attempt, but the next day when i tried executing this ( trying from embeded oc4j ) getting following error –

Target URL — http://host:port/testapp-context-root/helloservlet
Jan 17, 2008 5:20:18 PM oracle.security.jazn.oc4j.OC4JUtil doJAASLogin
WARNING: Login Failure: all modules ignored
javax.security.auth.login.LoginException: Login Failure: all modules ignored
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

I am quite new to java, kindly help

Thanks
sonu

]]>
By: Rob Clevenger https://technology.amis.nl/2006/12/10/implement-jaas-based-authentication-and-authorization-for-adf-faces-applications-on-oc4j-1013/#comment-4105 Mon, 11 Dec 2006 21:05:38 +0000 http://technology.amis.nl/blog/?p=1426#comment-4105 Instead of String currentWebUser = ((SessionImpl)getDBTransaction().getSession()).getUserPrincipalName());

You can also just use the getUserPrincipalName() method on ApplicationModuleImpl directly for use in your prepareSession method, etc.

I do this in my blog app’s prepareSession method as well.

http://svn.robsite.org:81/svn/adfblogger/adfblogger-admin/trunk/ModelAdmin/src/org/robsite/blogger/modelbc/services/BlogServiceImpl.java

]]>