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

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

Closed
1 task done
Tracked by #2480
accolon opened this issue Dec 11, 2022 · 1 comment · Fixed by #2490
Closed
1 task done
Tracked by #2480
Assignees
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@accolon
Copy link
Contributor

accolon commented Dec 11, 2022

Steps To Reproduce

  1. Provide the required certificate and private key file.
  2. Set BW_ENABLE_SSL to "true" in settings.env.
  3. Set BW_SSL_KEY to a name other than "ssl.key" (e.g. "private.key" following the BW documentation on "certificate options") in settings.env.
  4. Start the server.

Expected Result

BW Unified uses provided cert and key.

Actual Result

BW Unified doesn't find "ssl.key" and tries to generate a key pair, overwriting the provided key file (or failing to do so). The nginx server doesn't start.

It seems that this part in the entrypoint.sh is the problem:

if [ "$BW_ENABLE_SSL" == "true" -a ! -f /etc/bitwarden/ssl.key ]; then

It only checks if "ssl.key" doesn't exist, not respecting the BW_SSL_KEY setting.

Screenshots or Videos

No response

Additional Context

No response

Githash Version

n/a

Environment Details

No response

Database Image

No response

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@accolon
Copy link
Contributor Author

accolon commented Dec 11, 2022

I just had some time to build a small dev environment for BW and make sure this can be fixed easily. I created a pull request, see above.

While I tried to follow your guidelines, please bear with me if I did something wrong. I don't use Github that often to contribute things.

@accolon accolon closed this as completed Dec 11, 2022
@accolon accolon reopened this Dec 11, 2022
@vgrassia vgrassia self-assigned this Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants