Skip to content

Commit

Permalink
security review for archetypes (#8454)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam authored Mar 5, 2024
1 parent b05a6d2 commit a60ff40
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- key-id: "service1-hmac"
principal-name: "Service1 - HMAC signature"
# See [EncryptionFilter](https://helidon.io/docs/latest/apidocs/io.helidon.config.encryption/io/helidon/config/encryption/EncryptionFilter.html) for details about encrypting passwords in configuration files.
hmac.secret: "somePasswordForHmacShouldBeEncrypted"
hmac.secret: "changeit"
- key-id: "service1-rsa"
principal-name: "Service1 - RSA signature"
public-key:
Expand All @@ -17,6 +17,6 @@
# defaults to jdk default
# keystore-type: "PKCS12"
# password of the keystore
passphrase: "password"
passphrase: "changeit"
# alias of the certificate to get public key from
cert.alias: "service_cert"
Binary file not shown.
8 changes: 4 additions & 4 deletions archetypes/helidon/src/main/archetype/mp/custom/database.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022, 2023 Oracle and/or its affiliates.
Copyright (c) 2022, 2024 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -278,7 +278,7 @@ Instructions for H2 can be found here: https://www.h2database.com/html/cheatShee
<model>
<value key="helidon-test">false</value>
<value key="readme-description">Helidon MP application that uses the dbclient API with MySQL database.</value>
<value key="readme-native-docker">docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=password mysql:5.7</value>
<value key="readme-native-docker">docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=changeit mysql:5.7</value>
<value key="readme-native-url">url: jdbc:mysql:tcp://127.0.0.1:3306/pokemon?useSSL=false</value>
<value key="integration-artifactId">helidon-integrations-db-mysql</value>
<value key="db">MySQL</value>
Expand All @@ -287,7 +287,7 @@ Instructions for H2 can be found here: https://www.h2database.com/html/cheatShee
This example requires a MySQL database, start it using docker:
```
docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=password mysql:5.7
docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=changeit mysql:5.7
```
]]></value>
</list>
Expand All @@ -311,7 +311,7 @@ docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_D
<value key="jdbcDataSource">com.mysql.cj.jdbc.MysqlDataSource</value>
<value key="databaseUrl">jdbc:mysql://127.0.0.1:3306/pokemon?useSSL=false</value>
<value key="dbUser">user</value>
<value key="userPassword">password</value>
<value key="userPassword">changeit</value>
</model>
</output>
</option>
Expand Down
6 changes: 3 additions & 3 deletions archetypes/helidon/src/main/archetype/se/custom/database.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022, 2023 Oracle and/or its affiliates.
Copyright (c) 2022, 2024 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -154,7 +154,7 @@ Instructions for H2 can be found here: https://www.h2database.com/html/cheatShee
<output>
<model>
<value key="readme-description">Helidon SE application that uses the dbclient API with MySQL database.</value>
<value key="readme-native-docker">docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=password mysql:5.7</value>
<value key="readme-native-docker">docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=changeit mysql:5.7</value>
<value key="readme-native-url">url: jdbc:mysql:tcp://127.0.0.1:3306/pokemon?useSSL=false</value>
<value key="integration-artifactId">helidon-integrations-db-mysql</value>
<value key="db">MySQL</value>
Expand All @@ -163,7 +163,7 @@ Instructions for H2 can be found here: https://www.h2database.com/html/cheatShee
This example requires a MySQL database, start it using docker:
```
docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=password mysql:5.7
docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=changeit mysql:5.7
```
]]></value>
</list>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
db:
source: jdbc
connection:
# docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=password mysql:5.7
# docker run --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=pokemon -e MYSQL_USER=user -e MYSQL_PASSWORD=changeit mysql:5.7
url: jdbc:mysql://127.0.0.1:3306/pokemon?useSSL=false
username: user
password: password
password: changeit
poolName: mysql
initializationFailTimeout: -1
connectionTimeout: 2000
Expand Down

0 comments on commit a60ff40

Please sign in to comment.