You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gina Choi <gi...@gmail.com> on 2012/09/24 19:12:38 UTC

Problem with Running command line batch jobs in Fediz SSO

Hello,

I don't have problem with Fediz SSO when user interactions available. User
can enter user name and password when they challenged credentials.

The problem is that we are loading large resources into database through
command line jobs. How can we authenticate user in this case? I have to find
a way to programmatically authenticate a user. Our web application has to
run continuously during the batch job.

Any ideas would be appreciated.

Gina






--
View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Gina Choi <gi...@gmail.com>.
I forgot mention previously. We had to set <url-pattern>/*</url-pattern> for
<security-constraint> in the web.xml.



--
View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714695.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Glen Mazza <gm...@talend.com>.
Thanks for letting us know.  I wonder if this is a complete solution; 
i.e., no separate plugin for Fediz for command-line apps (like we 
presently have for Tomcat) would be helpful/necessary.

Glen

On 09/25/2012 06:20 PM, Gina Choi wrote:
> Hi,
>
> I found answer. In case someone want to know as well. Just do not set
> <auth-constraint> in <security-constraint>.
>
> Thanks.
>
> Gina
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714743.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza


Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Gina Choi <gi...@gmail.com>.
Hi,

I found answer. In case someone want to know as well. Just do not set
<auth-constraint> in <security-constraint>.

Thanks.

Gina



--
View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714743.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Gina Choi <gi...@gmail.com>.
Thanks Glen.

Does any one know if I can set <url-pattern> in the applications web.xml
exclusively? For example, I want to protect all url patterns except
/no-protection/*.


  <security-constraint>
   <web-resource-collection>
    <web-resource-name>Protected Area</web-resource-name>
    <url-pattern>/lib/*</url-pattern>
   </web-resource-collection>
   <auth-constraint>
    <role-name>*</role-name>
   </auth-constraint>
  </security-constraint>

Thanks.

Gina



--
View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714742.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Glen Mazza <gm...@talend.com>.
OK, it seems like we need another plugin for Fediz ("Fediz plugin for 
[plain] Java"?).  Once done, it can be brought into Ant scripts using 
Ant's java or exec tasks.

Glen

On 09/25/2012 10:23 AM, Gina Choi wrote:
> Hi Glen,
>
> Thanks for your response.
>
> My situation is that we are invoking http calls from a Ant script. If you
> look at FederationAuthenticator.java cass in Fediz Plugin for Tomcat, there
> is a authenticate method. Without satisfying conditions it requires, it
> wouldn't allow http requst pass through.
>
> I looked at links you provided, but I am not sure how can I get around this
> issues.
>
> Thanks.
>
> Gina
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714687.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza


Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Gina Choi <gi...@gmail.com>.
Hi Glen,

Thanks for your response.

My situation is that we are invoking http calls from a Ant script. If you
look at FederationAuthenticator.java cass in Fediz Plugin for Tomcat, there
is a authenticate method. Without satisfying conditions it requires, it
wouldn't allow http requst pass through.

I looked at links you provided, but I am not sure how can I get around this
issues.

Thanks.

Gina



--
View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576p5714687.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Problem with Running command line batch jobs in Fediz SSO

Posted by Glen Mazza <gm...@talend.com>.
I haven't done this before, but I wonder if the command-line HTTP 
utility cURL (http://curl.haxx.se/docs/manpage.html) might be able to 
help you out (look at the bottom here for basic examples of its usage: 
http://people.apache.org/~gmazza/restexamples/jacksonjsonprovider). 
Another possibility is Apache HTTP components which is used in our REST 
basic_https sample: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/basic_https/.

If either (or neither!) of the above work, please let us know.

Thanks,
Glen

On 09/24/2012 01:12 PM, Gina Choi wrote:
> Hello,
>
> I don't have problem with Fediz SSO when user interactions available. User
> can enter user name and password when they challenged credentials.
>
> The problem is that we are loading large resources into database through
> command line jobs. How can we authenticate user in this case? I have to find
> a way to programmatically authenticate a user. Our web application has to
> run continuously during the batch job.
>
> Any ideas would be appreciated.
>
> Gina
>
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Problem-with-Running-command-line-batch-jobs-in-Fediz-SSO-tp5714576.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza