2015-07-21 4 views
0

Я пытаюсь запустить 'простой' пример из mulesoft, но всегда заканчиваются в следующем BUILD ОТКАЗАMule OAuth2 - не может решить 'модуль-безопасности-oauth2-провайдер'

Failed to execute goal on project test: Could not resolve dependencies for project XXX: Failed to collect dependencies at com.mulesoft.security:mule-module-security-oauth2-provider:jar:1.3.2: Failed to read artifact descriptor for com.mulesoft.security:mule-module-security-oauth2-provider:jar:1.3.2: Failure to find com.mulesoft.security:mule-module-security:pom:1.3.2 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced -> [Help 1]

Мой поток

<?xml version="1.0" encoding="UTF-8"?> 
 

 
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" 
 
\t xmlns:oauth2-provider="http://www.mulesoft.org/schema/mule/oauth2-provider" 
 
\t xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
 
\t xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1" 
 
\t xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security" 
 
\t xmlns:ss="http://www.springframework.org/schema/security" 
 
\t xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
 
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/current/mule-spring-security.xsd 
 
http://www.mulesoft.org/schema/mule/oauth2-provider http://www.mulesoft.org/schema/mule/oauth2-provider/current/mule-oauth2-provider.xsd"> 
 

 
\t <spring:beans> 
 
\t \t <ss:authentication-manager id="resourceOwnerAuthenticationManager"> 
 
\t \t \t <ss:authentication-provider> 
 
\t \t \t \t <ss:user-service id="resourceOwnerUserService"> 
 
\t \t \t \t \t <ss:user name="john" password="doe" authorities="RESOURCE_OWNER" /> 
 
\t \t \t \t </ss:user-service> 
 
\t \t \t </ss:authentication-provider> 
 
\t \t </ss:authentication-manager> 
 
\t </spring:beans> 
 

 
\t <mule-ss:security-manager> 
 
\t \t <mule-ss:delegate-security-provider 
 
\t \t \t name="resourceOwnerSecurityProvider" delegate-ref="resourceOwnerAuthenticationManager" /> 
 
\t </mule-ss:security-manager> 
 

 
\t <oauth2-provider:config name="oauth2ProviderCode" 
 
\t \t providerName="SampleAPI" port="8081" authorizationEndpointPath="sampleapi/api/authorize" 
 
\t \t accessTokenEndpointPath="sampleapi/api/token" 
 
\t \t resourceOwnerSecurityProvider-ref="resourceOwnerSecurityProvider" 
 
\t \t scopes="READ_RESOURCE POST_RESOURCE" doc:name="OAuth provider module"> 
 
\t \t <oauth2-provider:clients> 
 
\t \t \t <oauth2-provider:client clientId="myclientid" 
 
\t \t \t \t secret="myclientsecret" type="CONFIDENTIAL" clientName="Mule Bookstore" 
 
\t \t \t \t description="Mule-powered On-line Bookstore"> 
 
\t \t \t \t <oauth2-provider:redirect-uris> 
 
\t \t \t \t \t <oauth2-provider:redirect-uri>http://localhost*</oauth2-provider:redirect-uri> 
 
\t \t \t \t </oauth2-provider:redirect-uris> 
 
\t \t \t \t <oauth2-provider:authorized-grant-types> 
 
\t \t \t \t \t <oauth2-provider:authorized-grant-type>AUTHORIZATION_CODE</oauth2-provider:authorized-grant-type> 
 
\t \t \t \t </oauth2-provider:authorized-grant-types> 
 
\t \t \t \t <oauth2-provider:scopes> 
 
\t \t \t \t \t <oauth2-provider:scope>READ_RESOURCE</oauth2-provider:scope> 
 
\t \t \t \t \t <oauth2-provider:scope>POST_RESOURCE</oauth2-provider:scope> 
 
\t \t \t \t </oauth2-provider:scopes> 
 
\t \t \t </oauth2-provider:client> 
 
\t \t </oauth2-provider:clients> 
 
\t </oauth2-provider:config> 
 
\t <http:listener-config name="HTTP_Listener_Configuration" 
 
\t \t host="localhost" port="8081" doc:name="HTTP Listener Configuration" /> 
 
\t <flow name="protected-authcode"> 
 
\t \t <http:listener config-ref="HTTP_Listener_Configuration" 
 
\t \t \t path="/resources" doc:name="HTTP" /> 
 
\t \t <oauth2-provider:validate config-ref="oauth2ProviderCode" 
 
\t \t \t doc:name="Validate Token" scopes="READ_RESOURCE" /> 
 
\t \t <set-payload 
 
\t \t \t value="#[ ['name' : 'payroll', 'uri' : 'http://localhost:8081/resources/payroll'] ]" 
 
\t \t \t doc:name="Set Payload" /> 
 
\t \t <json:object-to-json-transformer 
 
\t \t \t doc:name="Object to JSON" /> 
 
\t </flow> 
 

 

 
\t <!-- THIS FLOW IS JUST AN AID TO HELP MANUAL TESTING OF THE OAUTH2 DANCE --> 
 
\t <flow name="redirectFlow"> 
 
\t \t <http:listener config-ref="HTTP_Listener_Configuration" 
 
\t \t \t path="/redirect" doc:name="HTTP" /> 
 
\t \t <set-property value="302" propertyName="http.status" 
 
\t \t \t doc:name="Property" /> 
 
\t \t <set-property propertyName="Location" 
 
\t \t \t value="http://localhost:8081/sampleapi/api/token?grant_type=authorization_code&amp;&amp;client_id=myclientid&amp;client_secret=myclientsecret&amp;code=#[message.inboundProperties.code] 
 
    &amp;redirect_uri=http://localhost:8081/redirect" 
 
\t \t \t doc:name="Property" /> 
 
\t </flow> 
 
</mule>

В моей POM-файл у меня есть следующие операции РЕПО:

... \t \t 
 
<dependency> 
 
\t \t \t <groupId>com.mulesoft.security</groupId> 
 
\t \t \t <artifactId>mule-module-security-oauth2-provider</artifactId> 
 
\t \t \t <version>1.3.2</version> 
 
\t \t </dependency> 
 
... 
 

 
<repositories> 
 
\t \t <repository> 
 
\t \t \t <id>Central</id> 
 
\t \t \t <name>Central</name> 
 
\t \t \t <url>http://repo1.maven.org/maven2/</url> 
 
\t \t \t <layout>default</layout> 
 
\t \t </repository> 
 
\t \t <repository> 
 
\t \t \t <id>mulesoft-releases</id> 
 
\t \t \t <name>MuleSoft Releases Repository</name> 
 
\t \t \t <url>http://repository.mulesoft.org/releases/</url> 
 
\t \t \t <layout>default</layout> 
 
\t \t </repository> 
 
\t \t <repository> 
 
\t \t \t <id>mulesoft-snapshots</id> 
 
\t \t \t <name>MuleSoft Snapshots Repository</name> 
 
\t \t \t <url>http://repository.mulesoft.org/snapshots/</url> 
 
\t \t \t <layout>default</layout> 
 
\t \t </repository> 
 
\t \t <repository> 
 
\t \t \t <id>mulesoft-releases2</id> 
 
\t \t \t <name>MuleSoft Releases Repository2</name> 
 
\t \t \t <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url> 
 
\t \t \t <layout>default</layout> 
 
\t \t </repository> 
 
\t </repositories>

Этот модуль безопасности принадлежит к AnyPoint Enterprise Security, и я думаю, помнить, что Mule имеет обеспеченное хранилище для предприятий-вещей , Может быть, я должен связаться с Мулом для доступа? Но, с другой стороны, об этом нет на их сайте и в данном примере. У кого-нибудь есть идея, что я могу попытаться исправить и успешно запустить этот пример?

ответ

0

Да, есть репо EE, для которого требуется комманда username/password, которая будет предоставлена ​​Mulesoft. Вы можете связаться с ними через портал поддержки, если вы являетесь Клиентом.

 <repository> 
      <id>mulesoft-ee-release</id> 
      <name>Mulesoft EE</name> 
      <url>https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/</url> 
     </repository> 

Затем установите имя пользователя/пароль в Maven settings.xml.

Смежные вопросы