beskar 0.1.0 → 0.2.0
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 +150 -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 +9 -15
- data/app/views/beskar/dashboard/index.html.erb +4 -4
- data/app/views/beskar/security_events/index.html.erb +8 -15
- data/app/views/beskar/security_events/show.html.erb +6 -20
- data/app/views/beskar/shared/_export_form.html.erb +10 -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 +175 -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 +41 -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 +141 -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 +99 -125
- data/lib/beskar/services/request_context.rb +64 -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 +164 -280
- data/lib/beskar/services/waf_request.rb +60 -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 +104 -20
- data/lib/tasks/beskar_tasks.rake +15 -19
- metadata +60 -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.
|
|
4
|
+
version: 0.2.0
|
|
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,65 @@ 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/layouts/beskar/_behavior.html.erb
|
|
158
173
|
- app/views/layouts/beskar/application.html.erb
|
|
159
174
|
- config/locales/en.yml
|
|
160
175
|
- config/routes.rb
|
|
161
176
|
- db/migrate/20251016000001_create_beskar_security_events.rb
|
|
162
177
|
- db/migrate/20251016000002_create_beskar_banned_ips.rb
|
|
178
|
+
- db/migrate/20260910000001_create_beskar_security_states.rb
|
|
179
|
+
- db/migrate/20260911000001_create_beskar_administrative_actions.rb
|
|
180
|
+
- db/migrate/20260911000002_expand_administrative_action_targets.rb
|
|
181
|
+
- docs/README.md
|
|
182
|
+
- docs/archive/project-documentation.md
|
|
183
|
+
- docs/audits/project-review.md
|
|
184
|
+
- docs/audits/repair-status.md
|
|
185
|
+
- docs/guides/audit-and-waf.md
|
|
186
|
+
- docs/guides/audit-lifecycle.md
|
|
187
|
+
- docs/guides/authentication.md
|
|
188
|
+
- docs/guides/configuration.md
|
|
189
|
+
- docs/guides/dashboard-and-search.md
|
|
190
|
+
- docs/guides/notifications-and-recovery.md
|
|
191
|
+
- docs/guides/risk-scoring.md
|
|
192
|
+
- docs/operations/monitor-only-mode.md
|
|
193
|
+
- docs/operations/security-hardening.md
|
|
194
|
+
- docs/operations/state-storage.md
|
|
195
|
+
- docs/research/rust-performance-assessment.md
|
|
163
196
|
- lib/beskar.rb
|
|
164
197
|
- lib/beskar/configuration.rb
|
|
198
|
+
- lib/beskar/configuration_validator.rb
|
|
199
|
+
- lib/beskar/devise_authentication.rb
|
|
165
200
|
- lib/beskar/engine.rb
|
|
166
201
|
- lib/beskar/logger.rb
|
|
167
202
|
- lib/beskar/middleware.rb
|
|
@@ -170,13 +205,29 @@ files:
|
|
|
170
205
|
- lib/beskar/models/security_trackable_authenticable.rb
|
|
171
206
|
- lib/beskar/models/security_trackable_devise.rb
|
|
172
207
|
- lib/beskar/models/security_trackable_generic.rb
|
|
208
|
+
- lib/beskar/risk_level.rb
|
|
173
209
|
- lib/beskar/services/account_locker.rb
|
|
210
|
+
- lib/beskar/services/administrative_audit.rb
|
|
211
|
+
- lib/beskar/services/administrative_bans.rb
|
|
212
|
+
- lib/beskar/services/audit_data.rb
|
|
213
|
+
- lib/beskar/services/authentication.rb
|
|
214
|
+
- lib/beskar/services/authentication_attempt.rb
|
|
215
|
+
- lib/beskar/services/ban_expiry.rb
|
|
174
216
|
- lib/beskar/services/device_detector.rb
|
|
217
|
+
- lib/beskar/services/event_search.rb
|
|
175
218
|
- lib/beskar/services/geolocation_service.rb
|
|
176
219
|
- lib/beskar/services/ip_whitelist.rb
|
|
220
|
+
- lib/beskar/services/location_assessment.rb
|
|
221
|
+
- lib/beskar/services/native_account_lock.rb
|
|
222
|
+
- lib/beskar/services/notifications.rb
|
|
177
223
|
- lib/beskar/services/rate_limiter.rb
|
|
224
|
+
- lib/beskar/services/request_context.rb
|
|
225
|
+
- lib/beskar/services/risk_assessment.rb
|
|
226
|
+
- lib/beskar/services/session_revocation.rb
|
|
178
227
|
- lib/beskar/services/waf.rb
|
|
228
|
+
- lib/beskar/services/waf_request.rb
|
|
179
229
|
- lib/beskar/version.rb
|
|
230
|
+
- lib/beskar/warden_authentication.rb
|
|
180
231
|
- lib/generators/beskar/install/install_generator.rb
|
|
181
232
|
- lib/generators/beskar/install/templates/initializer.rb.tt
|
|
182
233
|
- lib/tasks/beskar_tasks.rake
|
|
@@ -186,6 +237,7 @@ licenses:
|
|
|
186
237
|
metadata:
|
|
187
238
|
homepage_uri: https://humadroid.io/beskar
|
|
188
239
|
source_code_uri: https://github.com/humadroid-io/beskar
|
|
240
|
+
documentation_uri: https://github.com/humadroid-io/beskar/blob/master/docs/README.md
|
|
189
241
|
changelog_uri: https://github.com/humadroid-io/beskar/blob/master/CHANGELOG.md
|
|
190
242
|
rdoc_options: []
|
|
191
243
|
require_paths:
|
|
@@ -201,8 +253,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
201
253
|
- !ruby/object:Gem::Version
|
|
202
254
|
version: '0'
|
|
203
255
|
requirements: []
|
|
204
|
-
rubygems_version:
|
|
256
|
+
rubygems_version: 4.0.20
|
|
205
257
|
specification_version: 4
|
|
206
|
-
summary:
|
|
207
|
-
|
|
258
|
+
summary: A Rails security engine for authentication limits, risk-based locks, IP bans,
|
|
259
|
+
and audit events.
|
|
208
260
|
test_files: []
|