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

[EDGORDERS-83-ENV]. Refactor for TLS configuration for Spring-based Environment #105

Merged
merged 17 commits into from
May 24, 2024

Conversation

BKadirkhodjaev
Copy link
Contributor

@BKadirkhodjaev BKadirkhodjaev commented May 24, 2024

Use Spring ENV vars

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@BKadirkhodjaev BKadirkhodjaev requested a review from azizbekxm May 24, 2024 06:54
README.md Show resolved Hide resolved
@SerhiiNosko SerhiiNosko requested a review from julianladisch May 24, 2024 09:10
README.md Outdated
Comment on lines 175 to 179
| `SPRING_SSL_BUNDLE_JKS_WEB-SERVER_KEYSTORE_TYPE` | `NA` | (Required). Set the type of the keystore. Common types include `JKS`, `PKCS12`, and `BCFKS` |
| `SPRING_SSL_BUNDLE_JKS_WEB-SERVER_KEYSTORE_LOCATION` | `NA` | (Required). Set the location of the keystore file in the local file system |
| `SPRING_SSL_BUNDLE_JKS_WEB-SERVER_KEYSTORE_PASSWORD` | `NA` | (Required). Set the password for the keystore |
| `SPRING_SSL_BUNDLE_JKS_WEB-SERVER_KEY_ALIAS` | `NA` | Set the alias of the key within the keystore. |
| `SPRING_SSL_BUNDLE_JKS_WEB-SERVER_KEY_PASSWORD` | `NA` | Optional param that points to a password of `KEY_ALIAS` if it protected |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azizbekxm azizbekxm requested a review from julianladisch May 24, 2024 11:56
Comment on lines 29 to 33
public static final String SPRING_SSL_BUNDLE_JKS_WEB_SERVER_KEYSTORE_TYPE = "SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_TYPE";
public static final String SPRING_SSL_BUNDLE_JKS_WEB_SERVER_KEYSTORE_LOCATION = "SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_LOCATION";
public static final String SPRING_SSL_BUNDLE_JKS_WEB_SERVER_KEYSTORE_PASSWORD = "SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_PASSWORD";
public static final String SPRING_SSL_BUNDLE_JKS_WEB_SERVER_KEY_ALIAS = "SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEY_ALIAS";
public static final String SPRING_SSL_BUNDLE_JKS_WEB_SERVER_KEY_PASSWORD = "SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEY_PASSWORD";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name should also be renamed: WEB_SERVER -> WEBSERVER

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I do the same for the FOLIO_CLIENT_TLS_* variables?

Comment on lines 37 to 39
public static final String FOLIO_CLIENT_TLS_TRUST_STORE_TYPE = "FOLIO_CLIENT_TLS_TRUSTSTORETYPE";
public static final String FOLIO_CLIENT_TLS_TRUST_STORE_PATH = "FOLIO_CLIENT_TLS_TRUSTSTOREPATH";
public static final String FOLIO_CLIENT_TLS_TRUST_STORE_PASSWORD = "FOLIO_CLIENT_TLS_TRUSTSTOREPASSWORD";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming the variable name gives a better indication of the content:
TRUST_STORE_TYPE -> TRUSTSTORETYPE
TRUST_STORE_PATH -> TRUSTSTOREPATH
TRUST_STORE_PASSWORD -> TRUSTSTOREPASSWORD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged

README.md Outdated
@@ -165,34 +165,31 @@ Configuration information is specified in two forms:
| `request_timeout_ms` | `30000` | Request Timeout |
| `api_key_sources` | `PARAM,HEADER,PATH` | Defines the sources (order of precendence) of the API key. |

### System Properties for TLS configuration for Http server
### Env variables for TLS configuration for Http server

To configure Transport Layer Security (TLS) for the HTTP server in an edge module, the following configuration parameters should be used.
Parameters marked as Required are required only in case when ssl_enabled is set to true.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssl_enabled has been replaced with checking whether SPRING_SSL_BUNDLE_JKS_WEBSERVER_KEYSTORE_TYPE is defined.

README.md Outdated Show resolved Hide resolved
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants