我们正在使用Java安全API生成数字签名(PKCS7).摘要算法为SHA-256,加密算法为RSA(SHA256withRSA).
在本地计算机中使用SunRsaSign提供程序,在某些内容上生成了签名.在WAS 8.0.0.2中使用IBMJCE提供程序,我们能够在相同的内容上生成相同的签名.
但问题是,我们不得不迁移回WAS 6.1.现在,生成的签名与上述2个生成的签名不同.我检查了所有3个案例中创建的消息摘要,并且在所有3个案例中都是相同的,但是在WAS 6.1的情况下签名是不同的.
WAS 6.1的IBMJCE提供商在SHA256withRSA加密方面是否存在任何已知问题?任何指针都将非常感激.谢谢
我有一个spring mvc web应用程序,我需要更改类加载器.我需要将类加载器更改为等于PARENT_LAST.我正在使用WAS 6.1并且已经有一个jacl脚本来自我之前可以复制的Web应用程序来完成这项工作.
在最后一个应用程序中使用了Apache ant,他们所做的是使部署依赖于运行jacl脚本.
在我的新Web应用程序中,我使用maven install来创建war文件,并将该war文件部署到我的应用程序服务器.
如何使用maven将类加载器设置为PARENT_LAST?我知道如何在控制台中执行此操作,但如果有办法使用脚本执行它会很好.
此设置也将放置在war文件中的某个位置,以便在部署应用程序时将获取该设置.这个问题来自于我对jacl脚本如何工作缺乏了解?
谢谢
首先,我将从摘要开始.我正在使用Apache CXF客户端通过SSL与使用自签名证书的Apache CXF服务提供商进行通信.我将证书导入到客户端服务器的WebSphere信任,但我仍然收到"javax.net.ssl.SSLHandshakeException:出现SSLHandshakeException调用https://somesvcprovider.com/appname/svc/myservice:com.ibm.jsse2.util .h:找不到可信证书"例外.
现在,这是详细信息:
我有一个Apache CXF Web服务客户端,我使用Spring进行配置,客户端部署到WebSphere 6.1应用程序服务器.CXF客户端与不同WebSphere服务器上的Apache CXF服务提供程序进行通信.通信使用SSL.
服务提供商使用自签名证书.我已经通过管理控制台将提供者的证书导入客户端服务器上的WebSphere信任库.我通过SSL证书和密钥管理> SSL配置> NodeDefaultSSLSettings>密钥库和证书> NodeDefaultTrustStore>签署者证书完成了这项工作; 然后我使用"从端口检索"工具导入证书.
但是,在尝试联系服务提供者时仍然收到此错误:"javax.net.ssl.SSLHandshakeException:SSLHandshakeException调用https://somesvcprovider.com/appname/svc/myservice:com.ibm.jsse2.util.h:找不到可信证书".
Spring配置文件如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<http:conduit name="*.http-conduit">
<!-- deactivate HTTPS url hostname verification (localhost, etc) -->
<!-- WARNING ! disableCNcheck=true should not used in production. -->
<http:tlsClientParameters disableCNCheck="true" />
</http:conduit>
<!-- Read properties from property file(s). -->
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!-- The *.spring.properties files are prefixed …
Run Code Online (Sandbox Code Playgroud) 在Websphere 6 ibm-web-bnd.xmi文件中我有
<?xml version="1.0" encoding="UTF-8"?>
<webappbnd:WebAppBinding xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:webappbnd="webappbnd.xmi"
xmi:id="WebAppBinding_1294064796872"
virtualHostName="default_host">
<webapp href="WEB-INF/web.xml#WebApp_ID"/>
<resRefBindings xmi:id="ResourceRefBinding_1294083767913" jndiName="jdbc/ABC_DEFG">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_1294083767913"/>
</resRefBindings>
</webappbnd:WebAppBinding>
Run Code Online (Sandbox Code Playgroud)
我想升级到Websphere 7并使用默认的ibm-web-bnd.XML文件,但我不知道如何更新它...有人可以提供一些想法.谢谢
<?xml version="1.0" encoding="UTF-8"?>
<web-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd"
version="1.0">
<virtual-host name="default_host" />
<!--WHAT TO PUT HERE FOR jdbc/ABC_DEFG -->
</web-bnd>
Run Code Online (Sandbox Code Playgroud) 我正在运行包含以下组件的应用程序:
在从Web控制器到服务层的每个请求中(使用Spring的@Transactional注释),我注意到对于Hibernate在事务内部的服务调用期间执行的每个SQL查询,都会从jndi DataSource请求新的DataSource连接. Hibernate的ConnectionProvider,直到DataSource用完了空闲连接并最终挂起.
以下是配置的一部分:
弹簧:
<tx:annotation-driven />
<context:component-scan base-package="org.home.myapp" />
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/DS" resource-ref="true"/>
<bean id="transactionManager" class="org.springframework.transaction.jta.WebSphereUowTransactionManager"/>
<bean id="EMF" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/>
</property>
</bean>
Run Code Online (Sandbox Code Playgroud)persistence.xml中
<persistence-unit name="persistence" transaction-type="JTA">
<properties>
<property name="hibernate.archive.autodetection" value="class"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9iDialect"/>
<property name="hibernate.current_session_context_class" value="jta"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.default_batch_fetch_size" value="20"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
</properties>
</persistence-unit>
Run Code Online (Sandbox Code Playgroud)服务
@Transactional(readOnly=true) @Service
public class MyServiceImpl implements MyService …
Run Code Online (Sandbox Code Playgroud)有没有办法可以从WAS导出我的服务器设置(在RAD 6下运行),以便其他开发人员能够使用相同的脚本来设置他们的环境?
我需要在EJB中为密钥库提供密码,但我不希望它对开发人员可见.我的想法是在Websphere Console中创建身份验证别名,然后查找MY_ALIAS并从别名获取密码.我在以下网站找到了一些与主题相关的讨论:http: //www.coderanch.com/t/79439/Websphere/Authentication
有人知道可以别名吗?您建议的方法是什么来实现我的目标?
非常感谢你!
我正在尝试向我的RESTful Web服务添加BASIC身份验证.目前我对Apache Tomcat 6.0服务器进行BASIC身份验证,但我需要在WebSphere应用程序服务器上部署我的Web服务.6.1以及我在WebSphere上运行BASIC身份验证时遇到问题.
在Java中是否有办法检查HTTP请求的身份验证标头,如果提供的用户名/密码(以Base64编码)与已知帐户不匹配,则用户输入新的用户名/密码?
我已经尝试过实现Spring Security,但由于我的项目完全没有Spring,所以试图让它工作是一件巨大的痛苦,我试图找到一个简单的解决方案来解决我的相当简单的问题.
我目前使用的技术包括:Java,Jersey/JAX-RS,带Maven插件的Eclipse.
我刚刚在websphere中部署EARS时遇到了问题.我在安装应用程序后遇到的错误如下所示.
------Start of DE processing------ = [7/18/10 10:51:19:309 CDT] , key = javax.management.MBeanException com.ibm.ws.management.AdminServiceImpl.invoke 679
Exception = javax.management.MBeanException
Source = com.ibm.ws.management.AdminServiceImpl.invoke
probeid = 679
Stack Dump = javax.management.MBeanException: Exception thrown in RequiredModelMBean while trying to invoke operation startApplication
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1119)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:973)
...
...
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
Caused by: com.ibm.ws.exception.RuntimeError: java.lang.RuntimeException: java.lang.NullPointerException
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:955)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1437)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4191)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4289)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1442)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
...
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:271)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1092)
... 64 …
Run Code Online (Sandbox Code Playgroud) 好的,所以我一直在Tomcat上运行Java/Jersey Web服务,基本身份验证工作正常.我已经在项目的web.xml文件中设置了权限,用户在服务器上的tomcat-users.xml中设置了权限.效果很好.
问题是,现在我必须将这个项目转移到WebSphere,而这远远不如基本身份验证的实现那么简单.
我已经看到了这个问题:Websphere 6.1和BASIC身份验证,并查看了这个 pdf的第7章,如同建议,但我似乎无法找到正确的设置(我没有像大多数方法一样使用标记为'启用全局安全'的选项) ,我正在尝试运行我的项目,而pdf是特定于项目的.
那么要清楚地问我的问题,在WebSphere 6.1上启用基本身份验证的最简单方法是什么?
java websphere web-services basic-authentication websphere-6.1
websphere-6.1 ×10
websphere ×6
java ×4
classloader ×1
cxf ×1
encryption ×1
hibernate ×1
jaas ×1
java-ee ×1
jersey ×1
jpa ×1
jta ×1
maven ×1
scripting ×1
security ×1
spring ×1
ssl ×1
tomcat ×1
web-services ×1
websphere-7 ×1
wsadmin ×1