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

[PS-2024] Respect name set in BW_SSL_KEY for cert generation #2490

Merged
merged 1 commit into from
Dec 13, 2022
Merged

[PS-2024] Respect name set in BW_SSL_KEY for cert generation #2490

merged 1 commit into from
Dec 13, 2022

Conversation

accolon
Copy link
Contributor

@accolon accolon commented Dec 11, 2022

Type of change

- [X] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

This small fix makes the entrypoint.sh respect the key name set via BW_SSL_KEY in BW Unified's settings.env. Before, it always tried to create new certificates when a file named ssl.key was not found.

Fixes #2489.

Code changes

  • entrypoint.sh: If BW_SSL_KEY is set, its value is used instead of the hard-coded value ssl.key.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2022

CLA assistant check
All committers have signed the CLA.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PS-2024

@bitwarden-bot bitwarden-bot changed the title Respect name set in BW_SSL_KEY for cert generation [PS-2024] Respect name set in BW_SSL_KEY for cert generation Dec 11, 2022
@djsmith85 djsmith85 added the bw-unified-deploy An Issue related to Bitwarden unified deployment label Dec 11, 2022
@vgrassia vgrassia self-assigned this Dec 13, 2022
@vgrassia vgrassia self-requested a review December 13, 2022 13:54
Copy link
Member

@vgrassia vgrassia left a comment

Choose a reason for hiding this comment

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

@accolon Thank you for catching this! This seems to be the correct fix. I'll get it merged in now.

@vgrassia vgrassia merged commit 2469e10 into bitwarden:master Dec 13, 2022
vgrassia pushed a commit that referenced this pull request Dec 13, 2022
MGibson1 added a commit that referenced this pull request Dec 14, 2022
* Add Sqlite as EF DB provider

Note: In-memory sqlite does not work across projects, since the migrator
only runs on the Admin project

Co-authored-by: Justin Baur <[email protected]>

* Include example sqlite connection string

* Add migrator assembly to sqlite connection

* Update initial migration to current schema state

* dotnet format 🤖

* Update package locks

* Respect name set in BW_SSL_KEY for cert generation (#2490)

(cherry picked from commit 2469e10)

* [PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495)

(cherry picked from commit c6fbe8c)

* Add SqliteMigrations project to unified Dockerfile

Co-authored-by: Justin Baur <[email protected]>
Co-authored-by: accolon <[email protected]>
Co-authored-by: Vince Grassia <[email protected]>
eliykat pushed a commit that referenced this pull request Jan 10, 2023
* Add Sqlite as EF DB provider

Note: In-memory sqlite does not work across projects, since the migrator
only runs on the Admin project

Co-authored-by: Justin Baur <[email protected]>

* Include example sqlite connection string

* Add migrator assembly to sqlite connection

* Update initial migration to current schema state

* dotnet format 🤖

* Update package locks

* Respect name set in BW_SSL_KEY for cert generation (#2490)

(cherry picked from commit 2469e10)

* [PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495)

(cherry picked from commit c6fbe8c)

* Add SqliteMigrations project to unified Dockerfile

Co-authored-by: Justin Baur <[email protected]>
Co-authored-by: accolon <[email protected]>
Co-authored-by: Vince Grassia <[email protected]>
eliykat pushed a commit that referenced this pull request Jan 10, 2023
* Add Sqlite as EF DB provider

Note: In-memory sqlite does not work across projects, since the migrator
only runs on the Admin project

Co-authored-by: Justin Baur <[email protected]>

* Include example sqlite connection string

* Add migrator assembly to sqlite connection

* Update initial migration to current schema state

* dotnet format 🤖

* Update package locks

* Respect name set in BW_SSL_KEY for cert generation (#2490)

(cherry picked from commit 2469e10)

* [PS-2016] Add ability to change UID/GID for Bitwarden unified (#2495)

(cherry picked from commit c6fbe8c)

* Add SqliteMigrations project to unified Dockerfile

Co-authored-by: Justin Baur <[email protected]>
Co-authored-by: accolon <[email protected]>
Co-authored-by: Vince Grassia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bw-unified-deploy An Issue related to Bitwarden unified deployment community-pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BW Unified always trying to generate a new SSL key pair / requiring a fixed name for private key
6 participants