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
@@ -0,0 +1,35 @@
|
||||
interface SensitiveConnectionValueProps {
|
||||
value?: string | null;
|
||||
isRedacted: boolean;
|
||||
}
|
||||
|
||||
/** Keeps connection fields discoverable without exposing their values to viewers. */
|
||||
export default function SensitiveConnectionValue({
|
||||
value,
|
||||
isRedacted,
|
||||
}: SensitiveConnectionValueProps) {
|
||||
if (!isRedacted) {
|
||||
return <>{value || "—"}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
<span
|
||||
aria-label="Connection address hidden for viewer"
|
||||
title="Connection address hidden"
|
||||
style={{
|
||||
display: "inline-flex",
|
||||
alignItems: "center",
|
||||
borderRadius: 4,
|
||||
padding: "2px 7px",
|
||||
background: "var(--bg-input)",
|
||||
border: "1px solid var(--border)",
|
||||
color: "var(--text-muted)",
|
||||
fontSize: 10,
|
||||
letterSpacing: "0.08em",
|
||||
userSelect: "none",
|
||||
}}
|
||||
>
|
||||
••••••••••••
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user