Skip to content

Commit

Permalink
Merge branch 'latest' into chore/kinesis-fips-doc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
sf-vishwastyagi authored May 30, 2024
2 parents b8a47af + b1fdcfe commit ccf0f76
Show file tree
Hide file tree
Showing 155 changed files with 5,420 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ include::reuse::partial$non-inclusive-banner.adoc[]

Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) provides access to standard Amazon Lambda operations using Anypoint Platform.

== Before You Begin

Ensure you have the following:

* Java 8, 11, or 17
* Anypoint Studio 7.3.5 and later
* Mule runtime engine (Mule) 4.2.1 and later
* DataWeave

== Configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,15 @@ For information on the redelivery policy, see xref:mule-runtime::redelivery-poli
[%header%autowidth.spread]
|===
| Field | Type | Description | Default Value | Required
| Max Local Messages a| Number | Maximum number of messages to prefetch from the service and keep locally before dispatching to the flow | 30 |
| Max Local Messages a| Number | Maximum number of messages to prefetch from the service and keep locally before dispatching to the flow

// MQ Prefetch Issue note
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchLatency]


// MQ Prefetch maxLocalMessages
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchMaxLocalMsgs]
| 30 |
|===


Expand Down
3 changes: 3 additions & 0 deletions anypoint-mq/3.x/modules/ROOT/pages/anypoint-mq-listener.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ When a consumer takes a message from the queue and stores it in the local buffer
* Use a smaller buffer size to process messages as they are published to the queue.
+
The smaller buffer restricts app-level throughput and avoids blocking competing consumers.
+
// MQ Prefetch maxLocalMessages
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchMaxLocalMsgs]

[[fifo-and-prefetch]]
=== FIFO Queues and Prefetch Mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ This table lists the 2.x `prefetch` parameters and their 3.x equivalents.
|`fetchSize`| Declared at the `config` level, controls the size of the local message buffer, which is calculated as three times the `fetchSize` value.
|`maxLocalMessages`| Declared at the `Subscriber` level, explicitly controls the maximum size that the local message buffer can have. This parameter serves as a target number, attempting to fetch as many messages as needed to fill the buffer completely.

// MQ Prefetch maxLocalMessages
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchMaxLocalMsgs]

|`fetchTimeout`| Controls the time waiting for a response from the service.
|Deprecated| This parameter is no longer available. The connector always uses the maximum long-polling value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,14 @@ For information on the redelivery policy, see xref:mule-runtime::redelivery-poli
[%header%autowidth.spread]
|===
| Field | Type | Description | Default Value | Required
| Max Local Messages a| Number | Maximum number of messages to prefetch from the service and keep locally before dispatching to the flow | 30 |
| Max Local Messages a| Number | Maximum number of messages to prefetch from the service and keep locally before dispatching to the flow.

// MQ Prefetch Issue note
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchLatency]

// MQ Prefetch maxLocalMessages
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchMaxLocalMsgs]
| 30 |
|===


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Some changes included in version 4.x break backward compatibility with version 3

Anypoint MQ Connector 4.x includes support for these features:

////
* Cross-Region Failover
+
Anypoint MQ Connector for Mule 4 version 4.0.7 and later provides failover capability for standard queues.
Expand All @@ -27,7 +26,7 @@ For information, see:
+
** xref:mq::mq-failover.adoc[]
** xref:anypoint-mq-failover.adoc[]
////

* Connected Apps
+
Anypoint MQ Connector for Mule 4 version 4.0.1 and later includes a new format for the *URL* field in the *Global Element Properties* page.
Expand All @@ -49,7 +48,7 @@ Anypoint MQ returns the following error:
`Invalid api url provided`
====

// To use the failover feature, see xref:anypoint-mq-failover.adoc[].
To use the failover feature, see xref:anypoint-mq-failover.adoc[].


== Upgrade Prerequisites
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
= Configuring Cross-Region Failover in Your App

include::reuse::partial$feature-unsupported-banner.adoc[tag="unsupported-feature"]

Anypoint MQ Connector for Mule 4 version 4.0.7 and later provides failover capability for standard queues.

Expand Down
3 changes: 3 additions & 0 deletions anypoint-mq/4.x/modules/ROOT/pages/anypoint-mq-listener.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ When a consumer takes a message from the queue and stores it in the local buffer
* Use a smaller buffer size to process messages as they are published to the queue.
+
The smaller buffer restricts app-level throughput and avoids blocking competing consumers.
+
// MQ Prefetch maxLocalMessages
include::connectors::partial$mq-disclaimer.adoc[tag=mqPrefetchMaxLocalMsgs]

[[fifo-and-prefetch]]
=== FIFO Queues and Prefetch Mode
Expand Down
7 changes: 6 additions & 1 deletion connectors-home/modules/ROOT/partials/mq-disclaimer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ To prevent message deletion until after processing, use the `AUTO` or `MANUAL` a
// MQ Prefetch Issue note
// tag::mqPrefetchLatency[]
NOTE: Due to a known issue, using `prefetch` mode with `maxConcurrency="1"` set on the `flow` element might result in message-processing latency.
// end::mqPrefetchLatency[]
// end::mqPrefetchLatency[]

// MQ Prefetch maxLocalMessages
// tag::mqPrefetchMaxLocalMsgs[]
When using `prefetch` mode, set `maxLocalMessages` to a value greater than `1` to avoid message-processing issues.
// end::mqPrefetchMaxLocalMsgs[]
2 changes: 1 addition & 1 deletion http/1.6/modules/ROOT/pages/http-request-ref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ In the *Configuration XML* editor, the `host`, `port`, `path`, `trust-store`, an

By default, Mule defines maximum values for the HTTP request size, response size, and request/response header size. However, you can change these values by modifying the following properties in the `wrapper.conf` file:

[%header%autowidth.spread,cols="a,a,a"]
[%header%autowidth.spread]
|===
| Name | Property | Description | Default Value (in bytes)
| Request/Response Header Size | `mule.http.headerSectionSize` | Maximum size in bytes accepted for the HTTP request header section (request line + headers) | `8192`
Expand Down
2 changes: 1 addition & 1 deletion http/1.7/modules/ROOT/pages/http-request-ref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ In the *Configuration XML* editor, the `host`, `port`, `path`, `trust-store`, an

By default, Mule defines maximum values for the HTTP request size, response size, and request/response header size. However, you can change these values by modifying the following properties in the `wrapper.conf` file:

[%header%autowidth.spread,cols="a,a,a"]
[%header%autowidth.spread]
|===
| Name | Property | Description | Default Value (in bytes)
| Request/Response Header Size | `mule.http.headerSectionSize` | Maximum size in bytes accepted for the HTTP request header section (request line + headers) | `8192`
Expand Down
2 changes: 1 addition & 1 deletion http/1.8/modules/ROOT/pages/http-request-ref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ In the *Configuration XML* editor, the `host`, `port`, `path`, `trust-store`, an

By default, Mule defines maximum values for the HTTP request size, response size, and request/response header size. However, you can change these values by modifying the following properties in the `wrapper.conf` file:

[%header%autowidth.spread,cols="a,a,a"]
[%header%autowidth.spread]
|===
| Name | Property | Description | Default Value (in bytes)
| Request/Response Header Size | `mule.http.headerSectionSize` | Maximum size in bytes accepted for the HTTP request header section (request line + headers) | `8192`
Expand Down
8 changes: 5 additions & 3 deletions http/1.9/modules/ROOT/pages/http-documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Connection provider for a HttpListener, handles the creation of HttpServer insta
| Host a| String | Host where the requests will be sent. | |x
| Port a| Number | Port where the requests will be received. | |x
| Use Persistent Connections a| Boolean | If false, each connection will be closed after the first request is completed. | true |
| Connection Idle Timeout a| Number | The number of milliseconds that a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. The listener default timeout is bigger than the requester default timeout to avoid the Remotely closed exception when you send a request on an existing connection just before the timeout occurs. | 40000 |
| Connection Idle Timeout a| Number | The number of milliseconds that a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. The listener default connection Idle timeout is bigger than the requester connection Idle default timeout to avoid the Remotely closed exception when you send a request on an existing connection just before the timeout occurs. | 40000 |
| Read Timeout a| Number | Maximum time in milliseconds that the listener must wait while receiving a message. | 30000 |
| Reconnection a| <<Reconnection>> | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn't pass after exhausting the associated reconnection strategy | |
|===
Expand Down Expand Up @@ -126,7 +126,9 @@ Connection provider for a HTTP request, handles the creation of HttpExtensionCli

* <<BasicAuthentication>>
* <<DigestAuthentication>>
* <<NtlmAuthentication>> | Authentication method to use for the HTTP request. | |
* <<NtlmAuthentication>>
* xref:oauth-module::oauth-module-reference.adoc#authorization-code-grant-type[OAuth2 Authorization Code Grant Type Authentication]
* xref:oauth-module::oauth-module-reference.adoc#ClientCredentialsGrantType[OAuth2 Client Credentials Grant Type Authentication] | Authentication method to use for the HTTP request. | |
| TLS Configuration a| <<Tls>> | Reference to a TLS config element. This will enable HTTPS for this config. | |
| Protocol a| Enumeration, one of:

Expand All @@ -135,7 +137,7 @@ Connection provider for a HTTP request, handles the creation of HttpExtensionCli
| Host a| String | Host where the requests will be sent. | |
| Port a| Number | Port where the requests will be sent. If the protocol attribute is HTTP (default) then the default value is 80, if the protocol attribute is HTTPS then the default value is 443. | |
| Use Persistent Connections a| Boolean | If false, each connection will be closed after the first request is completed. | true |
| Max Connections a| Number | The maximum number of outbound connections that will be kept open at the same time. By default the number of connections is unlimited. | -1 |
| Max Connections a| Number | The maximum number of outbound connections that will be kept open at the same time. By default the number of connections is unlimited. Setting a value for max connections helps limit memory usage, although it may reduce throughput. | -1 |
| Connection Idle Timeout a| Number | The number of milliseconds that a connection can remain idle before it is closed. The value of this attribute is only used when persistent connections are enabled. | 30000 |
| Stream Response a| Boolean | Whether or not received responses should be streamed, meaning processing will continue as soon as all headers are parsed and the body streamed as it arrives. When enabled, the response MUST be eventually read since depending on the configured buffer size it may not fit into memory and processing will stop until space is available. | false |
| Response Buffer Size a| Number | The space in bytes for the buffer where the HTTP response will be stored. | -1 |
Expand Down
2 changes: 1 addition & 1 deletion http/1.9/modules/ROOT/pages/http-request-ref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ In the *Configuration XML* editor, the `host`, `port`, `path`, `trust-store`, an

By default, Mule defines maximum values for the HTTP request size, response size, and request/response header size. However, you can change these values by modifying the following properties in the `wrapper.conf` file:

[%header%autowidth.spread,cols="a,a,a"]
[%header%autowidth.spread]
|===
| Name | Property | Description | Default Value (in bytes)
| Request/Response Header Size | `mule.http.headerSectionSize` | Maximum size in bytes accepted for the HTTP request header section (request line + headers) | `8192`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
= OAuth2 Provider Module Reference - Mule 4
:page-aliases: connectors::oauth/oauth2-provider-documentation-reference.adoc

OAuth2 Provider Module v1.0

Expand Down
15 changes: 15 additions & 0 deletions oauth2-provider/1.1/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: oauth2-provider-module
version: '1.1'
display_version: 1.1 (Mule 4)
title: OAuth2 Provider Module
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
page-component-desc: Allows a Mule runtime engine (Mule) app to be configured as an Authentication Manager in an OAuth2 dance.
page-connector-type: Module
page-connector-level: Select
page-exchange-group-id: com.mulesoft.modules
page-exchange-asset-id: mule-oauth2-provider-module
page-runtime-version: 4.1.1
page-release-notes-page: release-notes::connector/oauth2-provider-release-notes.adoc
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions oauth2-provider/1.1/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.xref:index.adoc[OAuth2 Provider Module]
* xref:index.adoc[OAuth2 Provider Module Overview]
* xref:oauth2-provider-module-reference.adoc[OAuth2 Provider Module Reference]
* xref:oauth2-provider-module-troubleshooting.adoc[Troubleshooting OAuth2 Provider Module]
* xref:oauth2-provider-xml-maven.adoc[OAuth2 Provider Module XML and Maven Support]
* xref:oauth2-provider-module-example.adoc[OAuth2 Provider Module Examples]
32 changes: 32 additions & 0 deletions oauth2-provider/1.1/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
= OAuth2 Provider Module - Mule 4

OAuth2 Provider Module v1.1

The OAuth2 Provider module enables a Mule runtime engine (Mule) app to be configured as an Authentication Manager in an OAuth2 dance.
With this role, the application can authenticate to previously registered clients, grant tokens, validate tokens, or register and delete clients, all during the execution of a flow.

The following documentation assumes a basic knowledge of the OAuth2 authorization protocol. For further reference, see the https://tools.ietf.org/html/rfc6749[RFC-6749].

If the app behaves as the client in the OAuth2 dance, use the xref:oauth-module::index.adoc[OAuth Module] instead.


== Before You Begin

To use this module, you must be familiar with:

* Anypoint Connectors
* Mule runtime engine (Mule)
* Elements and global elements in a Mule flow
* Creating a Mule app using Anypoint Studio (Studio)

== Using Exchange Templates and Examples

https://www.mulesoft.com/exchange/[Anypoint Exchange] provides templates
that you can use as starting points for your apps and examples that illustrate a complete solution.


== See Also

* xref:connectors::introduction/introduction-to-anypoint-connectors.adoc[Introduction to Anypoint Connectors]
* xref:connectors::introduction/intro-use-exchange.adoc[Use Exchange to Discover Connectors, Templates, and Examples]
* https://help.mulesoft.com[MuleSoft Help Center]
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
= OAuth2 Provider Module Example

The OAuth2 Provider module supports a Mule runtime engine (Mule) application to be configured as an Authentication Manager in an OAuth2 authorization framework.
By using this module, the application can register clients, authenticate registered clients, grant tokens, validate tokens, and delete clients.
The following example shows how to configure the *Create client* and *Validate token* operations, that create and validate client credentials.

image::oauth2-provider-example.png[OAuth provider studio flow]

. In Studio, drag the HTTP *Listener* operation to the Studio canvas.
. Set *Path* to `/createClient`.
. Set the *Connector configuration* to your desired HTTP configuration.
. Drag the *Create client* operation alongside the HTTP *Listener* operation.
. Set *Module configuration* to your desired OAuth2 provider module configuration.
. Set the following parameters: +
* *Client id*: `attributes.headers.client_id` +
* *Type*: `CONFIDENTIAL` +
* *Secret*: `attributes.headers.client_secret` +
* *Client name*: `attributes.headers.client_name` +
* *Description*: `””` +
* *Principal*: `””` +
* *Redirect uris*: `”demo.com”` +
* *Authorized grant types*: `”CLIENT_CREDENTIALS”` +
[start=7]
. Drag a *Set Payload* component alongside the *Create client* operation.
. Set *Value* to `Client Created`.
. Drag a new HTTP *Listener* source to a new flow.
. Set *Path* to `/validate`.
. Drag a *Validate token* operation alongside the *Listener* source.
. Set *Module configuration* to your desired OAuth2 provider module configuration.
. Set *Access token* to `(attributes.headers['authorization'] splitBy ' ')[1]`.
. Drag a *Transform Message* component alongside the *Validate token* operation.
. In the output display, add the following DataWeave code:
+
[source,dataweave,linenums]
-----
%dw 2.0
output application/json
---
{
"Message": "Successfully validated"
}
-----
[start=16]
. Save and run your Mule app.

== Test your Mule App

To test the Mule app, run the following commands:

`http://oauthtest01.us-e2.cloudhub.io/createClient`
Method: GET
Param: client_id, client_secret, client_name

For example, setting the GET parameters fields with the following values `client_id = 123`, `client_secret = 1234`, `client_name = abc`

Returns the following result:

[source,xml,linenums]
----
{
"Message": "Client Created"
}
----

`http://oauthtest01.us-e2.cloudhub.io/token`
Method: POST
Param: client_id, client_secret, grant_type

For example, setting the POST parameters fields with the following values: `client_id = 123`, `client_secret = 1234`, `grant_type = CLIENT_CREDENTIALS`

Returns the following result:

[source,xml,linenums]
----
{"access_token":"s143Barj7xpQP3_AGWvHRyZxFNEcgJ55XB1I3Yquj8kgem2qxqa5TpouLG3gQCr2sj170Ci1MqLd5gzF4AUpRQ",
"token_type":"Bearer",
"expires_in":86400}
----

Another option is to run the validate command:
`http://oauthtest01.us-e2.cloudhub.io/validate`
Method: GET
Param: Authorization

. Put the `token_type` received from the response data which is "Bearer".
. Add a space.
. Add the `access_token` received from the response data.

For example, the Authorization equals to the Bearer:

[source,xml,linenums]
----
Bearer s143Barj7xpQP3_AGWvHRyZxFNEcgJ55XB1I3Yquj8kgem2qxqa5TpouLG3gQCr2sj170Ci1MqLd5gzF4AUpRQ
----

Returns the following result:

[source,xml,linenums]
----
{
"Message": "Successfully validated"
}
----

If the response is not valid, the result is the following:

[source,xml,linenums]
----
The token received: s143BarjxpQP3_AGWvHRyZxFNEcgJ55XB1I3Yquj8kgem2qxqa5TpouLG3gQCr2sj170Ci1MqLd5gzF4AUpRQ, is not valid.
----

== See Also

* https://help.mulesoft.com[MuleSoft Help Center]
Loading

0 comments on commit ccf0f76

Please sign in to comment.