summaryrefslogtreecommitdiff
path: root/app/controllers/sessions_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ensure Warden triggers after_authentication callbackImre Farkas2019-07-261-0/+11
| | | | | | By not triggering the callback: - ActiveSession lookup keys are not cleaned - Devise also misses its hook related to session cleanup
* Rewrite `if:` argument in before_action and alike when `only:` is also usedGeorge Thomas2019-07-181-4/+3
| | | | | | Closes #55564 This is first discovered in #54739 (comment 122609857) that if both if: and only: are used in a before_action or after_action or alike, if: is completely ignored.
* Prevent password sign in restriction bypassJames Edwards-Jones2019-05-211-0/+9
|
* Remove "You are already signed in" bannerIllya Klymov2019-04-241-0/+12
|
* Externalize strings in flash messagesMartin Wortschack2019-04-081-2/+2
| | | | | - Externalize strings in controllers - Update PO file
* Rails5: env is deprecated and will be removed from Rails 5.1Jasper Maes2018-11-151-1/+1
|
* Enable frozen string in app/controllers/**/*.rbrepo-forks/gitlab-ce-frozen-string-app-controllergfyoung2018-09-181-0/+2
| | | | | | | | | | | | Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+2
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Merge branch 'feature/gb/login-activity-metrics' into 'master'Sean McGivern2018-07-311-4/+8
|\ | | | | | | | | | | | | Add user authentication activity metrics Closes #47789 See merge request gitlab-org/gitlab-ce!20668
| * Track blocked users and two factor authenticationsGrzegorz Bizon2018-07-231-4/+8
| |
* | Disable SAML if OmniAuth is disabled48932-disable-saml-if-omniauth-is-disabledLin Jen-Shin2018-07-201-0/+2
|/ | | | | We also try to unify the way we setup OmniAuth, and how we check if it's enabled or not.
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-2/+2
|
* Add Prometheus metrics to track reCAPTCHA success/failuresStan Hu2018-07-031-1/+19
|
* Show a reCAPTCHA on signin page if custom header is setStan Hu2018-06-211-1/+30
| | | | | This will only be displayed if `X-GitLab-Show-Login-Captcha` is set as an HTTP header.
* Reuses `InternalRedirect` when possibleBob Van Landuyt2018-05-041-7/+2
| | | | | | | | | | | | | | | | | | `InternalRedirect` prevents Open redirect issues by only allowing redirection to paths on the same host. It cleans up any unwanted strings from the path that could point to another host (fe. //about.gitlab.com/hello). While preserving the querystring and fragment of the uri. It is already used by: - `TermsController` - `ContinueParams` - `ImportsController` - `ForksController` - `SessionsController`: Only for verifying the host in CE. EE allows redirecting to a different instance using Geo.
* Moved o_auth/saml/ldap modules under gitlab/authHoratiu Eugen Vlad2018-02-281-1/+1
|
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+1
|
* Allow password authentication to be disabled entirelyMarkus Koller2017-11-231-1/+1
|
* Create idea of read-only databasetc-geo-read-only-ideaToon Claes2017-10-061-15/+22
| | | | | | | | | | | | In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE. Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls. Closes gitlab-org/gitlab-ce#37534.
* Minor backport from EEbackport_from_EEValery Sizov2017-10-051-3/+1
|
* Merge branch 'enhance-logging' into 'master'Robert Speicher2017-10-021-2/+16
|\ | | | | | | | | Improved file logging for authentication events See merge request gitlab-org/gitlab-ce!9196
| * Remove lock reason and add guard clauseBrian Neel2017-09-291-1/+3
| |
| * Standardize capitalization and statusBrian Neel2017-09-271-2/+2
| |
| * # This is a combination of 1 commit.Brian Neel2017-09-271-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # This is the 1st commit message: Add logging for all web authentication events # This is the commit message #2: Re-add underscore to after_inactive_sign_up_path_for # This is the commit message #3: Standardize on username= # This is the commit message #4: after_filter -> after_action, _resource -> resource # This is the commit message #5: Add two-factor login failures and account lockouts # This is the commit message #6: Move logging from two-factor concern to user model # This is the commit message #7: Add spaces around default parameter assignments # This is the commit message #8: Move logs out of user model # This is the commit message #9: Replace filtered_params with user_params # This is the commit message #10: Standardize case # This is the commit message #1: Fixes for username and AppLogger.info
* | refactor users update serviceJames Lopez2017-09-281-1/+1
| |
* | refactor services to match EE signatureJames Lopez2017-09-281-1/+1
|/
* Define ldap methods at runtimeBob Van Landuyt2017-08-241-8/+0
| | | | | This avoids loading the `OmniAuthCallbacksController` at boot time so it doesn't mess up the `before_action`-chain
* Backport some recent changes related to LDAP from EEbackport-2844-ldap-ee-license-checksRubén Dávila2017-07-271-6/+1
|
* Explicitly add `protect_from_forgery` actionBob Van Landuyt2017-07-241-0/+8
| | | | | Otherwise the token might be cleared before authentication is done, causing the authentication itself to fail
* Merge branch 'bjk/metric_names' into 'master'Douwe Maan2017-07-141-1/+1
|\ | | | | | | | | | | | | Update metric names to match Prometheus guidelines. Closes #35031 See merge request !12812
| * Update sessions metric name.Ben Kochie2017-07-121-1/+1
| |
* | Fixes needed when GitLab sign-in is not enabledRobin Bobbitt2017-07-131-1/+1
|/ | | | | | | | | When sign-in is disabled: - skip password expiration checks - prevent password reset requests - don’t show Password tab in User Settings - don’t allow login with username/password for Git over HTTP requests - render 404 on requests to Profiles::PasswordsController
* refactor update user service not to do auth checksJames Lopez2017-06-231-1/+1
|
* more refactoring based on feedbackJames Lopez2017-06-231-3/+4
|
* added service in the rest of controllers and classesJames Lopez2017-06-231-1/+1
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-2/+2
|
* Merge branch 'instrument-infra' into 'master'Grzegorz Bizon2017-06-071-0/+5
|\ | | | | | | | | Add Prometheus metrics endpoint and basic infrastructure to meter code See merge request !11553
| * Move Prometheus presentation logic to PrometheusTextPawel Chojnacki2017-06-021-1/+1
| | | | | | | | | | | | | | | | + Use NullMetrics to mock metrics when unused + Use method_missing in NullMetrics mocking + Update prometheus gem to version that correctly uses transitive dependencies + Ensure correct folders are used in Multiprocess prometheus client tests. + rename Sessions controller's metric
| * Make login_counter instance variable instead of class one.Pawel Chojnacki2017-06-021-2/+2
| | | | | | | | | | + remove unecessarey require + fix small formatiing issues
| * Add trailing newline to response.Kevin Lyda2017-06-021-1/+5
| | | | | | | | | | | | Prometheus requires a trailing newline in its response. + cleanup
| * Initial pass at prometheus monitoring.Kevin Lyda2017-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step for #29118. Add a single metric to count successful logins. Summary types are not supported so remove Collector. Either we need to support the summary type or we need to create a multiprocess-friendly Collector. Add config to load prometheus and set up the Collector and the Exporter. Fix `Gemfile` as current prometheus-client gemspec is missing the `mmap2` dependency.
* | Allow manual bypass of auto_sign_in_with_providermabes/gitlab-ce-bypass-auto-loginMaxime Besson2017-06-021-1/+5
|/ | | | | | | | | This commit lets a user bypass the automatic signin on the login form, in order to login with a technical (admin, etc) account Closes #3786 Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add user activity service and spec. Also added relevant - NOT offline - ↵James Lopez2017-04-141-0/+5
| | | | | | | migration It uses a user activity table instead of a column in users. Tested with mySQL and postgreSQL
* Rename check_2fa_requirement to check_two_factor_requirementMarkus Koller2017-04-061-1/+1
|
* Fix redirection after login when the referer have paramsmhasbini2017-04-021-1/+1
|
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-231-2/+2
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-231-2/+2
|
* Fix code for copsDouwe Maan2017-02-231-5/+6
|
* Enable Style/ConditionalAssignmentDouwe Maan2017-02-231-3/+3
|
* Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741Rydkin Maxim2016-12-161-1/+1
|