basic auth with database realm
Ja kub <[email protected]> Tue, 11 Mar 2014 20:28:47 +0100
| Newsgroups | gmane.comp.java.jboss.user |
|---|---|
| Message-ID | <CAJqdOe-N95yPsoEsQb7M7QSKQzb0k7PLESXzPU30ckvc0VxU6A@mail.gmail.com> |
--===============2234578407319100723==
Content-Type: multipart/alternative; boundary=001a11c15ff8a8ce1d04f459ba7c
--001a11c15ff8a8ce1d04f459ba7c
Content-Type: text/plain; charset=ISO-8859-1
Could someone please send full standalone.xml for eap 6.2, or it's vital
parts.
I want to configure basic web.xml auth with database realm, but I always
finish with error.
Is there a difference in configuration between jboss 7.1 and jboss 7.3 and
eap 6.2 ?
In <subsystem xmlns="urn:jboss:domain:security:1.2">
I added
<security-domain name="mysqldomain" cache-type="default">
<authentication>
<login-module code="Database" flag="required">
<module-option name="dsJndiName"
value="java:jboss/datasources/petclinicDS"/>
<module-option name="principalsQuery"
value="select passwd from USERS where login=?"/>
<module-option name="rolesQuery" value="select
role 'Roles' from USER_ROLES where login=?"/>
</login-module>
</authentication>
</security-domain>
database java:jboss/datasources/petclinicDS is ok, it is used in petclinic
app and works.
and in jboss-web.xml:
<jboss-web>
<security-domain>java:/jaas/mysqldomain</security-domain>
also tried with <security-domain>mysqldomain</security-domain>
</jboss-web>
and in web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Sample Realm</realm-name>
</login-config>
<security-role>
<role-name>Manager</role-name>
</security-role>
</web-app>
BR
Jakub
--001a11c15ff8a8ce1d04f459ba7c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div><div><div>Could someone please send full st=
andalone.xml for eap 6.2, or it's vital parts.<br><br></div>I want to c=
onfigure basic web.xml auth with database realm, but I always finish with e=
rror.<br>
</div>Is there a difference in configuration between jboss 7.1 and jboss 7.=
3 and eap 6.2 ?<br><br></div>In <subsystem xmlns=3D"urn:jboss:domai=
n:security:1.2"><br><br></div>I added <br><br>=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 <security-domain name=3D"mysqldomain"=
cache-type=3D"default"><br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <authenticatio=
n><br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 <login-module code=3D"Database" flag=3D"required"=
;><br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 <module-option name=3D"dsJndiName" value=3D&qu=
ot;java:jboss/datasources/petclinicDS"/><br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 <module-option name=3D"principalsQuery" value=3D"s=
elect passwd from USERS where login=3D?"/><br>=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <module-opt=
ion name=3D"rolesQuery" value=3D"select role 'Roles'=
from USER_ROLES where login=3D?"/><br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 </=
login-module><br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 </authentication><br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 </security-domain><br><br>database java:jboss/datasources/petclin=
icDS is ok, it is used in petclinic app and works.<br>
<br></div><div>and in jboss-web.xml:<br><br><jboss-web><br><securi=
ty-domain>java:/jaas/mysqldomain</security-domain><br>also tried w=
ith <security-domain>mysqldomain</security-domain><br></jbos=
s-web><br>
<br></div><div>and in web.xml:<br><p><?xml version=3D"1.0" enc=
oding=3D"UTF-8"?></p><p><web-app xmlns=3D"<a class=3D"=
" href=3D"http://java.sun.com/xml/ns/javaee" rel=3D"nofollow">http://java.s=
un.com/xml/ns/javaee</a>" xmlns:xsi=3D"<a class=3D"" href=3D"http=
://www.w3.org/2001/XMLSchema-instance" rel=3D"nofollow">http://www.w3.org/2=
001/XMLSchema-instance</a>"</p>
<p>=A0=A0=A0 xsi:schemaLocation=3D"<a class=3D"" href=3D"http://java.s=
un.com/xml/ns/javaee" rel=3D"nofollow">http://java.sun.com/xml/ns/javaee</a=
> <a class=3D"" href=3D"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" =
rel=3D"nofollow">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>"=
;</p>
<p>=A0=A0=A0 version=3D"2.5"></p><p><security-constraint>=
;</p><p>=A0=A0=A0 <web-resource-collection></p><p>=A0=A0=A0=A0=A0=A0=
=A0 <url-pattern>/*</url-pattern></p><p>=A0=A0=A0 </web-reso=
urce-collection></p><p>=A0=A0=A0 <auth-constraint></p>
<p>=A0=A0=A0=A0=A0=A0=A0 <role-name>Manager</role-name></p><p>=
=A0=A0=A0 </auth-constraint></p><p></security-constraint></p><p=
><login-config></p><p>=A0=A0=A0 <auth-method>BASIC</auth-met=
hod></p><p>=A0=A0=A0 <realm-name>Sample Realm</realm-name></=
p>
<p></login-config></p><p><security-role></p><p>=A0=A0=A0 <ro=
le-name>Manager</role-name></p><p></security-role></p><p><=
;/web-app></p>BR<br></div><div>Jakub<br></div></div>
--001a11c15ff8a8ce1d04f459ba7c--
--===============2234578407319100723==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
--===============2234578407319100723==--