Skip to content

Commit 5c6305c

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

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

modules/serverless-logic-security-config-auth-credentials-openapi.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ The security schemes defined in an OpenAPI specification file are global to all
1717
.Prerequisites
1818

1919
* You have access to a {ServerlessLogicProductName} project with the appropriate roles and permissions to create applications and other workloads in {ocp-product-title}.
20-
* Your OpenAPI specification is defined in one or more security schemes.
20+
* Your OpenAPI specification includes one or more security schemes.
2121
* You have access to the OpenAPI specification files.
2222
* You have identified the schemes you want to configure `http-basic-example` or `api-key-example`.
23-
* You have access to the application properties file, the workflow `ConfigMap`, or environment variable setup.
23+
* You have access to the `application.properties` file, the workflow `ConfigMap`, or the `SonataFlow` CR.
2424
2525
.Procedure
2626

@@ -31,16 +31,16 @@ The security schemes defined in an OpenAPI specification file are global to all
3131
quarkus.openapi-generator.[filename].auth.[security_scheme_name].[auth_property_name]
3232
----
3333
+
34-
** `filename` is the sanitized name of the file containing the OpenAPI specification, such as security_example_json.
35-
** `security_scheme_name` is the sanitized name of the security scheme object definition in the OpenAPI specification file, such as http_basic_example or api_key_example.
34+
** `filename` is the sanitized name of the file containing the OpenAPI specification, such as security_example_json. To sanitize this name, you must replace all non-alphabetic characters with `_` underscores.
35+
** `security_scheme_name` is the sanitized name of the security scheme object definition in the OpenAPI specification file, such as `http_basic_example` or `api_key_example`. To sanitize this name, you must replace all non-alphabetic characters with `_` underscores.
3636
** `auth_property_name` is the name of the property to configure, such as username. This property depends on the defined security scheme type.
3737
+
3838
[NOTE]
3939
====
4040
When you are using environment variables to configure properties, follow the MicroProfile environment variable mapping rules. You can replace all non-alphabetic characters in the property key with underscores `_`, and convert the entire key to uppercase.
4141
====
4242
43-
The following examples show how to provide these configuration properties using `application.properties`, a `ConfigMap` associated with your workflow, or environment variables defined in the `SonataFlow` CR:
43+
The following examples show how to provide these configuration properties using `application.properties`, the `ConfigMap` associated with your workflow, or environment variables defined in the `SonataFlow` CR:
4444

4545
.Example of configuring the credentials by using the `application.properties` file
4646
[source,text]
@@ -65,6 +65,11 @@ metadata:
6565
namespace: example-namespace
6666
----
6767

68+
[NOTE]
69+
====
70+
If the name of the workflow is `example-workflow`, the name of the `ConfigMap` with the user defined properties must be `example-workflow-props`.
71+
====
72+
6873
.Example of configuring the credentials by using environment variables in the `SonataFlow` CR
6974
[source,yaml]
7075
----

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ To access the secured operation, define an `OidcClient` configuration in your `a
9595

9696
[source,terminal]
9797
----
98+
# adjust these configurations according with the authentication service.
9899
quarkus.oidc-client.oauth_example.auth-server-url=https://example.com/oauth
99100
quarkus.oidc-client.oauth_example.token-path=/tokens
100101
quarkus.oidc-client.oauth_example.discovery-enabled=false
101-
quarkus.oidc-client.oauth_example.client-id=kogito-app
102+
quarkus.oidc-client.oauth_example.client-id=example-app
102103
quarkus.oidc-client.oauth_example.grant.type=client
103104
quarkus.oidc-client.oauth_example.credentials.client-secret.method=basic
104105
quarkus.oidc-client.oauth_example.credentials.client-secret.value=secret

0 commit comments

Comments
 (0)