-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(environment): Make SSL variables optional #8843
Conversation
Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the SERVER_URL started with 'https'. This change makes these variables optional, allowing greater flexibility in dealing with SSL configurations. This update helps in scenarios where SSL paths are managed differently or not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR modifies the SSL configuration validation in the environment variables, making SSL certificate paths optional rather than required when using HTTPS.
- Modified
environment-variables.ts
to makeSSL_KEY_PATH
andSSL_CERT_PATH
optional by removing conditional validation - Potential security concern: HTTPS servers could now run without proper SSL certificate validation
- Change provides more flexibility but removes enforcement of SSL certificates with HTTPS protocol
- Recommend adding documentation or validation warnings when HTTPS is used without SSL paths specified
- Consider adding runtime checks to ensure secure HTTPS configuration when certificates are missing
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
@IsString() | ||
@ValidateIf((env) => env.SERVER_URL.startsWith('https')) | ||
@IsOptional() | ||
SSL_KEY_PATH: string; | ||
|
||
@IsString() | ||
@ValidateIf((env) => env.SERVER_URL.startsWith('https')) | ||
@IsOptional() | ||
SSL_CERT_PATH: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding a warning when SERVER_URL uses HTTPS but SSL paths are not provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Log
|
Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the SERVER_URL started with 'https'. This change makes these variables optional, allowing greater flexibility in dealing with SSL configurations. This update helps in scenarios where SSL paths are managed differently or not needed.
Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the SERVER_URL started with 'https'. This change makes these variables optional, allowing greater flexibility in dealing with SSL configurations. This update helps in scenarios where SSL paths are managed differently or not needed.