beskar 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +177 -19
- data/README.md +142 -122
- data/app/channels/concerns/beskar/channels/session_security.rb +46 -0
- data/app/controllers/beskar/administrative_actions_controller.rb +16 -0
- data/app/controllers/beskar/application_controller.rb +69 -25
- data/app/controllers/beskar/banned_ips_controller.rb +116 -141
- data/app/controllers/beskar/dashboard_controller.rb +20 -28
- data/app/controllers/beskar/security_events_controller.rb +37 -55
- data/app/controllers/concerns/beskar/controllers/audit_export.rb +54 -0
- data/app/controllers/concerns/beskar/controllers/security_tracking.rb +76 -48
- data/app/controllers/concerns/beskar/controllers/session_security.rb +29 -0
- data/app/jobs/beskar/notification_job.rb +33 -0
- data/app/mailers/beskar/security_mailer.rb +59 -0
- data/app/models/beskar/administrative_action.rb +41 -0
- data/app/models/beskar/banned_ip.rb +91 -132
- data/app/models/beskar/security_event.rb +37 -4
- data/app/models/beskar/security_state.rb +58 -0
- data/app/services/beskar/banned_ip_manager.rb +16 -6
- data/app/views/beskar/administrative_actions/index.html.erb +33 -0
- data/app/views/beskar/administrative_actions/show.html.erb +21 -0
- data/app/views/beskar/banned_ips/edit.html.erb +25 -89
- data/app/views/beskar/banned_ips/index.html.erb +20 -62
- data/app/views/beskar/banned_ips/new.html.erb +18 -138
- data/app/views/beskar/banned_ips/review.html.erb +24 -0
- data/app/views/beskar/banned_ips/show.html.erb +18 -15
- data/app/views/beskar/dashboard/index.html.erb +6 -6
- data/app/views/beskar/security_events/index.html.erb +18 -16
- data/app/views/beskar/security_events/show.html.erb +10 -20
- data/app/views/beskar/shared/_export_form.html.erb +10 -0
- data/app/views/beskar/shared/_waf_analysis.html.erb +25 -0
- data/app/views/layouts/beskar/_behavior.html.erb +121 -0
- data/app/views/layouts/beskar/application.html.erb +9 -76
- data/config/routes.rb +10 -21
- data/db/migrate/20251016000001_create_beskar_security_events.rb +3 -3
- data/db/migrate/20260910000001_create_beskar_security_states.rb +14 -0
- data/db/migrate/20260911000001_create_beskar_administrative_actions.rb +22 -0
- data/db/migrate/20260911000002_expand_administrative_action_targets.rb +6 -0
- data/docs/README.md +73 -0
- data/docs/archive/project-documentation.md +659 -0
- data/docs/audits/project-review.md +437 -0
- data/docs/audits/repair-status.md +216 -0
- data/docs/guides/audit-and-waf.md +188 -0
- data/docs/guides/audit-lifecycle.md +172 -0
- data/docs/guides/authentication.md +213 -0
- data/docs/guides/configuration.md +182 -0
- data/docs/guides/dashboard-and-search.md +251 -0
- data/docs/guides/notifications-and-recovery.md +157 -0
- data/docs/guides/risk-scoring.md +116 -0
- data/docs/operations/monitor-only-mode.md +85 -0
- data/docs/operations/security-hardening.md +167 -0
- data/docs/operations/state-storage.md +144 -0
- data/docs/research/rust-performance-assessment.md +69 -0
- data/lib/beskar/configuration.rb +84 -13
- data/lib/beskar/configuration_validator.rb +188 -0
- data/lib/beskar/devise_authentication.rb +24 -0
- data/lib/beskar/engine.rb +21 -88
- data/lib/beskar/logger.rb +30 -35
- data/lib/beskar/middleware/request_analyzer.rb +49 -82
- data/lib/beskar/models/security_trackable_authenticable.rb +72 -93
- data/lib/beskar/models/security_trackable_devise.rb +32 -23
- data/lib/beskar/models/security_trackable_generic.rb +169 -212
- data/lib/beskar/risk_level.rb +22 -0
- data/lib/beskar/services/account_locker.rb +85 -76
- data/lib/beskar/services/administrative_audit.rb +36 -0
- data/lib/beskar/services/administrative_bans.rb +104 -0
- data/lib/beskar/services/audit_data.rb +72 -0
- data/lib/beskar/services/authentication.rb +31 -0
- data/lib/beskar/services/authentication_attempt.rb +148 -0
- data/lib/beskar/services/ban_expiry.rb +28 -0
- data/lib/beskar/services/device_detector.rb +32 -41
- data/lib/beskar/services/event_search.rb +58 -0
- data/lib/beskar/services/geolocation_service.rb +83 -114
- data/lib/beskar/services/ip_whitelist.rb +31 -40
- data/lib/beskar/services/location_assessment.rb +109 -0
- data/lib/beskar/services/native_account_lock.rb +82 -0
- data/lib/beskar/services/notifications.rb +46 -0
- data/lib/beskar/services/rate_limiter.rb +103 -125
- data/lib/beskar/services/request_context.rb +69 -0
- data/lib/beskar/services/risk_assessment.rb +58 -0
- data/lib/beskar/services/session_revocation.rb +62 -0
- data/lib/beskar/services/waf.rb +166 -280
- data/lib/beskar/services/waf_request.rb +70 -0
- data/lib/beskar/version.rb +1 -1
- data/lib/beskar/warden_authentication.rb +53 -0
- data/lib/beskar.rb +53 -4
- data/lib/generators/beskar/install/install_generator.rb +36 -36
- data/lib/generators/beskar/install/templates/initializer.rb.tt +105 -20
- data/lib/tasks/beskar_tasks.rake +15 -19
- metadata +61 -8
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: beskar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maciej Litwiniuk
|
|
@@ -121,10 +121,12 @@ dependencies:
|
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0'
|
|
124
|
-
description:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
description: Beskar is a mountable Rails engine with database-coordinated authentication
|
|
125
|
+
admission limits, risk-based account locks, persistent IP bans, scanner-path signatures,
|
|
126
|
+
and an administrative security dashboard. It supports Devise and explicit Rails-native
|
|
127
|
+
authentication integration, optional MaxMind enrichment, User-Agent risk heuristics,
|
|
128
|
+
and monitor-only operation. It does not implement general SQL injection or XSS filtering,
|
|
129
|
+
JavaScript challenges, or honeypots.
|
|
128
130
|
email:
|
|
129
131
|
- maciej@litwiniuk.net
|
|
130
132
|
executables: []
|
|
@@ -136,32 +138,66 @@ files:
|
|
|
136
138
|
- README.md
|
|
137
139
|
- Rakefile
|
|
138
140
|
- app/assets/stylesheets/beskar/application.css
|
|
141
|
+
- app/channels/concerns/beskar/channels/session_security.rb
|
|
142
|
+
- app/controllers/beskar/administrative_actions_controller.rb
|
|
139
143
|
- app/controllers/beskar/application_controller.rb
|
|
140
144
|
- app/controllers/beskar/banned_ips_controller.rb
|
|
141
145
|
- app/controllers/beskar/dashboard_controller.rb
|
|
142
146
|
- app/controllers/beskar/security_events_controller.rb
|
|
147
|
+
- app/controllers/concerns/beskar/controllers/audit_export.rb
|
|
143
148
|
- app/controllers/concerns/beskar/controllers/security_tracking.rb
|
|
149
|
+
- app/controllers/concerns/beskar/controllers/session_security.rb
|
|
144
150
|
- app/helpers/beskar/application_helper.rb
|
|
145
151
|
- app/jobs/beskar/application_job.rb
|
|
152
|
+
- app/jobs/beskar/notification_job.rb
|
|
146
153
|
- app/mailers/beskar/application_mailer.rb
|
|
154
|
+
- app/mailers/beskar/security_mailer.rb
|
|
155
|
+
- app/models/beskar/administrative_action.rb
|
|
147
156
|
- app/models/beskar/application_record.rb
|
|
148
157
|
- app/models/beskar/banned_ip.rb
|
|
149
158
|
- app/models/beskar/security_event.rb
|
|
159
|
+
- app/models/beskar/security_state.rb
|
|
150
160
|
- app/services/beskar/banned_ip_manager.rb
|
|
161
|
+
- app/views/beskar/administrative_actions/index.html.erb
|
|
162
|
+
- app/views/beskar/administrative_actions/show.html.erb
|
|
151
163
|
- app/views/beskar/banned_ips/edit.html.erb
|
|
152
164
|
- app/views/beskar/banned_ips/index.html.erb
|
|
153
165
|
- app/views/beskar/banned_ips/new.html.erb
|
|
166
|
+
- app/views/beskar/banned_ips/review.html.erb
|
|
154
167
|
- app/views/beskar/banned_ips/show.html.erb
|
|
155
168
|
- app/views/beskar/dashboard/index.html.erb
|
|
156
169
|
- app/views/beskar/security_events/index.html.erb
|
|
157
170
|
- app/views/beskar/security_events/show.html.erb
|
|
171
|
+
- app/views/beskar/shared/_export_form.html.erb
|
|
172
|
+
- app/views/beskar/shared/_waf_analysis.html.erb
|
|
173
|
+
- app/views/layouts/beskar/_behavior.html.erb
|
|
158
174
|
- app/views/layouts/beskar/application.html.erb
|
|
159
175
|
- config/locales/en.yml
|
|
160
176
|
- config/routes.rb
|
|
161
177
|
- db/migrate/20251016000001_create_beskar_security_events.rb
|
|
162
178
|
- db/migrate/20251016000002_create_beskar_banned_ips.rb
|
|
179
|
+
- db/migrate/20260910000001_create_beskar_security_states.rb
|
|
180
|
+
- db/migrate/20260911000001_create_beskar_administrative_actions.rb
|
|
181
|
+
- db/migrate/20260911000002_expand_administrative_action_targets.rb
|
|
182
|
+
- docs/README.md
|
|
183
|
+
- docs/archive/project-documentation.md
|
|
184
|
+
- docs/audits/project-review.md
|
|
185
|
+
- docs/audits/repair-status.md
|
|
186
|
+
- docs/guides/audit-and-waf.md
|
|
187
|
+
- docs/guides/audit-lifecycle.md
|
|
188
|
+
- docs/guides/authentication.md
|
|
189
|
+
- docs/guides/configuration.md
|
|
190
|
+
- docs/guides/dashboard-and-search.md
|
|
191
|
+
- docs/guides/notifications-and-recovery.md
|
|
192
|
+
- docs/guides/risk-scoring.md
|
|
193
|
+
- docs/operations/monitor-only-mode.md
|
|
194
|
+
- docs/operations/security-hardening.md
|
|
195
|
+
- docs/operations/state-storage.md
|
|
196
|
+
- docs/research/rust-performance-assessment.md
|
|
163
197
|
- lib/beskar.rb
|
|
164
198
|
- lib/beskar/configuration.rb
|
|
199
|
+
- lib/beskar/configuration_validator.rb
|
|
200
|
+
- lib/beskar/devise_authentication.rb
|
|
165
201
|
- lib/beskar/engine.rb
|
|
166
202
|
- lib/beskar/logger.rb
|
|
167
203
|
- lib/beskar/middleware.rb
|
|
@@ -170,13 +206,29 @@ files:
|
|
|
170
206
|
- lib/beskar/models/security_trackable_authenticable.rb
|
|
171
207
|
- lib/beskar/models/security_trackable_devise.rb
|
|
172
208
|
- lib/beskar/models/security_trackable_generic.rb
|
|
209
|
+
- lib/beskar/risk_level.rb
|
|
173
210
|
- lib/beskar/services/account_locker.rb
|
|
211
|
+
- lib/beskar/services/administrative_audit.rb
|
|
212
|
+
- lib/beskar/services/administrative_bans.rb
|
|
213
|
+
- lib/beskar/services/audit_data.rb
|
|
214
|
+
- lib/beskar/services/authentication.rb
|
|
215
|
+
- lib/beskar/services/authentication_attempt.rb
|
|
216
|
+
- lib/beskar/services/ban_expiry.rb
|
|
174
217
|
- lib/beskar/services/device_detector.rb
|
|
218
|
+
- lib/beskar/services/event_search.rb
|
|
175
219
|
- lib/beskar/services/geolocation_service.rb
|
|
176
220
|
- lib/beskar/services/ip_whitelist.rb
|
|
221
|
+
- lib/beskar/services/location_assessment.rb
|
|
222
|
+
- lib/beskar/services/native_account_lock.rb
|
|
223
|
+
- lib/beskar/services/notifications.rb
|
|
177
224
|
- lib/beskar/services/rate_limiter.rb
|
|
225
|
+
- lib/beskar/services/request_context.rb
|
|
226
|
+
- lib/beskar/services/risk_assessment.rb
|
|
227
|
+
- lib/beskar/services/session_revocation.rb
|
|
178
228
|
- lib/beskar/services/waf.rb
|
|
229
|
+
- lib/beskar/services/waf_request.rb
|
|
179
230
|
- lib/beskar/version.rb
|
|
231
|
+
- lib/beskar/warden_authentication.rb
|
|
180
232
|
- lib/generators/beskar/install/install_generator.rb
|
|
181
233
|
- lib/generators/beskar/install/templates/initializer.rb.tt
|
|
182
234
|
- lib/tasks/beskar_tasks.rake
|
|
@@ -186,6 +238,7 @@ licenses:
|
|
|
186
238
|
metadata:
|
|
187
239
|
homepage_uri: https://humadroid.io/beskar
|
|
188
240
|
source_code_uri: https://github.com/humadroid-io/beskar
|
|
241
|
+
documentation_uri: https://github.com/humadroid-io/beskar/blob/master/docs/README.md
|
|
189
242
|
changelog_uri: https://github.com/humadroid-io/beskar/blob/master/CHANGELOG.md
|
|
190
243
|
rdoc_options: []
|
|
191
244
|
require_paths:
|
|
@@ -201,8 +254,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
201
254
|
- !ruby/object:Gem::Version
|
|
202
255
|
version: '0'
|
|
203
256
|
requirements: []
|
|
204
|
-
rubygems_version:
|
|
257
|
+
rubygems_version: 4.0.20
|
|
205
258
|
specification_version: 4
|
|
206
|
-
summary:
|
|
207
|
-
|
|
259
|
+
summary: A Rails security engine for authentication limits, risk-based locks, IP bans,
|
|
260
|
+
and audit events.
|
|
208
261
|
test_files: []
|