security-context

Service not able to access a mapped drive

假装没事ソ 提交于 2019-12-04 20:32:28
I have read in many forums that mapped drives are not accessible from a service as no user is logged on. Question 1) I tried making my service as a log on - as some account and i had my network drive mapped in that very account. The service still cannot access it. Why? Question 2) From the same sevice, i invoke another process. Under what user account will the process run? Thanks 1) Use UNC paths instead, then you do not need access to mapped drive letters. As to why you cannot access them even when running in the same account, it is hard to say for sure without seeing your actual code. 2) it

How do I start a thread in a different security context?

六眼飞鱼酱① 提交于 2019-11-27 13:40:35
How to start a thread in the security context of a different user? When a process starts a thread normally the security context is also passed but how to launch a thread in a different security context with the principal of a different user? I believe that you can just set the CurrentPrincipal as first operation of the thread code after the thread has started, and only then begin to execute the code which is supposed to run with the other principal. This should take care of any .NET role-based checks. If you need impersonation as well for calls to the OS, you can impersonate the

Declaring Spring Bean in Parent Context vs Child Context

◇◆丶佛笑我妖孽 提交于 2019-11-26 18:23:16
I have a spring bean (dao) object which I instantiate in my ServletContext via the following xml: <bean id="userDao" class="com.company.dao.impl.UserDaoImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> This bean is declared inside my webapp-servlet.xml file and is used by my app within the ServletContext. I am also using SpringSecurity. It is my understanding that this runs in a different context (the SecurityContext). My application has a webapp-security.xml where I instantiate a custom authentication provider. I would like to use my dao that is used in my app to also do

Declaring Spring Bean in Parent Context vs Child Context

那年仲夏 提交于 2019-11-26 06:16:27
问题 I have a spring bean (dao) object which I instantiate in my ServletContext via the following xml: <bean id=\"userDao\" class=\"com.company.dao.impl.UserDaoImpl\"> <property name=\"sessionFactory\" ref=\"sessionFactory\" /> </bean> This bean is declared inside my webapp-servlet.xml file and is used by my app within the ServletContext. I am also using SpringSecurity. It is my understanding that this runs in a different context (the SecurityContext). My application has a webapp-security.xml