1. 12 Jan, 2018 1 commit
  2. 11 Jan, 2018 4 commits
  3. 10 Jan, 2018 6 commits
  4. 09 Jan, 2018 7 commits
  5. 08 Jan, 2018 7 commits
    • Douglas Barbosa Alexandre's avatar
      7f80710c77c4
    • Sean McGivern's avatar
      24d5f5cc1822
    • Michael Kozono's avatar
      Backport authorized_keys_enabled defaults to true' · fd4b5e3d29b5
      Michael Kozono authored
      Originally from branch 'fix-authorized-keys-enabled-default-2738' via merge request https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2240
      
      Removed background migrations which were intended to fix state after using Gitlab
      without a default having been set
      
      Squashed commits:
      Locally, if Spring was not restarted, `current_application_settings` was still cached, which prevented the migration from editing the file. This will also ensure that any app server somehow hitting old cache data will properly default this setting regardless.
      Retroactively fix migration
        This allows us to identify customers who ran the broken migration. Their `authorized_keys_enabled` column does not have a default at this point.
        We will fix the column after we fix the `authorized_keys` file.
      Fix authorized_keys file if needed
      Add default to authorized_keys_enabled setting
        Reminder: The original migration was fixed retroactively a few commits ago, so people who did not ever run GitLab 9.3.0 already have a column that defaults to true and disallows nulls. I have tested on PostgreSQL and MySQL that it is safe to run this migration regardless.
        Affected customers who did run 9.3.0 are the ones who need this migration to fix the authorized_keys_enabled column.
        The reason for the retroactive fix plus this migration is that it allows us to run a migration in between to fix the authorized_keys file only for those who ran 9.3.0.
      Tweaks to address feedback
      Extract work into background migration
      Move batch-add-logic to background migration
        Do the work synchronously to avoid multiple workers attempting to add batches of keys at the same time.
        Also, make the delete portion wait until after adding is done.
      Do read and delete work in background migration
      Fix Rubocop offenses
      Add changelog entry
      Inform the user of actions taken or not taken
      Prevent unnecessary `select`s and `remove_key`s
      Add logs for action taken
      Fix optimization
      Reuse `Gitlab::ShellAdapter`
      Guarantee the earliest key
      Fix migration spec for MySQL
      fd4b5e3d29b5
    • Michael Kozono's avatar
      Backport option to disable writing to `authorized_keys` file · aa813711a3bd
      Michael Kozono authored
      Originally branch 'mk-toggle-writing-to-auth-keys-1631'
      
      See merge request !2004
      
      Squashed commits:
      Add authorized_keys_enabled to Application Settings
      Ensure default settings are exposed in UI
      Without this change, `authorized_keys_enabled` is unchecked when it is nil, even if it should be checked by default.
      Add “Speed up SSH operations” documentation
      Clarify the reasons for disabling writes
      Add "How to go back" section
      Tweak copy
      Update Application Setting screenshot
      aa813711a3bd
    • Pablo Carranza's avatar
      Backport authorized_keys branch 'find-key-by-fingerprint' · da2324725872
      Pablo Carranza authored
      Add find key by base64 key or fingerprint to the internal API
      
      See merge request !250
      
      Squashed changes:
      Add unique index to fingerprint
      Add new index to schema
      Add internal api to get ssh key by fingerprint
      Change API endpoint to authorized_keys
      Add InsecureKeyFingerprint that calculates the fingerprint without shelling out
      Add require for gitlab key fingerprint
      Remove uniqueness of fingerprint index
      Remove unique option from migration
      Fix spec style in fingerprint test
      Fix rubocop complain
      Extract insecure key fingerprint to separate file
      Change migration to support building index concurrently
      Remove those hideous tabs
      da2324725872
    • Yorick Peterse's avatar
      Remove soft removals related code · 0adb554804b1
      Yorick Peterse authored
      This removes all usage of soft removals except for the "pending delete"
      system implemented for projects. This in turn simplifies all the query
      plans of the models that used soft removals. Since we don't really use
      soft removals for anything useful there's no point in keeping it around.
      
      This _does_ mean that hard removals of issues (which only admins can do
      if I'm not mistaken) can influence the "iid" values, but that code is
      broken to begin with. More on this (and how to fix it) can be found in
      https://gitlab.com/gitlab-org/gitlab-ce/issues/31114.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
      0adb554804b1
    • Grzegorz Bizon's avatar
      Merge branch 'check-environment-regex' into 'master' · e63ddcdccfc8
      Grzegorz Bizon authored
      Fix environment scope regex
      
      See merge request gitlab-org/gitlab-ee!3641
      e63ddcdccfc8
  6. 07 Jan, 2018 1 commit
    • Stan Hu's avatar
      Fix error 500 when viewing commit and merge request diffs · da7b286833eb
      Stan Hu authored
      Due to the refactoring in !16082, `Blob#batch` no longer falls back
      to a default `blob_size_limit`. Since `Repository#batch_blobs` was using
      a default `nil` value, this would cause issues in the `Blob#find_by_rugged`
      method.
      
      This fix here is to be consistent and use a non-nil default value in
      `Repository#batch_blobs`.
      
      The problem was masked in development and tests because Gitaly is always
      enabled by default for all features.
      
      Closes #41735
      da7b286833eb
  7. 05 Jan, 2018 13 commits
  8. 04 Jan, 2018 1 commit
    • Drew Blessing's avatar
      Modify `LDAP::Person` to return username value based on attributes · c02cd8fcda32
      Drew Blessing authored
      `Gitlab::LDAP::Person` did not respect the LDAP attributes username
      configuration and would simply return the uid value. There are
      cases where users would like to specify a different username field
      to allow more friendly GitLab usernames. For example, it's common
      in AD to have sAMAccountName be an employee ID like `A12345` while
      the local part of the email address is more human-friendly.
      c02cd8fcda32