Skip to content

Commit

Permalink
Parametrize source tree links in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Mar 19, 2024
1 parent 829a0e6 commit 4237d2b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ asciidoc:
doc-show-user-guide-link: true # Whether the user guide link is rendered in component extensions
doc-show-extra-content: false # Whether additional content hosted in external AsciiDoc files should be loaded via an include:: directive

quarkus-cxf-project-name: Quarkus CXF

# External URLs
link-quarkus-cxf-source-tree-base: https://github.com/quarkiverse/quarkus-cxf/blob/main
link-quarkus-code-generator: code.quarkus.io
link-camel-quarkus-docs-index: https://camel.apache.org/camel-quarkus/latest/index.html
link-camel-quarkus-docs-cxf-soap: https://camel.apache.org/camel-quarkus/latest/reference/extensions/cxf-soap.html
quarkus-cxf-project-name: Quarkus CXF

# Misc
javaxOrJakartaPackagePrefix: jakarta # this can be switched to javax in older branches
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $ mvn clean install
----

And then you can run the
https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-rm-client/src/test/java/io/quarkiverse/cxf/it/ws/rm/client/WsReliableMessagingTest.java#L28[test scenario]
{link-quarkus-cxf-source-tree-base}/integration-tests/ws-rm-client/src/test/java/io/quarkiverse/cxf/it/ws/rm/client/WsReliableMessagingTest.java#L28[test scenario]
implemented in the client module:

[source,java]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Let's say our aim is to ensure that the communication between the client and ser
and that the message has not been tampered with (through digital signatures).
We also want to assure that the clients are who they claim to be by authenticating themselves by X.509 certificates.

We can express all these requirements in a single https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/src/main/resources/encrypt-sign-policy.xml[WS-SecurityPolicy document]:
We can express all these requirements in a single {link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/src/main/resources/encrypt-sign-policy.xml[WS-SecurityPolicy document]:

.encrypt-sign-policy.xml
[source,xml]
Expand All @@ -96,7 +96,7 @@ include::example$ws-security-policy/encrypt-sign-policy.xml[]
<4> `EncryptedParts` specifies the parts of the SOAP message that must be encrypted to ensure their confidentiality.

We set this policy on the Service Endpoint Interface (SEI)
`https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/src/main/java/io/quarkiverse/cxf/it/security/policy/EncryptSignPolicyHelloService.java#L11[EncryptSignPolicyHelloService]`
`{link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/src/main/java/io/quarkiverse/cxf/it/security/policy/EncryptSignPolicyHelloService.java#L11[EncryptSignPolicyHelloService]`
using `@org.apache.cxf.annotations.Policy` annotation:

.EncryptSignPolicyHelloService.java
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/user-guide/ssl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Tools like `openssl` or Java `keytool` are commonly used for for creating and ma

We have examples for both tools in {quarkus-cxf-project-name} source tree:

* https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/pom.xml#L127-L440[Create truststore with Java 'keytool' (wrapped by a Maven plugin)]
* https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/generate-certs.sh[Create truststore with `openssl`]
* {link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/pom.xml#L127-L440[Create truststore with Java 'keytool' (wrapped by a Maven plugin)]
* {link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/generate-certs.sh[Create truststore with `openssl`]

Once you have prepared the trust store, you need to configure your client to use it.

Expand Down Expand Up @@ -78,8 +78,8 @@ The https://github.com/quarkiverse/quarkus-cxf/tree/main/integration-tests/mtl[m
in the {quarkus-cxf-project-name} source tree can serve as a good starting point.

The keystores and truststores are created with
`https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/mtls/generate-certs.sh[openssl]`
(or alternatively with Java https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/mtls/pom.xml#L109-L377[Java `keytool`])
`{link-quarkus-cxf-source-tree-base}/integration-tests/mtls/generate-certs.sh[openssl]`
(or alternatively with Java {link-quarkus-cxf-source-tree-base}/integration-tests/mtls/pom.xml#L109-L377[Java `keytool`])

Here is the `application.properties` file:

Expand Down
2 changes: 1 addition & 1 deletion extensions/ws-rm/runtime/src/main/doc/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ mvn clean install
----

And then you can run the
https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-rm-client/src/test/java/io/quarkiverse/cxf/it/ws/rm/client/WsReliableMessagingTest.java#L28[test scenario]
{link-quarkus-cxf-source-tree-base}/integration-tests/ws-rm-client/src/test/java/io/quarkiverse/cxf/it/ws/rm/client/WsReliableMessagingTest.java#L28[test scenario]
implemented in the client module:

[source,java]
Expand Down
4 changes: 2 additions & 2 deletions extensions/ws-security/runtime/src/main/doc/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Let's say our aim is to ensure that the communication between the client and ser
and that the message has not been tampered with (through digital signatures).
We also want to assure that the clients are who they claim to be by authenticating themselves by X.509 certificates.

We can express all these requirements in a single https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/src/main/resources/encrypt-sign-policy.xml[WS-SecurityPolicy document]:
We can express all these requirements in a single {link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/src/main/resources/encrypt-sign-policy.xml[WS-SecurityPolicy document]:

.encrypt-sign-policy.xml
[source,xml]
Expand All @@ -40,7 +40,7 @@ include::example$ws-security-policy/encrypt-sign-policy.xml[]
<4> `EncryptedParts` specifies the parts of the SOAP message that must be encrypted to ensure their confidentiality.

We set this policy on the Service Endpoint Interface (SEI)
`https://github.com/quarkiverse/quarkus-cxf/blob/main/integration-tests/ws-security-policy/src/main/java/io/quarkiverse/cxf/it/security/policy/EncryptSignPolicyHelloService.java#L11[EncryptSignPolicyHelloService]`
`{link-quarkus-cxf-source-tree-base}/integration-tests/ws-security-policy/src/main/java/io/quarkiverse/cxf/it/security/policy/EncryptSignPolicyHelloService.java#L11[EncryptSignPolicyHelloService]`
using `@org.apache.cxf.annotations.Policy` annotation:

.EncryptSignPolicyHelloService.java
Expand Down

0 comments on commit 4237d2b

Please sign in to comment.