Skip to content

Commit 71cffed

Browse files
Kalyani Desaiopenshift-cherrypick-robot
authored andcommitted
SRVLOGIC-98-security: Another round of Walter review round 5
1 parent 5c6305c commit 71cffed

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

modules/serverless-logic-security-example-oauth-authentication.adoc

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ In this example, the `sayHelloOauth2` operation is protected by the `oauth-examp
6262
[id="serverless-logic-security-oauth-support-oidc-client-filter-extention_{context}"]
6363
== OAuth 2.0 Support with the OIDC Client filter extension
6464

65-
OAuth 2.0 token management is handled by a Quarkus `OidcClient`. To enable this integration, you must add the Quarkus OIDC Client Filter extension to your project as shown in the following examples:
65+
OAuth 2.0 token management is handled by a Quarkus `OidcClient`. To enable this integration, you must add the Quarkus OIDC Client Filter, and the Quarkus OpenApi Generator OIDC extensions to your project as shown in the following examples:
6666

67-
.Example of adding extension using Maven
67+
.Example of adding extensions using Maven
6868
[source,text,subs="attributes+"]
6969
----
7070
<dependency>
@@ -80,14 +80,35 @@ OAuth 2.0 token management is handled by a Quarkus `OidcClient`. To enable this
8080
</dependency>
8181
----
8282

83-
.Example of adding extension using `gitops` profile
83+
.Example of adding extensions using `gitops` profile
8484

8585
Ensure that you configure the QUARKUS_EXTENSIONS build argument with the following value when building the workflow image:
8686
[source,text,subs="attributes+"]
8787
----
8888
$ --build-arg=QUARKUS_EXTENSIONS=io.quarkus:quarkus-oidc-client-filter:{ServerlessLogicQuarkusVersion},io.quarkiverse.openapi.generator:quarkus-openapi-generator-oidc:{ServerlessLogicOauthDependencyVersion}
8989
----
9090

91+
.Example of adding extensions using `preview` profile
92+
[source,text,subs="attributes+"]
93+
----
94+
apiVersion: sonataflow.org/v1alpha08
95+
kind: SonataFlowPlatform
96+
metadata:
97+
name: sonataflow-platform-example
98+
namespace: example-namespace
99+
spec:
100+
build:
101+
template:
102+
buildArgs:
103+
- name: QUARKUS_EXTENSIONS
104+
value: io.quarkus:quarkus-oidc-client-filter:{ServerlessLogicQuarkusVersion},io.quarkiverse.openapi.generator:quarkus-openapi-generator-oidc:{ServerlessLogicOauthDependencyVersion}
105+
----
106+
107+
[NOTE]
108+
====
109+
The extensions that are added in the `SonataFlowPlatform` CR are included for all the workflows that you deploy in that namespace with the `preview` profile.
110+
====
111+
91112
[id="serverless-logic-security-oidc-configuration_{context}"]
92113
== `OidcClient` configuration
93114

@@ -97,7 +118,7 @@ To access the secured operation, define an `OidcClient` configuration in your `a
97118
----
98119
# adjust these configurations according with the authentication service.
99120
quarkus.oidc-client.oauth_example.auth-server-url=https://example.com/oauth
100-
quarkus.oidc-client.oauth_example.token-path=/tokens
121+
quarkus.oidc-client.oauth_example.token-path=/token
101122
quarkus.oidc-client.oauth_example.discovery-enabled=false
102123
quarkus.oidc-client.oauth_example.client-id=example-app
103124
quarkus.oidc-client.oauth_example.grant.type=client

0 commit comments

Comments
 (0)