-
-
Notifications
You must be signed in to change notification settings - Fork 18
Secrets frontend #1459
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
Secrets frontend #1459
Conversation
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.
Pull request overview
This PR adds a comprehensive secrets management frontend feature to the application, allowing users to securely store and manage sensitive information like API keys and passwords. It also refactors the password strength meter from a global dependency to route-level providers and converts the routing configuration to use lazy loading for better performance.
Key Changes:
- New secrets management feature with full CRUD operations, master password encryption, expiration dates, and audit logging
- Refactored password strength meter to be provided at the route level instead of globally
- Converted all routes to lazy loading using
loadComponentandloadChildren
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/main.ts | Removed global PasswordStrengthMeterComponent and provideZxvbnServiceForPSM from application bootstrap |
| frontend/src/app/services/secrets.service.ts | New service implementing all secrets API operations with error handling and notifications |
| frontend/src/app/routes/*.routes.ts | New route configuration files providing password strength meter at route level |
| frontend/src/app/models/secret.ts | TypeScript interfaces for secret-related data structures |
| frontend/src/app/components/secrets/*.component.ts | Complete secrets UI with dialogs for create, view, edit, delete, and audit log operations |
| frontend/src/app/components/secrets/*.component.spec.ts | Unit tests for all secrets components |
| frontend/src/app/components/secrets/*.component.html | Templates with responsive design and accessibility features |
| frontend/src/app/components/secrets/*.component.css | Styles with dark mode support and mobile responsiveness |
| frontend/src/app/app.component.html | Added Secrets navigation links in sidebar and account menu |
| frontend/src/app/app-routing.module.ts | Converted all routes to lazy loading with new secrets route |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let headers = new HttpHeaders(); | ||
| if (masterPassword) { | ||
| headers = headers.set('masterPassword', masterPassword); |
Copilot
AI
Dec 5, 2025
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.
Sensitive information (master password) should not be sent in HTTP headers as they may be logged by proxies, load balancers, or monitoring tools. Consider sending this in the request body using a POST request instead.
| .pipe( | ||
| map(res => res), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
| return res; | ||
| }), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
| .pipe( | ||
| map(res => res), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
|
|
||
| return this._http.get<SecretListResponse>('/secrets', { params }) | ||
| .pipe( | ||
| map(res => res), |
Copilot
AI
Dec 5, 2025
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 map(res => res) operation is redundant as it doesn't transform the response in any way. This can be removed to simplify the code.
| .pipe( | ||
| map(res => res), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
| return res; | ||
| }), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
| return res; | ||
| }), | ||
| catchError((err) => { | ||
| console.log(err); |
Copilot
AI
Dec 5, 2025
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.
Using console.log for error logging in production code is not recommended. Consider using a proper logging service or removing these logs in production builds.
|
|
||
| return this._http.get<SecretWithValue>(`/secrets/${slug}`, { headers }) | ||
| .pipe( | ||
| map(res => res), |
Copilot
AI
Dec 5, 2025
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 map(res => res) operation is redundant as it doesn't transform the response in any way. This can be removed to simplify the code.
…n into secrets-frontend
No description provided.