Skip to content
2 changes: 2 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
ports:
- "8001:8000"
- "8089:8089"
- "8088:8088"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This port has been exposed because it is where we access Splunk's HTTP Event Collector, which is the new delivery path for getting event data into Splunk.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This enables local development testing

environment:
SPLUNK_GENERAL_TERMS: "--accept-sgt-current-at-splunk-com"
SPLUNK_START_ARGS: "--accept-license"
Expand All @@ -19,6 +20,7 @@ services:
ports:
- "8001:8000"
- "8089:8089"
- "8088:8088"
environment:
SPLUNK_START_ARGS: "--accept-license"
SPLUNK_PASSWORD: password
358 changes: 200 additions & 158 deletions ui/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,178 +24,220 @@ <h1 class="mt-1 text-2xl font-semibold text-gray-900">
</p>

<div class="mt-8 grid gap-x-4 gap-y-2">
<h3 class="font-semibold text-gray-900">Bitwarden API Key</h3>
<p>
Your
<a
class="font-medium text-blue-600 hover:underline"
href="https://bitwarden.com/help/public-api/#authentication"
target="_blank"
rel="noopener noreferrer"
>API key</a
>
can be found in the Bitwarden organization Admin Console.
</p>
<div>
<label
for="clientId"
class="block text-sm font-medium leading-6 text-gray-900"
>Client Id</label
>
<div class="flex sm:max-w-md">
<input
type="text"
formControlName="clientId"
id="clientId"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
/>
</div>
@if (
setupForm.controls.clientId.invalid &&
setupForm.controls.clientId.touched
) {
<div class="text-red-600 text-sm">Client Id is required</div>
}
</div>
<div>
<label
for="clientSecret"
class="block text-sm font-medium leading-6 text-gray-900"
>Client Secret</label
>
<div class="flex sm:max-w-md">
<input
type="password"
formControlName="clientSecret"
id="clientSecret"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
/>
</div>
@if (
setupForm.controls.clientSecret.invalid &&
setupForm.controls.clientSecret.touched
) {
<div class="text-red-600 text-sm">Client Secret is required</div>
}
</div>
<h3 class="font-semibold text-gray-900">Event Delivery Mode</h3>
<span class="gap-x-2 flex items-center">
<input
name="mode"
type="radio"
formControlName="eventDeliveryMode"
id="poll"
value="poll"
/>
<label for="poll">REST API</label>
</span>

<h3 class="mt-6 font-semibold text-gray-900">Bitwarden Server Url</h3>
<p>
Self-hosted Bitwarden servers may need to reconfigure their
installation's URL.
</p>
<div>
<label
for="serverUrl"
class="block text-sm font-medium leading-6 text-gray-900"
>Server Url</label
>
<div class="mt-2">
<select
id="serverUrlType"
formControlName="serverUrlType"
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
<span class="gap-x-2 flex items-center">
<input
name="mode"
type="radio"
formControlName="eventDeliveryMode"
id="push"
value="push"
/>
<label for="push">HEC Event Collector</label>
</span>

@if (isPushEventDelivery()) {
<p class="mt-6 text-gray-600">
To complete setup for receiving event logs with the HEC Event
Collector, follow the instructions in the
<a
class="font-medium text-blue-600 hover:underline"
href="https://bitwarden.com/help/splunk-siem/#connect-your-bitwarden-organization"
target="_blank"
rel="noopener noreferrer"
>
<option value="bitwarden.com">Bitwarden US (bitwarden.com)</option>
<option value="bitwarden.eu">Bitwarden EU (bitwarden.eu)</option>
<option value="self-hosted">Self-Hosted</option>
</select>
</div>
<div class="flex sm:max-w-md">
<input
type="url"
formControlName="serverUrl"
id="serverUrl"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
placeholder="Select server url from dropdown or type your self-hosted domain"
/>
Bitwarden Splunk documentation</a
>.
</p>
} @else {
<h3 class="mt-6 font-semibold text-gray-900">Bitwarden API Key</h3>
<p>
Your
<a
class="font-medium text-blue-600 hover:underline"
href="https://bitwarden.com/help/public-api/#authentication"
target="_blank"
rel="noopener noreferrer"
>API key</a
>
can be found in the Bitwarden organization Admin Console.
</p>
<div>
<label
for="clientId"
class="block text-sm font-medium leading-6 text-gray-900"
>Client Id</label
>
<div class="flex sm:max-w-md">
<input
type="text"
formControlName="clientId"
id="clientId"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
/>
</div>
@if (
setupForm.controls.clientId.invalid &&
setupForm.controls.clientId.touched
) {
<div class="text-red-600 text-sm">Client Id is required</div>
}
</div>
@if (
setupForm.controls.serverUrl.invalid &&
setupForm.controls.serverUrl.touched
) {
<div class="text-red-600 text-sm">
@if (setupForm.controls.serverUrl.hasError("required")) {
Server Url is required
} @else if (setupForm.controls.serverUrl.hasError("insecureUrl")) {
URLs starting with 'http://' are considered insecure and are not
allowed in Splunk. Please use 'https://' instead.
} @else {
Invalid Url
}
<div>
<label
for="clientSecret"
class="block text-sm font-medium leading-6 text-gray-900"
>Client Secret</label
>
<div class="flex sm:max-w-md">
<input
type="password"
formControlName="clientSecret"
id="clientSecret"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
/>
</div>
}
</div>
@if (
setupForm.controls.clientSecret.invalid &&
setupForm.controls.clientSecret.touched
) {
<div class="text-red-600 text-sm">Client Secret is required</div>
}
</div>

<h3 class="mt-6 font-semibold text-gray-900">Splunk Index</h3>
<p>Choose a Splunk index for the Bitwarden event logs.</p>
<div>
<label
for="index"
class="block text-sm font-medium leading-6 text-gray-900"
>Index</label
>
<div class="mt-2">
<select
id="index"
formControlName="index"
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
>
@if (indexes !== undefined) {
@for (name of indexes(); track name) {
<option [value]="name">
{{ name }}
</option>
<h3 class="mt-6 font-semibold text-gray-900">Bitwarden Server Url</h3>
<p>
Self-hosted Bitwarden servers may need to reconfigure their
installation's URL.
</p>
<div class="flex flex-col gap-y-2">
<div class="mt-2">
<label
for="serverUrl"
class="block text-sm font-medium leading-6 text-gray-900"
>Server Url</label
>
<select
id="serverUrlType"
formControlName="serverUrlType"
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
>
<option value="bitwarden.com">
Bitwarden US (bitwarden.com)
</option>
<option value="bitwarden.eu">Bitwarden EU (bitwarden.eu)</option>
<option value="self-hosted">Self-Hosted</option>
</select>
</div>
<div class="flex sm:max-w-md">
<input
type="url"
formControlName="serverUrl"
id="serverUrl"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
placeholder="Select server url from dropdown or type your self-hosted domain"
/>
</div>
@if (
setupForm.controls.serverUrl.invalid &&
setupForm.controls.serverUrl.touched
) {
<div class="text-red-600 text-sm">
@if (setupForm.controls.serverUrl.hasError("required")) {
Server Url is required
} @else if (
setupForm.controls.serverUrl.hasError("insecureUrl")
) {
URLs starting with 'http://' are considered insecure and are not
allowed in Splunk. Please use 'https://' instead.
} @else {
Invalid Url
}
} @else {
<option disabled value="" selected>Loading..</option>
}
</select>
</div>
}
</div>
<div class="flex sm:max-w-md">
<input
type="text"
formControlName="indexOverride"
id="indexOverride"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
placeholder="Select index from the dropdown or type the index name manually"
/>
</div>
@if (
setupForm.hasError("indexRequired") &&
(setupForm.controls.index.touched ||
setupForm.controls.indexOverride.touched)
) {
<div class="text-red-600 text-sm">Index is required</div>
}
</div>

<h3 class="mt-6 font-semibold text-gray-900">Event Logs</h3>
<p>
Choose the earliest Bitwarden event date to retrieve. The default is 1
year before today's date.<br />
<span class="text-sm"
>This only works for first time setup. Make sure you have no other
Bitwarden events to avoid duplications.</span
>
</p>
<div>
<label
for="startDate"
class="block text-sm font-medium leading-6 text-gray-900"
>Start date (optional)</label
>
<div>
<h3 class="mt-6 font-semibold text-gray-900">Splunk Index</h3>
<p>Choose a Splunk index for the Bitwarden event logs.</p>
<div class="flex flex-col gap-y-2">
<div class="mt-2">
<label
for="index"
class="block text-sm font-medium leading-6 text-gray-900"
>Index</label
>
<select
id="index"
formControlName="index"
class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
>
@if (indexes !== undefined) {
@for (name of indexes(); track name) {
<option [value]="name">
{{ name }}
</option>
}
} @else {
<option disabled value="" selected>Loading..</option>
}
</select>
</div>
<div class="flex sm:max-w-md">
<input
type="date"
formControlName="startDate"
id="startDate"
type="text"
formControlName="indexOverride"
id="indexOverride"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
placeholder="Select index from the dropdown or type the index name manually"
/>
</div>
@if (
setupForm.hasError("indexRequired") &&
(setupForm.controls.index.touched ||
setupForm.controls.indexOverride.touched)
) {
<div class="text-red-600 text-sm">Index is required</div>
}
</div>
</div>

<h3 class="mt-6 font-semibold text-gray-900">Event Logs</h3>
<p>
Choose the earliest Bitwarden event date to retrieve. The default is 1
year before today's date.<br />
<span class="text-sm"
>This only works for first time setup. Make sure you have no other
Bitwarden events to avoid duplications.</span
>
</p>
<div>
<label
for="startDate"
class="block text-sm font-medium leading-6 text-gray-900"
>Start date (optional)</label
>
<div>
<div class="flex sm:max-w-md">
<input
type="date"
formControlName="startDate"
id="startDate"
class="block flex-1 border rounded-md border-gray-300 focus:border-indigo-600 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 sm:text-sm sm:leading-6"
/>
</div>
</div>
</div>
}

@if (setupForm.invalid && setupForm.touched) {
<div
Expand Down
Loading
Loading