Re: [jboss-dev-forums] [JBoss AS 7 Development] - Using JBoss Negotiation on AS7
by guillaume cornet
guillaume cornet [https://community.jboss.org/people/raoulpetitpied] commented on the document
"Using JBoss Negotiation on AS7"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-16876#comment-11198
--------------------------------------------------
@Tim H
You can acheive the same results in a 'cleaner' way, with the PropertiesRolesMappingProvider.
Just replace your 'RealmUsersRoles' login-module with :
<mapping>
<mapping-module code="PropertiesRoles" type="role">
<module-option name="rolesProperties" value="/path/to/users-roles-mapping.properties" />
</mapping-module>
</mapping>
And the content of '/path/to/users-roles-mapping.properties' should be
username@DOMAIN=Users
username2@DOMAIN=Users
username3@DOMAIN=Users
An alternate solution is to use the 'SimpleRolesMappingProvider' mapping-module :
<mapping>
<mapping-module code="SimpleRoles" type="role">
<module-option name="username@DOMAIN" value="Users" />
<module-option name="username2@DOMAIN" value="Users" />
<module-option name="username3@DOMAIN" value="Users" />
</mapping-module>
</mapping>
Cheers
--------------------------------------------------
10 years, 3 months
[JBoss AS 7 Development] - Re: Configure AS7 to authenticate users with kerberos
by guillaume cornet
guillaume cornet [https://community.jboss.org/people/raoulpetitpied] created the discussion
"Re: Configure AS7 to authenticate users with kerberos"
To view the discussion, visit: https://community.jboss.org/message/779159#779159
--------------------------------------------------------------
Hi Antoan,
I faced the same problem (e.g. 'Checksum failed'), and, in my case, I solve this error by changing the 'host' security-domain configuration.
According to https://community.jboss.org/docs/DOC-16876 https://community.jboss.org/wiki/DRAFTUsingJBossNegotiationOnAS7, the 'host' security-domain should be configured like that :
<security-domain name="host" cache-type="default">
<authentication>
<login-module code="Kerberos" flag="required">
<module-option name="storeKey" value="true"/>
<module-option name="useKeyTab" value="true"/>
<module-option name="principal" value="host/testserver@MY_REALM"/>
<module-option name="keyTab" value="/home/username/service.keytab"/>
<module-option name="doNotPrompt" value="true"/>
<module-option name="debug" value="false"/>
</login-module>
</authentication>
</security-domain>
In my case, the solution was to configure it like that :
<security-domain name="host" cache-type="default">
<authentication>
<login-module code="Kerberos" flag="required">
<module-option name="storeKey" value="true"/>
<module-option name="useKeyTab" value="true"/>
<module-option name="principal" value="HTTP/{testserver}"/>
<module-option name="keyTab" value="/home/username/service.keytab"/>
<module-option name="doNotPrompt" value="true"/>
<module-option name="debug" value="false"/>
</login-module>
</authentication>
</security-domain>
where {testserver} is the FQDN of the machine.
Cheers
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779159#779159]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
10 years, 3 months
[JBoss AS 7 Development] - Re: Apache CXF and RESTful web services...
by Dennis Kieselhorst
Dennis Kieselhorst [https://community.jboss.org/people/kieselhorst] created the discussion
"Re: Apache CXF and RESTful web services..."
To view the discussion, visit: https://community.jboss.org/message/779129#779129
--------------------------------------------------------------
I'd also like to use CXF as JAX-RS provider and tried to exclude Resteasy in jboss-deployment-structure.xml as follows:
<module name="org.jboss.resteasy.resteasy-atom-provider"/>
<module name="org.jboss.resteasy.resteasy-cdi"/>
<module name="org.jboss.resteasy.resteasy-jaxrs"/>
<module name="org.jboss.resteasy.resteasy-jaxb-provider"/>
<module name="org.jboss.resteasy.resteasy-jackson-provider"/>
<module name="org.jboss.resteasy.resteasy-jsapi"/>
<module name="org.jboss.resteasy.resteasy-multipart-provider"/>
<module name="org.jboss.resteasy.async-http-servlet-30"/>
Unfortunately this doesn't work:
Caused by: java.lang.ClassCastException: org.jboss.resteasy.core.ServerResponse cannot be cast to org.apache.cxf.jaxrs.impl.ResponseImpl
at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:975)
... 61 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779129#779129]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
10 years, 3 months
[JBoss AS 7 Development] - Unable to lookup datasource in jboss-as-7.2.0.Alpha1-SNAPSHOT
by Prasad M
Prasad M [https://community.jboss.org/people/mp_lbi] created the discussion
"Unable to lookup datasource in jboss-as-7.2.0.Alpha1-SNAPSHOT"
To view the discussion, visit: https://community.jboss.org/message/779092#779092
--------------------------------------------------------------
I have developed a simple web application to lookup the datasource 'java:jboss/datasources/ExampleDS'.
Below is the logic in the init method of my servlet:
strDSName = "java:jboss/datasources/ExampleDS";
Context ctx = new InitialContext();
ds = (javax.sql.DataSource) ctx.lookup(strDSName);
I am starting jboss in domain mode and when I invoke the servlet I am getting the NamingException,
below is the stacktrace:
16:53:58,445 INFO [stdout] (http-localhost/127.0.0.1:8081-1) Trying to get -->java:jboss/datasources/ExampleDS
16:53:58,461 ERROR [stderr] (http-localhost/127.0.0.1:8081-1) javax.naming.NameNotFoundException: datasources/ExampleDS -- service jboss.naming.context.java.jboss.datasources.ExampleDS
16:53:58,461 ERROR [stderr] (http-localhost/127.0.0.1:8081-1) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)
*Just fyi the same code works well in jboss-as-7.1.1.Final.*
Please suggest if anything else has to be done to make it work on jboss-as-7.2.0.Alpha1-SNAPSHOT
PFA the sample web application.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779092#779092]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
10 years, 3 months