Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-20410: more fixes #13205

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions components/camel-elytron/src/main/docs/elytron.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,32 @@

*Since Camel {since}*

The Elytron Security Provider provides Elytron security over camel-undertow component.
It enables camel-undertow component use Elytron security capabilities.
To force camel-undertow to use elytron security provider, add elytron security provider library
on classpath and provide instance of ElytronSercurityConfiguration as `securityConfiguration`
parameter into camel-undertow component or provide both `securityConfiguration` and `securityProvider`
into camel-undertow component.
The Elytron Security Provider provides Elytron security over the Camel Elytron component.
It enables the Camel Elytron component to use Elytron security capabilities.
To force Camel Elytron to use elytron security provider, add the elytron security provider library
on classpath and provide instance of `ElytronSecurityConfiguration` as `securityConfiguration`
parameter into the Camel Elytron component or provide both `securityConfiguration` and `securityProvider`
into the Camel Elytron component.

Configuration has to provide all 3 security attributes:
Configuration has to provide all three security attributes:

[width="100%",cols="2,5,^3",options="header"]
|===
| Name | Description | Type
| *domainBuilder* | Builder for security domain. | SecurityDomain.Builder
| *domainBuilder* | Builder for security domain. | `SecurityDomain.Builder`
| *mechanismName* | MechanismName should be selected with regard to default securityRealm. For
example to use bearer_token security, mechanism name has to be `BEARER_TOKEN` and realm has to be `TokenSecurityReal` | String
| *elytronProvider* | Instance of WildFlyElytronBaseProvider with respect of mechanismName | WildFlyElytronBaseProvider
example, to use bearer_token security, mechanism name has to be `BEARER_TOKEN` and realm has to be `TokenSecurityReal` | `String`
| *elytronProvider* | Instance of WildFlyElytronBaseProvider with respect of mechanismName | `WildFlyElytronBaseProvider`
|===

Each exchange created by Undertow endpoint with Elytron security contains header `securityIdentity`
with current Elytron's security identity as value.
(`org.wildfly.security.auth.server.SecurityIdentity`) or is FORBIDDEN (status code 403)
(`org.wildfly.security.auth.server.SecurityIdentity`) or is _FORBIDDEN_ (status code 403)

NOTE: OSGi is not supported
[NOTE]
====
OSGi is not supported.
====

Maven users will need to add the following dependency to their `pom.xml`
for this component:
Expand All @@ -49,6 +52,6 @@ for this component:

== Other Elytron capabilities

This seurity provider contains only basic Elytron dependencies (without any transitive dependency
from org.wildfly.security:wildfly-elytron).
This security provider contains only basic Elytron dependencies (without any transitive dependency
from `org.wildfly.security:wildfly-elytron`).
Ignored libraries should be added among application's dependencies for their usage.
45 changes: 23 additions & 22 deletions components/camel-etcd3/src/main/docs/etcd3-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

*{component-header}*

The camel Etcd component allows you to work with Etcd, a distributed reliable key-value store.
The Etcd v3 component allows you to work with Etcd, a distributed reliable key-value store.

Maven users will need to add the following dependency to their `pom.xml`
for this component:
Expand Down Expand Up @@ -54,53 +54,54 @@ include::partial$component-endpoint-headers.adoc[]

== Producer Operations (Since 3.20)

The following ETCD operations are currently supported. Simply
set the exchange header with a key of "CamelEtcdAction"
and a value set to one of the following.
Apache Camel supports different etcd operations.

To define the operation, set the exchange header with a key of `CamelEtcdAction`
and a value set to one of the following:

[width="100%",cols="10%,10%,10%,70%",options="header",]
|===
|operation |input message body | output message body |description

|set |*String* value of the key-value pair to put |*PutResponse* result of a put operation| Puts a new key-value pair into etcd where the option "path" or the exchange header "CamelEtcdPath" is the key.
|set |*String* value of the key-value pair to put |`PutResponse` result of a put operation| Puts a new key-value pair into etcd where the option `path` or the exchange header `CamelEtcdPath` is the key.
You can set the key charset by setting the exchange header with
the key "CamelEtcdKeyCharset".
the key `CamelEtcdKeyCharset`.
You can set the value charset by setting the exchange header with
the key "CamelEtcdValueCharset".
the key `CamelEtcdValueCharset`.

|get |None |*GetResponse* result of the get operation | Retrieves the key-value pair(s) that match with the key corresponding to
the option "path" or the exchange header "CamelEtcdPath".
|get |None |`GetResponse` result of the get operation | Retrieve the key-value pair(s) that match with the key corresponding to
the option `path` or the exchange header `CamelEtcdPath`.
You can set the key charset by setting the exchange header with
the key "CamelEtcdKeyCharset".
the key `CamelEtcdKeyCharset`.
You indicate if the key is a prefix by setting the exchange header with
the key "CamelEtcdIsPrefix" to true.
the key `CamelEtcdIsPrefix` to `true`.

|delete |None |*DeleteResponse* result of the delete operation |Deletes the key-value pair(s) that match with the key corresponding to
the option "path" or the exchange header "CamelEtcdPath".
|delete |None |`DeleteResponse` result of the delete operation |Delete the key-value pair(s) that match with the key corresponding to
the option `path` or the exchange header `CamelEtcdPath`.
You can set the key charset by setting the exchange header with
the key "CamelEtcdKeyCharset".
the key `CamelEtcdKeyCharset`.
You indicate if the key is a prefix by setting the exchange header with
the key "CamelEtcdIsPrefix" to true.
the key `CamelEtcdIsPrefix` to `true`.

== Consumer (Since 3.20)

The consumer of the etcd components allows to watch changes on the matching key-value pair(s). One exchange is created per event with the header "CamelEtcdPath" set to the path of the corresponding key-value pair and the body
of type *WatchEvent*.
The consumer of the etcd components allows watching changes on the matching key-value pair(s). One exchange is created per event with the header `CamelEtcdPath` set to the path of the corresponding key-value pair and the body
of type `WatchEvent`.

You can set the key charset by setting the exchange header with
the key "CamelEtcdKeyCharset".
the key `CamelEtcdKeyCharset`.
You indicate if the key is a prefix by setting the exchange header with
the key "CamelEtcdIsPrefix" to true.
the key `CamelEtcdIsPrefix` to `true`.

By default, the consumer receives only the latest changes, but it is also possible to start watching events from a specific revision by setting the option "fromIndex" to the expected starting index.
By default, the consumer receives only the latest changes, but it is also possible to start watching events from a specific revision by setting the option `fromIndex` to the expected starting index.

== AggregationRepository

The Etcd3 component provides an `AggregationStrategy` to use Etcd as the backend datastore.
The Etcd v3 component provides an `AggregationStrategy` to use etcd as the backend datastore.

== RoutePolicy (Since 3.20)

The Etcd3 component provides a `RoutePolicy` to use Etcd as clustered lock.
The Etcd v3 component provides a `RoutePolicy` to use etcd as clustered lock.

|===

Expand Down
42 changes: 22 additions & 20 deletions components/camel-exec/src/main/docs/exec-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Maven users need to add the following dependency to their `pom.xml`
</dependency>
-------------------------------------

where `${camel-version`} must be replaced by the actual version of Camel.
Where `${camel-version`} must be replaced by the actual version of Camel.

== URI format

---------------------------
exec://executable[?options]
---------------------------

where `executable` is the name, or file path, of the system command that
Where `executable` is the name, or file path, of the system command that
will be executed. If executable name is used (e.g. `exec:java`), the
executable must in the system path.

Expand All @@ -61,15 +61,17 @@ include::partial$component-endpoint-headers.adoc[]

== Message body

If the `Exec` component receives an `in` message body that is
If the component receives an `in` message body that is
convertible to `java.io.InputStream`, it is used to feed input to the
executable via its stdin. After execution,
executable via its standard input (`stdin`).
After execution,
http://camel.apache.org/exchange.html[the message body] is the result of
the execution,- that is, an
`org.apache.camel.components.exec.ExecResult` instance containing the
stdout, stderr, exit value, and out file. This component supports the
following `ExecResult` http://camel.apache.org/type-converter.html[type
converters] for convenience:
the execution.
That is, an `org.apache.camel.components.exec.ExecResult` instance containing the
`stdout`, `stderr`, _exit value_, and the _out file_.

This component supports the following `ExecResult` http://camel.apache.org/type-converter.html[type converters]
for convenience:

[width="100%",cols="50%,50%",options="header",]
|=======================================================================
Expand All @@ -84,19 +86,19 @@ converters] for convenience:
|`ExecResult` |`org.w3c.dom.Document`
|=======================================================================

If an out file is specified (in the endpoint via `outFile` or the
message headers via `ExecBinding.EXEC_COMMAND_OUT_FILE`), converters
will return the content of the out file. If no out file is used, then
this component will convert the stdout of the process to the target
If an _out file_ is specified (in the endpoint via `outFile` or the
message headers via `ExecBinding.EXEC_COMMAND_OUT_FILE`), the converters
will return the content of the _out file_. If no _out file_ is used, then
this component will convert the `stdout` of the process to the target
type. For more details, please refer to the xref:exec-component.adoc[usage examples] below.

== Usage examples

=== Executing word count (Linux)

The example below executes `wc` (word count, Linux) to count the words
in file `/usr/share/dict/words`. The word count (output) is written to
the standard output stream of `wc`.
in file `/usr/share/dict/words`. The word count (_output_) is written to
the standard output stream of `wc`:

[source,java]
--------------------------------------------------------------------------------------
Expand All @@ -116,17 +118,17 @@ from("direct:exec")

=== Executing `java`

The example below executes `java` with 2 arguments: `-server` and
`-version`, provided that `java` is in the system path.
The example below executes `java` with two arguments: `-server` and
`-version`, if `java` is in the system path.

[source,java]
--------------------------------------
from("direct:exec")
.to("exec:java?args=-server -version")
--------------------------------------

The example below executes `java` in `c:\temp` with 3 arguments:
`-server`, `-version` and the sytem property `user.name`.
The example below executes `java` in `c:\temp` with three arguments:
`-server`, `-version` and the system property `user.name`.

[source,java]
----------------------------------------------------------------------------------------------------
Expand All @@ -149,7 +151,7 @@ from("direct:exec")

In the next example, the `ant.bat` command redirects its output to
`CamelExecOutFile.txt` with `-l`. The file `CamelExecOutFile.txt` is
used as the out file with `outFile=CamelExecOutFile.txt`. The example
used as the _out file_ with `outFile=CamelExecOutFile.txt`. The example
assumes that `ant.bat` is in the system path, and that
`CamelExecBuildFile.xml` is in the current directory.

Expand Down
Loading