Skip to main content

#MuleSoft Exchange0 personne en discute

Questions and answers about MuleSoft Exchange, best practices, and use cases.

I've implemented Mulesoft's OAuth external provider in CH and configured APIs to use an OAuth policy using the provider. However, it only calls the provider's validate endpoint once so when an access token is revoked, the APIs still allow access using the revoked access token until the original expiration (ttl).

 

I'm trying to achieve a single use access token so I've added a revoke method in the provider's validate flow. So the initial validation call succeeds but any subsequent validation calls fail because the token has been revoked. However, the API Gateway OAuth policy seems to only make the initial validation call but all subsequent API calls succeed. Is the access token getting cached somewhere?

4 réponses
  1. 2 févr. 2018, 21:14

    @max_ica yes, this seems to be a bug fro Mulesoft and a serious security violation.

     

    The main culprit seems to be `OAuth 2.0 access token enforcement using external provider` policy of Mule which you applied on your proxy to validate the `access_token` against your validate url of Oauth provider

    The Mule policy uses `<oauth2-gw:validate/>` component in their policy code which validates the access_token` against your validate url .

    But it seems to be caching the validation result somewhere and allowing the backend API to be hit which is a serious security violation.

     

    If you have a Mule EE licence, please raise this issue to them and also you can raise a bugs here against it

0/9000
5 réponses
  1. 18 sept. 2016, 12:56

    In the public exchange, you can access hundreds of templates

    examples, and connectors made available to you by MuleSoft.

    In the private exchange, you can expose your own internal assets so that your organization can get the most benefit from each asset or project that you create.

     

    Please go through the links to get better idea :-

    Ref :- http://blogs.mulesoft.com/dev/anypoint-platform-dev/demo-anypoint-exchange/

0/9000
2 réponses
  1. 3 oct. 2021, 16:12

    Hi @Suraj Sadasivan Nair​ 

     

    I don't think so that you can use Maven for publishing the RAML from CI/CD .

     

    MuleSoft provides Anypoint CLI or Platform APIs that can be integrated with CI/CD for publishing the RAML to Anypoint Exchange or API Manager.

     

    Anypoint CLI - https://docs.mulesoft.com/runtime-manager/anypoint-platform-cli

    Platform APIs - https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/

    API Manager API - https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/api-manager-api/

     

    Regards,

    Jitendra

0/9000
1 réponse
  1. 20 sept. 2022, 16:25

    If someone finds this question later, I am interpreting this question to mean that they want a user to be able to selectively choose countries that they're interested in, not that a user is restricted by which country they're in.

     

    This seems most feasible not with search, but with the category options. I would add a category "country" and label my APIs through Exchange (either the UI, or using the exchange API). I would then add my country category as one of the possible dropdowns enabled in the API Catalog.

     

    Alternately, if it absolutely had to be enabled through the Search box, I would add a custom field "country", add values to that field for each API, then enable searching in custom fields. I feel like this is both less intuitive to the end user though and more trouble to implement, since custom fields can only be modified via API.

0/9000

java.lang.RuntimeException: There was an issue solving the dependencies for the bundleDescriptors [[BundleDescriptor{groupId='com.mulesoft.modules', artifactId='mule-secure-configuration-property-module', baseVersion='null', version='1.2.3', type='jar', classifier=Optional[mule-plugin]}]]

at org.mule.maven.client.internal.AetherMavenClient.resolvePluginBundleDescriptorsDependencies(AetherMavenClient.java:369)

at org.mule.tooling.core.m2.internal.MuleMavenClientResolver.resolvePluginDependencies(MuleMavenClientResolver.java:79)

at org.mule.tooling.core.module.internal.runner.DownloadTask.doRun(DownloadTask.java:76)

at org.mule.tooling.core.module.internal.runner.Task.run(Task.java:65)

at org.mule.tooling.core.module.internal.runner.DownloadTask.run(DownloadTask.java:1)

at org.mule.tooling.core.module.internal.runner.ArtifactResolvingRunner$ArtifactJob.run(ArtifactResolvingRunner.java:220)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at com.mulesoft.modules:mule-secure-configuration-property-module:jar:mule-plugin:1.2.3

at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:380)

at org.mule.maven.client.internal.AetherMavenClient.doResolveDependencies(AetherMavenClient.java:478)

at org.mule.maven.client.internal.AetherMavenClient.doResolveDependencies(AetherMavenClient.java:421)

at org.mule.maven.client.internal.AetherMavenClient.resolvePluginBundleDescriptorsDependencies(AetherMavenClient.java:365)

... 6 more

Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at com.mulesoft.modules:mule-secure-configuration-property-module:jar:mule-plugin:1.2.3

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)

at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)

... 9 more

Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.mulesoft.modules:mule-secure-configuration-property-module:jar:mule-plugin:1.2.3

at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:329)

at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)

at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)

... 10 more

Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.mule.extensions:mule-ee-core-modules-parent:pom:1.2.0 from/to mulesoft-releases (https://repository.mulesoft.org/releases/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:177)

at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:226)

at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1000)

at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:800)

at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:329)

at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)

... 17 more

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.mule.extensions:mule-ee-core-modules-parent:pom:1.2.0 from/to mulesoft-releases (https://repository.mulesoft.org/releases/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)

at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)

at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)

at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:173)

... 22 more

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.mule.extensions:mule-ee-core-modules-parent:pom:1.2.0 from/to mulesoft-releases (https://repository.mulesoft.org/releases/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)

at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)

at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)

at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)

at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)

at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)

at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)

... 25 more

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)

at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)

at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)

at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)

at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:573)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:557)

at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)

at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)

at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)

at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:164)

at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:287)

at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)

at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)

5 réponses
  1. 27 août 2021, 11:58

    I am facing the same issue while importing SFTP connector 1.4.0 , let me know if you found any resolution for this.

0/9000

Hello,

 

How to refer API portal belonging to already existing API to newly added API in API Manager.

 

Any help on this please.

 

Thanks

 

@mulsoft @ryanandal @manik

1 réponse
  1. 20 août 2018, 10:42

    Hi Mate,

     

    I don't think You can directly refer from Exchange 2 or API Manager 2 to old .

     

    For RAML:

    Possibillity:

     

    - Go to the API Manager Portal for the API and export the API Specification as a zip file.

    - Go to Design Center API Designer and create a project of type API Specification.

    - Import the zip.

    - Publish to Exchange 2.

     

    Thanks,

     

    Manish Kumar Yadav

0/9000

I currently have developer portals in our org to allow developers to search, view api specs and request api access. However I also see Exchange which looks like almost the same thing. I am confused on what the differences are?

4 réponses
  1. 15 déc. 2018, 03:03

    Hi @ascott , You can find the Request API Access under Anypoint Exchange > All Assets > then find your target API and open it.

    You will see some options located at the top right of your target API asset:

    Hi @ascott , You can find the Request API Access under Anypoint Exchange > All Assets > then find your target API and open it.

     

     

    The difference of this from Developer Portal is that Exchange allows you to manage your API(Documentation and Access) as it provide options for you to manage. Developer Portal is just showing the API documentation in public as read-only, you can share it to the other users without requiring them to login in the cloudhub to see the public API portals.

     

    One more thing, if you don't find those options(Edit and Request Access) under Exchange > Your API asset, maybe you don't have the required permissions for that.

     

    Hope this Helps!

0/9000

Hi All,

 

We are trying to implement API Gateway solution, am currently new to mulesoft and looking for any good tutorials and use cases on how to start building it and moving to deployment.

 

Thanks

Raam

1 réponse
0/9000

Based on this article, I should have access to publish API specs from Design Center to Exchange:

 

https://help.mulesoft.com/s/article/Anypoint-Platform-permissions-explanation

 

There are 2 business groups defined in this Anypoint instance, in the root BG I am able to publish to exchange but not in the other BG where I'm working out of. Don't see any other obvious configurations in access management, what else might we be missing to allow this access?

 

Unable to publish API Spec to exchange, have both the Design Center Developer permission and the Exchange Administrators role 

2 réponses
0/9000

I have an API deployed to Developer Portal and Exchange. There are 2 versions of my API. However the default that is shown when a user navigates to the API is the oldest version. I deprecated the old version but it still take precedence as shows below (v1-prd, 4.0.x). Is there anyway to show the most recent version first. Its very confusing for our users who have to select the version dropdown, especially for those who are not familiar with the platform.

 

See below screenshot.

Version Precedence/Default

3 réponses
  1. 23 févr. 2021, 06:35

    hello @Anthony Scott​ , no there is no chance as per my experience in the platform as your versioning is something different. try to change versioning if possible otherwise not possible :)

0/9000