如何更改hybris数据中心的默认凭据

时间:2017-09-20 11:31:54

标签: tomcat openssl hybris idoc

我已经使用hybris配置了数据中心。但我必须将datahub local.properties中的默认密码从nimda更改为Hybris123。我用openssl来加密pwd。在发布idoc时,我收到以下错误。

datahub.security.basic.admin.user=admin
datahub.security.basic.admin.password=Hybris123
datahub.security.basic.read_only.user=rouser
datahub.security.basic.read_only.password=ropass

datahub.core.export.service.clientid=eic
datahub.core.export.service.clientsecret=Hybris123
datahub.encryption.key.path= ${catalina.home}/webapps/ROOT/opt/datahub/security-dir/encryption-key.txt

# inbound adapter
datahub.extension.exportURL=http://localhost:9001/datahubadapter
datahub.extension.userName=admin
datahub.extension.password=Hybris123

#Hybris Core
targetsystem.hybriscore.url=http://localhost:9001/datahubadapter
targetsystem.hybriscore.username=admin
targetsystem.hybriscore.password=Hybris123

Tomcat日志:

  

2017-09-20 16:30:44,639 [DEBUG] [c.h.d.c.c.i.DefaultExportClient]从发布到目标系统的响应状态:HybrisCore,200

     

2017-09-20 16:30:46,364 [INFO] [chdssAuthenticationFailureApplicationListener]收到GET请求/core-publications/2/Company.txt与用户[admin] - 由org.springframework.security.authentication引起的身份验证失败.BadCredentialsException:凭据错误

Hybris日志:

  

[32mINFO [TaskExecutor-master-130-Task [8798452351926]] [ImpexDataImportClient]来自http://localhost:8181/datahub-webapp/v1/core-publications/2的响应状态:401   [[1; 31mERROR [TaskExecutor-master-130-Task [8798452351926]] [ClientRetryListener]无法与http://localhost:8181/datahub-webapp/v1/core-publications/2通信   [m java.lang.IllegalStateException:无法与http://localhost:8181/datahub-webapp/v1/core-publications/2通信           在com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResultWithRetry(ImpexDataImportClient.java:107)〜[datahubadapterserver.jar:?]           在com.hybris.datahub.core.rest.client.ImpexDataImportClient.lambda $ 1(ImpexDataImportClient.java:87)〜[datahubadapterserver.jar:?]           在org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263)[spring-retry-1.1.1.RELEASE.jar:?]           在org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:154)[spring-retry-1.1.1.RELEASE.jar:?]           在com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResult(ImpexDataImportClient.java:86)[datahubadapterserver.jar:?]           at com.hybris.datahub.core.facades.impl.DefaultItemImportFacade.callbackToDataHub(DefaultItemImportFacade.java:105)[datahubadapterserver.jar:?]           在com.hybris.datahub.core.facades.impl.DefaultItemImportFacade.importItems(DefaultItemImportFacade.java:58)[datahubadapterserver.jar:?]           在com.hybris.datahub.core.tasks.ItemImportTaskRunner.run(ItemImportTaskRunner.java:48)[datahubadapterserver.jar:?]           at com.hybris.datahub.core.tasks.DefaultDataHubTaskExecutionStrategy.run(DefaultDataHubTaskExecutionStrategy.java:33)[datahubadapterserver.jar:?]           at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1505)[processingserver.jar:?]           at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1409)[processingserver.jar:?]           at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1378)[processingserver.jar:?]           at de.hybris.platform.task.impl.DefaultTaskService $ 5.run(DefaultTaskService.java:1257)[processingserver.jar:?]           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_121]           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_121]           在java.lang.Thread.run(Thread.java:745)[?:1.8.0_121]   引起:java.lang.IllegalStateException:来自http://localhost:8181/datahub-webapp/v1/core-publications/2的未经授权的响应           在com.hybris.datahub.core.rest.client.ImpexDataImportClient.returnImportResultWithRetry(ImpexDataImportClient.java:100)〜[datahubadapterserver.jar:?]           ......还有15个   [1; 31mERROR [TaskExecutor-master-130-Task [8798452351926]] [ClientRetryListener]引发:来自http://localhost:8181/datahub-webapp/v1/core-publications/2的未经授权的回复。

1 个答案:

答案 0 :(得分:0)

hybris 6.0更改了身份验证网址策略。

您能否在datahub local.properties文件中将此配置 datahub.core.export.service.oauth.path = / authorizationserver / oauth / token 添加。

ERROR [TaskExecutor-master-130-Task [8798452351926]] [ClientRetryListener] Caused by: Unauthorized response from http://localhost:8181/datahub-webapp/v1/core-publications/2.