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

Support for EU cloud instance #56

Open
jpclipffel opened this issue Jul 22, 2024 · 1 comment · May be fixed by #57 or #63
Open

Support for EU cloud instance #56

jpclipffel opened this issue Jul 22, 2024 · 1 comment · May be fixed by #57 or #63

Comments

@jpclipffel
Copy link

Problem

When deployed on Splunk Cloud or Splunk on-premises, the add-on fails to consume events from bitwarden.eu (European) cloud instance.

Cause

The configuration generator package/appserver/static/javascript/views/setup_page.js determine if a server is a cloud instance by looking for an exact match for https://bitwarden.com, and ignore actual server host when generating the configuration:

// Update script.conf
const isBitwardenCloud = serverUrl === "https://bitwarden.com" || serverUrl === "bitwarden.com";
const apiUrl = isBitwardenCloud ? "https://api.bitwarden.com" : serverUrl + "/api/";
const identityUrl = isBitwardenCloud ? "https://identity.bitwarden.com" : serverUrl + "/identity/";

Temporary solution

Manually patch the generated configuration file ${SPLUNK_HOME}/etc/apps/bitwarden_event_logs/local/script.conf from:

[config]
apiUrl = https://bitwarden.eu/api
identityUrl = https://bitwarden.eu/identity

To:

[config]
apiUrl = https://api.bitwarden.eu/
identityUrl = https://identity.bitwarden.eu/

I confirm I am collecting Bitwarden events as excepted after applying this patch.

Proper solution

Patch the configuration generator package/appserver/static/javascript/views/setup_page.js as follow:

  • Parse server URL as an URL object
  • Support for non-US region (e.g. bitwarden.eu)
  • Use server's host value when templating the configuration
@jpclipffel jpclipffel linked a pull request Jul 22, 2024 that will close this issue
@djsmith85 djsmith85 linked a pull request Jul 22, 2024 that will close this issue
@bitwarden-bot
Copy link

Thank you for your report! We've added this to our internal board for review.
ID: PM-10035

@eliykat eliykat linked a pull request Oct 30, 2024 that will close this issue
@eliykat eliykat linked a pull request Oct 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants