|
71 | 71 | final Set<String> blocklist = new HashSet<>(AuthCheckFilter.IP_ACCESS_BLOCKLIST.getValue()); |
72 | 72 | if (blocklist.remove(deleteBlockedIP) ) { |
73 | 73 | AuthCheckFilter.IP_ACCESS_BLOCKLIST.setValue(blocklist); |
74 | | - webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Removed from Blocklist: '" + deleteBlockedIP + "', Blocklist now is {" + String.join(", ", blocklist) + "}"); |
| 74 | + webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Removed from Blocklist: '" + deleteBlockedIP + "', Blocklist now is {" + String.join(", ", AuthCheckFilter.IP_ACCESS_BLOCKLIST.getValue()) + "}"); |
75 | 75 | } |
76 | 76 | } |
77 | 77 | if (blockValue != null && errors.isEmpty()) { |
|
82 | 82 | final Set<String> blocklist = new HashSet<>(AuthCheckFilter.IP_ACCESS_BLOCKLIST.getValue()); |
83 | 83 | if (blocklist.add(blockValue)) { |
84 | 84 | AuthCheckFilter.IP_ACCESS_BLOCKLIST.setValue(blocklist); |
85 | | - webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Added to Blocklist: '" + blockValue + "', Blocklist now is {" + String.join(", ", blocklist) + "}"); |
| 85 | + webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Added to Blocklist: '" + blockValue + "', Blocklist now is {" + String.join(", ", AuthCheckFilter.IP_ACCESS_BLOCKLIST.getValue()) + "}"); |
86 | 86 | blockValue = null; |
87 | 87 | } |
88 | 88 | } |
|
92 | 92 | final Set<String> allowlist = new HashSet<>(AuthCheckFilter.IP_ACCESS_ALLOWLIST.getValue()); |
93 | 93 | if (allowlist.remove(deleteAllowedIP) ) { |
94 | 94 | AuthCheckFilter.IP_ACCESS_ALLOWLIST.setValue(allowlist); |
95 | | - webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Removed from Allowlist: '" + deleteAllowedIP + "', Allowlist now is {" + String.join(", ", allowlist) + "}"); |
| 95 | + webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Removed from Allowlist: '" + deleteAllowedIP + "', Allowlist now is {" + String.join(", ", AuthCheckFilter.IP_ACCESS_ALLOWLIST.getValue()) + "}"); |
96 | 96 | } |
97 | 97 | } |
98 | 98 | if (allowValue != null && errors.isEmpty()) { |
|
103 | 103 | final Set<String> allowlist = new HashSet<>(AuthCheckFilter.IP_ACCESS_ALLOWLIST.getValue()); |
104 | 104 | if (allowlist.add(allowValue)) { |
105 | 105 | AuthCheckFilter.IP_ACCESS_ALLOWLIST.setValue(allowlist); |
106 | | - webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Added from Allowlist: '" + allowValue + "', Allowlist now is {" + String.join(", ", allowlist) + "}"); |
| 106 | + webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Added to Allowlist: '" + allowValue + "', Allowlist now is {" + String.join(", ", AuthCheckFilter.IP_ACCESS_ALLOWLIST.getValue()) + "}"); |
107 | 107 | allowValue = null; |
108 | 108 | } |
109 | 109 | } |
|
116 | 116 | AuthCheckFilter.IP_ACCESS_IGNORE_EXCLUDES.setValue(ignoreExcludes); |
117 | 117 |
|
118 | 118 | // Log the event |
119 | | - webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Ignore excludes = " + ignoreExcludes); |
| 119 | + webManager.logEvent("Updated Admin Console access configuration (Access Lists).", "Ignore excludes = " + AuthCheckFilter.IP_ACCESS_IGNORE_EXCLUDES.getValue()); |
120 | 120 | response.sendRedirect("system-admin-console-access.jsp?success=true"); |
121 | 121 | return; |
122 | 122 | } |
|
182 | 182 | AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_TRUSTED_PROXIES.setValue(newTrustedProxies); |
183 | 183 |
|
184 | 184 | // Log the event |
185 | | - webManager.logEvent("Updated Admin Console access configuration (Forwarded).", "X-Forwarded-For enabled: " + isXFFEnabled + "\nRFC-Header: " + fHeader + "\nLegacy Header: " + xffHeader + "\nServer Header: " + xffServerHeader + "\nHost Name: " + name + "\nTrusted proxies: " + (newTrustedProxies == null || newTrustedProxies.isEmpty() ? "(none)" : String.join(", ", newTrustedProxies))); |
| 185 | + webManager.logEvent( |
| 186 | + "Updated Admin Console access configuration (Forwarded).", |
| 187 | + "Forwarded enabled: " + isXFFEnabled |
| 188 | + + "\nRFC Header: " + AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_HEADER.getValue() |
| 189 | + + "\nLegacy Header: " + AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_FOR.getValue() |
| 190 | + + "\nServer Header: " + AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_SERVER.getValue() |
| 191 | + + "\nHost Header: " + AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_HOST.getValue() |
| 192 | + + "\nHost Name: " + AdminConsolePlugin.ADMIN_CONSOLE_FORWARDED_HOST_NAME.getValue() |
| 193 | + + "\nTrusted proxies: " + (newTrustedProxies == null || newTrustedProxies.isEmpty() ? "(none)" : String.join(", ", newTrustedProxies)) |
| 194 | + ); |
186 | 195 | response.sendRedirect("system-admin-console-access.jsp?success=true"); |
187 | 196 | return; |
188 | 197 | } |
|
200 | 209 | } |
201 | 210 |
|
202 | 211 | // Log the event |
203 | | - webManager.logEvent("Updated Admin Console access configuration (Content-Security-Policy).", "Content-Security-Policy enabled: " + isCSPEnabled + "\nHeader Value: " + cspValue); |
| 212 | + webManager.logEvent("Updated Admin Console access configuration (Content-Security-Policy).", "Content-Security-Policy enabled: " + isCSPEnabled + "\nHeader Value: " + AdminConsolePlugin.ADMIN_CONSOLE_CONTENT_SECURITY_POLICY_RESPONSEVALUE.getValue()); |
204 | 213 | response.sendRedirect("system-admin-console-access.jsp?success=true"); |
205 | 214 | return; |
206 | 215 | } |
|
0 commit comments