From: Tom Hughes Date: Fri, 8 Jul 2022 16:13:02 +0000 (+0100) Subject: Log any use of basic authentication X-Git-Tag: live~1811 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0c524b240858303b40078608dd76a1b2b6023b47 Log any use of basic authentication --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 050c455cd..83a35e15f 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -109,6 +109,8 @@ class ApiController < ApplicationController else User.authenticate(:username => username, :password => passwd) # basic auth end + # log if we have authenticated using basic auth + logger.info "Authenticated as user #{current_user.id} using basic authentication" if current_user end # have we identified the user?