feat: implement sensitive data redaction for viewer roles
- Introduced SensitiveConnectionValue component to handle redaction of sensitive connection details across the frontend. - Updated API to include canViewServerConnection and canViewEnvironmentValues functions to determine access based on user roles. - Enhanced backend response sanitization to remove sensitive data for viewer roles, ensuring no sensitive information is exposed in API responses. - Applied redaction logic in various components including ServersTable, DomainsTable, and EnvironmentHeader to maintain UI consistency while hiding sensitive information. - Added comprehensive audit documentation outlining the implementation and maintenance rules for sensitive data handling.
This commit is contained in:
1 parent
b12f0f9669
commit
8dac31b71f
15 files changed
+312
-37
No files matched your search
@@ -10,7 +10,11 @@ import {
|
||||
RepositoryVisibility,
|
||||
} from "@prisma/client";
|
||||
import { decrypt, encrypt } from "../lib/crypto";
|
||||
import { authenticate, requireApiKeyPermission } from "../middleware/auth";
|
||||
import {
|
||||
authenticate,
|
||||
requireApiKeyPermission,
|
||||
requireRole,
|
||||
} from "../middleware/auth";
|
||||
import { auditLog } from "../services/audit.service";
|
||||
import { dispatchRuntimeNotification } from "../services/notification.service";
|
||||
import {
|
||||
@@ -2150,7 +2154,7 @@ export async function containerRoutes(app: FastifyInstance) {
|
||||
|
||||
app.get(
|
||||
"/:id/project-env",
|
||||
{ preHandler: containerReadAccess },
|
||||
{ preHandler: [...containerReadAccess, requireRole("DEVELOPER")] },
|
||||
async (req, reply) => {
|
||||
const { id } = req.params as { id: string };
|
||||
const container = await prisma.container.findFirst({
|
||||
|
||||
Reference in new issue
Block a user