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

[3.x] security review for archetypes #8454

Merged
merged 1 commit into from
Mar 5, 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
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
Loading