Security hardening and OpenID Connect single sign-on

- SSO via OmniAuth OpenID Connect (Authentik, Keycloak, …): link by stable
  subject, by verified email, or from the profile; optional auto-create,
  admin-group sync, and turning password sign-in off
- Current password required to change email or password; password changes
  and resets sign out other sessions; idle sessions expire after 30 days;
  "sign out everywhere else"; session reset on sign-in
- Rate-limit password resets; scope squawk components to the aircraft
- Strict Content Security Policy with nonces (inline handlers removed),
  Permissions-Policy and COOP headers; file links expire after an hour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 08:38:25 -05:00
1 parent 2bfcb845ca
commit ac4da93aaf
27 files changed
+708 -47

No files matched your search

@@ -0,0 +1,6 @@
class AddSsoUidToUsers < ActiveRecord::Migration[8.1]
def change
add_column :users, :sso_uid, :string
add_index :users, :sso_uid, unique: true
end
end
Generated
+3 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_11_06_180800) do
ActiveRecord::Schema[8.1].define(version: 2026_11_07_150000) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -535,7 +535,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_06_180800) do
t.datetime "updated_at", null: false
t.string "name"
t.boolean "admin", default: false, null: false
t.string "sso_uid"
t.index ["email_address"], name: "index_users_on_email_address", unique: true
t.index ["sso_uid"], name: "index_users_on_sso_uid", unique: true
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"