Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
784 changes: 404 additions & 380 deletions BrowserGuard.Tests/Configuration/ConfigLoaderTests.cs

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions docs/testconfig/01_all-disabled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"NetLogger": {
"Enabled": false,
"UrlAccess": false,
"Browsing": false,
"Upload": false,
"Download": false,
"Print": false,
"LocalFile": {
"Enabled": false,
"Directory": "",
"MaxDays": 30,
"MaxSizeMB": 0
},
"Sender": {
"Enabled": false,
"Endpoint": "",
"OnSendFailure": {
"SaveLocally": false,
"RetryIntervalMinutes": 5,
"MaxSizeMB": 10
}
}
},
"UploadGuard": {
"Enabled": false,
"BlockedExtensions": [],
"AllowedExtensions": [],
"AllowedPaths": [],
"BlockedPaths": []
},
"SettingPageFilter": {
"Enabled": false,
"NotifyOnBlocked": true,
"BlockedPrefixes": []
},
"StartupLauncher": {
"Enabled": false,
"Programs": []
},
"UsageTimeLimit": {
"Enabled": false,
"MaxContinuousMinutes": 0,
"AllowedTimeRanges": [],
"OnExceeded": {
"Action": "WarnOnly",
"GraceSeconds": 60,
"ReWarnIntervalMinutes": 10
}
},
"TabCountLimit": {
"Enabled": false,
"MaxCount": 0
},
"UploadFileBridge": {
"Enabled": false,
"Destination": "",
"MaxSizeMB": 0,
"BlockedExtensions": [],
"AllowedExtensions": [],
"BlockedUrls": [],
"AllowedUrls": []
}
}
75 changes: 75 additions & 0 deletions docs/testconfig/02_strict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"NetLogger": {
"Enabled": true,
"UrlAccess": true,
"Browsing": true,
"Upload": true,
"Download": true,
"Print": true,
"LocalFile": {
"Enabled": true,
"Directory": "C:\\BrowserGuardTest\\netlog\\%PCNAME%",
"MaxDays": 30,
"MaxSizeMB": 0
},
"Sender": {
"Enabled": true,
"Endpoint": "http://localhost:8001",
"OnSendFailure": {
"SaveLocally": true,
"RetryIntervalMinutes": 1,
"MaxSizeMB": 10
}
}
},
"UploadGuard": {
"Enabled": true,
"BlockedExtensions": [".exe", ".bat", ".cmd", ".js", ".vbs"],
"AllowedExtensions": [".pdf", ".docx", ".xlsx"],
"AllowedPaths": ["^C:\\\\Users\\\\[^\\\\]+\\\\Documents\\\\"],
"BlockedPaths": ["\\\\Confidential\\\\"]
},
"SettingPageFilter": {
"Enabled": true,
"NotifyOnBlocked": true,
"BlockedPrefixes": ["edge://settings", "edge://flags", "edge://policy", "edge://extensions"]
},
"StartupLauncher": {
"Enabled": true,
"Programs": [
{
"Path": "C:\\BrowserGuardTest\\EnvDump.exe",
"Arguments": [],
"WorkingDirectory": "C:\\BrowserGuardTest",
"EnvironmentVariables": { "BROWSERGUARD_STARTUP_TEST": "from-config" },
"Sha256": ""
}
]
},
"UsageTimeLimit": {
"Enabled": true,
"MaxContinuousMinutes": 5,
"AllowedTimeRanges": [
{ "Start": "09:00", "End": "12:00" },
{ "Start": "13:00", "End": "18:00" }
],
"OnExceeded": {
"Action": "Terminate",
"GraceSeconds": 60,
"ReWarnIntervalMinutes": 1
}
},
"TabCountLimit": {
"Enabled": true,
"MaxCount": 5
},
"UploadFileBridge": {
"Enabled": true,
"Destination": "C:\\BrowserGuardTest\\audit\\%PCNAME%\\%USERID%\\%DATE%",
"MaxSizeMB": 10,
"BlockedExtensions": [".tmp", ".log"],
"AllowedExtensions": [],
"BlockedUrls": ["^https://localhost"],
"AllowedUrls": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BrowserGuard integration test sample (mixed case).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BrowserGuard 連結テスト用サンプル(日本語・記号)。
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BrowserGuard 連結テスト用サンプル(濁点・半濁点)。
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
項目,金額
売上,100
経費,50
Loading
Loading