Принимая во внимание, что authenticate_or_request_with_http_basic принимает блок, позволяющий вам вставить некоторый код, чтобы определить, должны ли они быть аутентифицированы (документация). Например
before_filter :authenticate
def authenticate
authenticate_or_request_with_http_basic('Administration') do |username, password|
ActiveSupport::SecurityUtils.secure_compare(username, "admin") &&
ActiveSupport::SecurityUtils.secure_compare(password, "password")
end
end