-
Notifications
You must be signed in to change notification settings - Fork 8
[AC-3006] Splunk app UI rewrite #63
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
Conversation
|
New Issues (14)Checkmarx found the following issues in this Pull Request
|
…gular # Conflicts: # README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Some suggestions, some questions. We're still on Angular 16 in clients and we don't use the Angular CLI, so the differences with a brand new app are interesting (and somewhat unfamiliar to me).
| <input | ||
| type="text" | ||
| name="clientId" | ||
| id="clientId" | ||
| [(ngModel)]="model.clientId" | ||
| #clientId="ngModel" | ||
| required | ||
| class="form-control block flex-1 border-1 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 (clientId.invalid) { | ||
| <div class="alert alert-danger text-red-600 text-sm"> | ||
| Client Id is required | ||
| </div> | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's quite a bit of extra work here to recreate what is essentially a typed reactive form. We almost exclusively use reactive forms in our clients repository and it's much easier to manage medium-to-large forms.
If this used a reactive form, you could declare the form's structure and validators in app.component.ts, and then there'd be less boilerplate throughout the template to declare bindings on everything. Let me know if I can help with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some strange responsive behaviour here on small screens:
Screen.Recording.2024-10-30.at.12.07.02.PM.mov
| private readonly globalNamespaceService = new SplunkJsServiceBuilder({ | ||
| owner: "-", | ||
| app: "-", | ||
| sharing: "app", | ||
| }); | ||
| private readonly bitwardenAppService; | ||
|
|
||
| constructor(config: AppConfig) { | ||
| this.bitwardenAppService = new SplunkJsServiceBuilder({ | ||
| owner: "nobody", | ||
| app: config.appName, | ||
| sharing: "app", | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the namespace distinguish between global Splunk configuration (e.g. indexes) and Bitwarden app configuration (e.g. client ID and secret)? That's what I get from the docs but I'm just confirming my own understanding. (maybe some jsdoc comments explaining that would also be useful)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The different levels of abstraction between BitwardenSplunkService, SplunkService and SplunkJsServiceBuilder/SplunkJsProvider make sense, however the relationship between them isn't immediately clear. I suggest some jsdoc comments would really help, and could also explain the global SplunkJs variable which is also non-standard. e.g.
- SplunkJsProvider: returns the global Splunk SDK object from the
splunk-sdkpackage, injected viaangular.json - SplunkJsServiceBuilder: instantiates a new Splunk service from the SDK using the provided namespace
- SplunkService: a Typescript wrapper around the Splunk service, maintaining a similar interface
- BitwardenSplunkService: a wrapper around SplunkService with a Bitwarden specific interface
Co-authored-by: Thomas Rittson <[email protected]>
I have not documented it, but because splunk runs on different port than the development mode and CORS is enabled, splunk rejects any http calls when loading the bitwarden app configuration. Line 14 in 976a69b
The http calls will still fail, since bitwarden event logs app is not installed in splunk. You can install it with: I was planning on adding this to the contributing docs if that works for you. |
|
The contributing docs sound like a good place to include this info. Thanks! Please re-request my review when your changes are ready 👍 |
Raised https://bitwarden.atlassian.net/browse/PM-15355 for unit test coverage
# Conflicts: # .github/workflows/build.yml # deploy.sh # package/appserver/static/javascript/setup_page.js # package/appserver/static/javascript/views/setup_page.js
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check failure
Code scanning / Checkmarx One
Npm-path-to-regexp-0.1.10 (CVE-2024-52798) High
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-cookie-0.4.2 (CVE-2024-47764) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-nanoid-3.3.7 (CVE-2024-55565) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-vite-5.4.6 (CVE-2025-24010) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-esbuild-0.21.5 (Cxbb85e86c-2fac) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check notice
Code scanning / Checkmarx One
Npm-debug-4.3.7 (Cx8bc4df28-fcf5) Low
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-@babel/helpers-7.26.0 (CVE-2025-27789) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-vite-5.4.6 (CVE-2025-31125) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-vite-5.4.6 (CVE-2025-31486) Medium
| @@ -0,0 +1,59 @@ | |||
| { | |||
Check warning
Code scanning / Checkmarx One
Npm-vite-5.4.6 (CVE-2025-32395) Medium
vgrassia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build workflow changes look good to me.
|
@mzieniukbw This is (finally!) in our regular sprint work so I will be taking it over. I will preserve your commits (and co-authorship) but I will open my own PR once it is ready for review by the team. That should also drop you off the Github notifications so we don't bother you. Thanks again for your work here! |






🎟️ Tracking
https://bitwarden.atlassian.net/browse/AC-3006
📔 Objective
Rewrite the Splunk UI of the Bitwarden Event Logs application.
Technology: Node, Angular v18, Tailwind
Rewrite Benefits:
ℹ️ Notes
importorrequirealso does not work, so splunk sdk is imported during build in form ofsplunkjsglobal variable. JS/TS types are defined insplunk-js.service.ts. While Splunk UI in which the app's UI runs provides it's own Splunk SDK insplunkjsglobal variable, it's outdated and as a result have differences between various Splunk versions.📷 Screenshots
Note: Splunk CSS seems to override a lot of things, but maybe that's for better, since it's more Splunk native look.
No errors:
Save success:
Validation issues:
⏰ Reminders before review
🦮 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