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

PM-11586: Bitwarden API self-signed certificate fix #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mzieniukbw
Copy link
Contributor

@mzieniukbw mzieniukbw commented Sep 22, 2024

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-11586

๐Ÿ“” Objective

Provides ability to verify Bitwarden Server Url with self-signed certificate.
The custom CA certs file will be located in $SPLUNK_HOME/etc/auth/bitwarden_event_logs_cacerts.pem. If file does not exist, we use default CA certs location (certifi).
It's then up to the customer's discretion to create and fill in the file with custom (usually self-signed) CA certificate chains in PEM format.

Fixes #62

Other solutions considered:

  • Provide a guide for customers to update cacert.pem (certifi) that the app uses. Downsides:
    • Changes lost on app update
  • Provide a guide for customers to update cacert.pem (certifi) of the Splunk provided Python executable's packages. Then require the app to use python provided lib (certifi), instead of app provided lib package. Downsides:
    • Splunk Enterprise version dependent (no guarantee if certifi is provided, we can at best assume).
    • Using old version of the library (certifi).
    • Changes potentially lost on splunk update
  • Provide an "Upload PEM" file upload in UI. Downsides:
    • Moves the responsibility to update (since certs can have short expiry time) of chained self-signed certs from Infrastructure (usually DevOps), to Splunk Admins.
    • Complex: Need to validate the uploaded file content, to not open a potential attack vector to uploading a custom file that could gain machine access (Risk that the app might not vet on Splunk Cloud ?)
    • Complex: Python app needs to consume the PEM as file, which means every single time the app starts, it needs to read uploaded PEM from Splunk kvstore, store on disk temporarily and use. (which is this PR)

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ Reviewer guidelines

  • ๐Ÿ‘ (:+1:) or similar for great changes
  • ๐Ÿ“ (:memo:) or โ„น๏ธ (:information_source:) for notes or general info
  • โ“ (:question:) for questions
  • ๐Ÿค” (:thinking:) or ๐Ÿ’ญ (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • ๐ŸŽจ (:art:) for suggestions / improvements
  • โŒ (:x:) or โš ๏ธ (:warning:) for more significant problems or concerns needing attention
  • ๐ŸŒฑ (:seedling:) or โ™ป๏ธ (:recycle:) for future improvements or indications of technical debt
  • โ› (:pick:) for minor or nitpick changes

@mzieniukbw mzieniukbw requested a review from a team as a code owner September 22, 2024 13:20
Copy link

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 37b54585-72d6-48a8-807f-b9fef10d7b2e

No New Or Fixed Issues Found

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.

Certificate verify failed: unable to get local issuer
2 participants