Appliquer une Authentification Kerberos sur mes WebS ervices, de manière non intrusive ?

Sylvain RICHET <[email protected]> Tue, 30 Aug 2011 16:24:44 +0200
Newsgroups gmane.comp.java.french.general
Message-ID <CAGn21G+1_5f_kX1Z=y2MPo6ei8GxCcgL16R5GdmXKRzrkAO2Xg@mail.gmail.com>
--000e0cd14684eee85f04abb9c572
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Bonjour =E0 Tous,

*Ma probl=E8matique :*
Appliquer une Authentification Kerberos sur ma 10aine de Web Services
publi=E9s, de mani=E8re non intrusive au niveau du code.

*Mon environnement Serveur*
- JONAS 5.1.5
- stack WS : JAX-WS, avec une impl=E9mentation CXF sous-jacente
- mes WS sont d=E9velopp=E9s sous forme d'EJB

*Les questions que je me pose :*
- Puis-je faire cela de mani=E8re non intrusive, c.a.d *sans avoir =E0 ajou=
ter
de code *dans mes WS tant au niveau serveur, qu'au niveau client ?
- Si oui, comment ? Avec WS-Security ? Avec WS-Policy ? En enrichissant la
WSDL de mes WS ?
- Qui joue le r=F4le de SPN Kerberos ? Comment le d=E9clarer ?

*Bien entendu, j'ai pas mal brows=E9. Peut-=EAtre mal ?

*1) Il semblerait que je puisse configurer CXF pour faire du Kerberos,
Ici<http://cxf.apache.org/docs/client-http-transport-including-ssl-support.=
html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentication%28Ke=
rberos%29>
    (... mais rien de bien d=E9taill=E9).

2) Ici <http://cxf.apache.org/docs/configuration.html>, il y a cette petite
phrase qui dit :

> *In some cases it also possible to achieve the same end by extending your
> wsdl contract: you can add CXF specific extension elements to the wsdl:po=
rt
> element and in that way fine tune the behaviour of the specified transpor=
t
> *
>

Aurais-je donc la possibilit=E9 de poser de l'Auth Kerberos rien qu'en
enrichissant mes WSDL ?
C'est sans doute en rapport avec :
- WS-Security / WS-Policy
- WS Kerberos Token Profile

3) Apache CXF s'appuie sur WSS4J comme impl=E9mentation de WS-Security.
CXF s'appuie sur Spring pour tout ce qui est configuration, et probablement
celle li=E9 =E0 la s=E9curit=E9.
Mais ici <http://www.jroller.com/gmazza/entry/cxf_usernametoken_profile>, i=
l
y a cette aussi cette phrase qui dit :

> *CXF provides two main options for adding UsernameToken security headers,
> both of which will be covered below: standard WSS4J interceptors and
> WS-SecurityPolicy.
> The latter, which relies on a WS-Policy element defined within the WSDL,
> offers a more automated approach to using security and is the preferred
> approach if you have this element defined.
> Use WSS4J interceptors when security is not defined in the WSDL or you ne=
ed
> more customized control of the security header construction.
> *
>
Il semblerait donc qu'on ne soit pas oblig=E9 d'utiliser WSS4J...


*Bref, vous l'aurez compris : *
- je suis un peu (beaucoup) paum=E9 dans tout =E7a, glurps
- je recherche un retour d'exp=E9rience


Je connais bien kerberos *en dehors du contexte des WS*.
Je veux dire par l=E0 que je sais impl=E9menter/administrer une Authentific=
ation
Kerberos sur, par ex., une webapp tournant sous Apache
(avec un KDC sous Linux ou sous Windows), d=E9clarer le SPN, r=E9cup=E9rer =
le
KEYTAB, etc. etc....ok.

En revanche, je ne connais pas du tout WS-Security, WS-Policy, ...
C'est pr=E9cis=E9ment l=E0 que =E7a p=EAche !


Merci d'avance =E0 tous ceux qui prendront le temps de me r=E9pondre.
:-)

--000e0cd14684eee85f04abb9c572
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">Bonjour =E0 Tous,<br><br><i>Ma probl=E8matique :=
</i><br>Appliquer une Authentification Kerberos sur ma 10aine de Web Servic=
es publi=E9s, de mani=E8re non intrusive au niveau du code.<br><br><i>Mon e=
nvironnement Serveur</i><br>
- JONAS 5.1.5<br>
- stack WS : JAX-WS, avec une impl=E9mentation CXF sous-jacente<br>- mes WS=
 sont d=E9velopp=E9s sous forme d&#39;EJB<br><br><i>Les questions que je me=
 pose :</i><br>- Puis-je faire cela de mani=E8re non intrusive, c.a.d <i>sa=
ns avoir =E0 ajouter de code </i>dans mes WS tant au niveau serveur, qu&#39=
;au niveau client ?<br>

- Si oui, comment ? Avec WS-Security ? Avec WS-Policy ? En enrichissant la =
WSDL de mes WS ?<br>- Qui joue le r=F4le de SPN Kerberos ? Comment le d=E9c=
larer ?<br><br><i>Bien entendu, j&#39;ai pas mal brows=E9. Peut-=EAtre mal =
?<br>

<br></i>1) Il semblerait que je puisse configurer CXF pour faire du Kerbero=
s, <a href=3D"http://cxf.apache.org/docs/client-http-transport-including-ss=
l-support.html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentic=
ation%28Kerberos%29" target=3D"_blank">Ici</a><br>

=A0=A0=A0 (... mais rien de bien d=E9taill=E9).<br><br>2) <a href=3D"http:/=
/cxf.apache.org/docs/configuration.html" target=3D"_blank">Ici</a>, il y a =
cette petite phrase qui dit :<br><blockquote style=3D"margin:0pt 0pt 0pt 0.=
8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex" class=3D"gma=
il_quote">

<i>In some cases it also possible to achieve the same end by extending your
 wsdl contract: you can add CXF specific extension elements to the=20
wsdl:port element and in that way fine tune the behaviour of the=20
specified transport
		=09
		</i><br></blockquote><br>Aurais-je donc la possibilit=E9 de poser de l&#3=
9;Auth Kerberos rien qu&#39;en enrichissant mes WSDL ?<br>
C&#39;est sans doute en rapport avec :<br>
- WS-Security / WS-Policy<br>
- WS Kerberos Token Profile<br><br>3) Apache CXF s&#39;appuie sur WSS4J com=
me impl=E9mentation de WS-Security.<br>CXF s&#39;appuie sur Spring pour tou=
t ce qui est configuration, et probablement celle li=E9 =E0 la s=E9curit=E9=
.<br>

Mais <a href=3D"http://www.jroller.com/gmazza/entry/cxf_usernametoken_profi=
le" target=3D"_blank">ici</a>, il y a cette aussi cette phrase qui dit :<br=
><blockquote style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(20=
4, 204, 204);padding-left:1ex" class=3D"gmail_quote">

<i>CXF provides two main options for adding UsernameToken security headers,=
 both of which will be covered below: standard WSS4J interceptors and WS-Se=
curityPolicy.<br>The latter, which relies on a WS-Policy element defined wi=
thin the WSDL, offers a more automated approach to using security and is th=
e preferred approach if you have this element defined.<br>

Use WSS4J interceptors when security is not defined in the WSDL or you need=
 more customized control of the security header construction.<br></i><br></=
blockquote>Il semblerait donc qu&#39;on ne soit pas oblig=E9 d&#39;utiliser=
 WSS4J...<br>

<br><br>
<i>Bref, vous l&#39;aurez compris : </i><br>- je suis un peu (beaucoup) pau=
m=E9 dans tout =E7a, glurps<br>- je recherche un retour d&#39;exp=E9rience<=
br><br><br>Je connais bien kerberos <i>en dehors du contexte des WS</i>.<br=
>

Je veux dire par l=E0 que je sais impl=E9menter/administrer une Authentific=
ation Kerberos sur, par ex., une webapp tournant sous Apache<br>(avec un KD=
C sous Linux ou sous Windows), d=E9clarer le SPN, r=E9cup=E9rer le KEYTAB, =
etc. etc....ok.<br>

<br>En revanche, je ne connais pas du tout WS-Security, WS-Policy, ...<br>C=
&#39;est pr=E9cis=E9ment l=E0 que =E7a p=EAche !<br><br><br>Merci d&#39;ava=
nce =E0 tous ceux qui prendront le temps de me r=E9pondre.<br>:-)<br><br>
</div><br>

--000e0cd14684eee85f04abb9c572--