Transparent authentication for special user

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Transparent authentication for special user

temp-7
I have web authentication enabled on one of my pages and everything
works OK. Now, in JAAS I have a special user defined and I would like to
allow this user to login without having to enter a user/pass. The idea
is to send some kind of a ticket within the URL, this would be checked
on the server, and if the ticket is OK, the user would automatically be
logged in, without the login form being displayed.

I believe this should be possible, but I just can't seem to find the
direction in which to go. Any pointers would be greatly appreciated.

This is what is currently being used for authentication:

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>HtmlAdaptor</web-resource-name>
      <!-- Define the context-relative URL(s) to be protected -->
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>GenUser</role-name>
    </auth-constraint>
  </security-constraint>

  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test</realm-name>
  </login-config>
 
  <security-role>
    <role-name>GenUser</role-name>
  </security-role>

In case it matters, I'm using Jetty/4.2.9 with JBoss 3.0.8


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Transparent authentication for special user

Greg Wilkins-5

Unfortunately the standard authentication mechanisms are not going to support you
in this!

They do not allow any custom request handling before the authentication mechanisms
are applied.  Thus you can't do any special token handling.

I would recomment not using container authentication and to write your own
filter to do the authentication for you.  You can then make all your
own exceptions to your hearts content!

cheers


[hidden email] wrote:

> I have web authentication enabled on one of my pages and everything
> works OK. Now, in JAAS I have a special user defined and I would like to
> allow this user to login without having to enter a user/pass. The idea
> is to send some kind of a ticket within the URL, this would be checked
> on the server, and if the ticket is OK, the user would automatically be
> logged in, without the login form being displayed.
>
> I believe this should be possible, but I just can't seem to find the
> direction in which to go. Any pointers would be greatly appreciated.
>
> This is what is currently being used for authentication:
>
>   <security-constraint>
>     <web-resource-collection>
>       <web-resource-name>HtmlAdaptor</web-resource-name>
>       <!-- Define the context-relative URL(s) to be protected -->
>       <url-pattern>/*</url-pattern>
>     </web-resource-collection>
>     <auth-constraint>
>       <role-name>GenUser</role-name>
>     </auth-constraint>
>   </security-constraint>
>
>   <login-config>
>     <auth-method>BASIC</auth-method>
>     <realm-name>Test</realm-name>
>   </login-config>
>  
>   <security-role>
>     <role-name>GenUser</role-name>
>   </security-role>
>
> In case it matters, I'm using Jetty/4.2.9 with JBoss 3.0.8
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support