Commit Graph

66 Commits

Author SHA1 Message Date
Douwe Maan 95ced3bb5f Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6'
Server Side Request Forgery in Services and Web Hooks

See merge request gitlab/gitlabhq!2337
2018-03-21 14:39:21 +00:00
Horatiu Eugen Vlad 1ad5df49b1 Moved o_auth/saml/ldap modules under gitlab/auth 2018-02-28 16:53:02 +01:00
Nick Thomas ee68bd9771
Add DNS verification to Pages custom domains 2018-02-23 12:22:29 +00:00
Matija Čupić 40753029e4
Merge branch 'master' into 38175-add-domain-field-to-auto-devops-application-setting 2018-02-02 21:56:22 +01:00
Matija Čupić cc209519c8
Merge branch 'master' into 38175-add-domain-field-to-auto-devops-application-setting 2018-02-02 19:59:15 +01:00
Mario de la Ossa eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
Nick Thomas 27863b10d1
Refactor repository_storages_options_for_select 2018-01-31 17:55:44 +00:00
Matija Čupić 5706029503
Expose auto_devops_domain in admin settings view 2018-01-22 19:31:03 +01:00
Mark Fletcher 6dcba97c83 Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController 2018-01-19 12:04:45 +00:00
Michael Kozono 255a0f85e3 Backport option to disable writing to `authorized_keys` file
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
2018-01-08 20:34:19 +00:00
Bob Van Landuyt f1ae1e39ce Move the circuitbreaker check out in a separate process
Moving the check out of the general requests, makes sure we don't have
any slowdown in the regular requests.

To keep the process performing this checks small, the check is still
performed inside a unicorn. But that is called from a process running
on the same server.

Because the checks are now done outside normal request, we can have a
simpler failure strategy:

The check is now performed in the background every
`circuitbreaker_check_interval`. Failures are logged in redis. The
failures are reset when the check succeeds. Per check we will try
`circuitbreaker_access_retries` times within
`circuitbreaker_storage_timeout` seconds.

When the number of failures exceeds
`circuitbreaker_failure_count_threshold`, we will block access to the
storage.

After `failure_reset_time` of no checks, we will clear the stored
failures. This could happen when the process that performs the checks
is not running.
2017-12-08 09:11:39 +01:00
Tim Zallmann f2cd91dd72 Merge branch '39455-clone-dropdown-should-not-have-a-tooltip' into 'master'
Resolve "Clone dropdown should not have a tooltip"

Closes #39455

See merge request gitlab-org/gitlab-ce!15334
2017-11-30 08:56:32 +00:00
Andrew Newdigate 64e5f996fa Add timeouts for Gitaly calls 2017-11-29 09:12:12 +00:00
Jose Ivan Vargas 2e2f0675c9 UX adjustments and spec corrections 2017-11-27 09:19:39 -06:00
Markus Koller 257fd57134 Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
Michael Kozono dc9266fbea Add request throttles 2017-11-17 09:58:18 +01:00
Bob Van Landuyt 1881d4f8ec Allow configuring new circuitbreaker settings from the UI and API 2017-10-23 12:02:23 +03:00
Bob Van Landuyt 38af7c1613 Allow configuring the circuitbreaker through the API and UI 2017-10-17 11:50:32 +02:00
Zeger-Jan van de Weg a315e6025c
Merge branch 'master' into zj-auto-devops-table 2017-09-04 09:28:46 +02:00
Robert Speicher 223849fa17 Merge branch '17849-allow-admin-to-restrict-min-key-length-and-techno' into 'master'
Add settings for minimum key strength and allowed key type

Closes #17849

See merge request !13712
2017-09-01 19:23:08 +00:00
Zeger-Jan van de Weg 6ed490401f
Implement the implied CI/CD config for AutoDevOps
Behind an application setting, which defaults to false, this commit
implements the implied CI/CD config. Which means that in the case we
can't find the `.gitlab-ci.yml` on the commit we want to start a
pipeline for, we fall back to an implied configuration.

For now the Bash template has been copied to
`Auto-Devops.gitlab-ci.yml` so the tests actually work.

Fixes #34777
2017-08-31 22:25:25 +02:00
Sean McGivern 5883ce95ef `current_application_settings` belongs on `Gitlab::CurrentSettings`
The initializers including this were doing so at the top level, so every object
loaded after them had a `current_application_settings` method. However, if
someone had rack-attack enabled (which was loaded before these initializers), it
would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't
have that method.

To fix this:

1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need
   `Object.new.current_application_settings` to work.
2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it
   like that in several places.
3. Change the initializers to use that new form.
2017-08-31 13:38:33 +01:00
Nick Thomas 6847060266 Rework the permissions model for SSH key restrictions
`allowed_key_types` is removed and the `minimum_<type>_bits` fields are
renamed to `<tech>_key_restriction`. A special sentinel value (`-1`) signifies
that the key type is disabled.

This also feeds through to the UI - checkboxes per key type are out, inline
selection of "forbidden" and "allowed" (i.e., no restrictions) are in.

As with the previous model, unknown key types are disallowed, even if the
underlying ssh daemon happens to support them. The defaults have also been
changed from the lowest known bit size to "no restriction". So if someone
does happen to have a 768-bit RSA key, it will continue to work on upgrade, at
least until the administrator restricts them.
2017-08-30 20:50:44 +01:00
Nick Thomas b0f982fbdf Add settings for minimum key strength and allowed key type
This is an amalgamation of:

* Cory Hinshaw: Initial implementation !5552
* Rémy Coutable: Updates !9350
* Nick Thomas: Resolve conflicts and add ED25519 support !13712
2017-08-30 20:50:44 +01:00
Gabriel Mazetto 72250a4ed8 Enable automatic hashed storage for new projects by application settings 2017-08-22 06:33:20 +02:00
Robin Bobbitt 649d042dbc Add option to disable project export on instance 2017-08-11 12:22:37 -04:00
Bob Van Landuyt ea1012ccb4 Make the attribute list for application settings reusable 2017-07-27 11:49:27 +02:00
Sean McGivern 1afdbe320e Merge branch 'fixes-for-internal-auth-disabled' into 'master'
Fixes needed when GitLab sign-in is not enabled

See merge request !12491
2017-07-14 08:49:36 +00:00
Robin Bobbitt 672a68d372 Fixes needed when GitLab sign-in is not enabled
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
2017-07-13 10:08:27 -04:00
Ruben Davila a90ca93c1f Fix wrong helper used for adding context for translations.
Additionally some missing translations were added
2017-07-12 12:38:02 -05:00
Tiago Botelho 197a5df42a Allow admin to disable all restricted visibility levels 2017-07-05 19:20:52 +01:00
Alejandro Rodríguez 0b9d56f960 Update storage settings to allow extra values per shard
This will be necessary when adding gitaly settings. This version
doesn't make any functional changes, but allows us to include this
breaking change in 9.0 and add the needed extra settings in the future
with backwards compatibility
2017-03-03 12:13:30 -03:00
Douwe Maan 75f5fa997d Enable Rails/Delegate 2017-02-23 09:32:42 -06:00
Fatih Acet f7fb61b4f9 Merge branch '24161-non-intuitive-buttons-for-import-sources-in-administrator-settings-enable-disable' into 'master'
Import sources buttons to checkboxes

## What does this MR do?

Swaps the `/application_settings` `Import Sources` buttons to checkboxes.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

![2016-11-19_14.42.39](/uploads/5bf53ecb54765bd80ab275714208ee9a/2016-11-19_14.42.39.gif)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #24161

See merge request !7598
2016-11-22 21:03:42 +00:00
Luke "Jared" Bennett de21cfd141
Swapped buttons for checkboxes 2016-11-21 23:11:14 +00:00
Luke "Jared" Bennett cf94db702e
Removed button styling from restricted visibility levels and added checkboxes with icons
Review changes
2016-11-21 19:14:18 +00:00
Patricio Cano b95216aaba Allow the Sidekiq queues to throttle and the factor by which to throttle them to be configurable 2016-11-10 11:38:11 -06:00
Nick Thomas c1388d0efb Allow multiple repository storage shards to be enabled, and automatically round-robin between them 2016-11-04 04:01:08 +00:00
Nick Thomas 9920551536 Enable CacheMarkdownField for the remaining models
This commit alters views for the following models to use the markdown cache if
present:

* AbuseReport
* Appearance
* ApplicationSetting
* BroadcastMessage
* Group
* Issue
* Label
* MergeRequest
* Milestone
* Project

At the same time, calls to `escape_once` have been moved into the `single_line`
Banzai pipeline, so they can't be missed out by accident and the work is done
at save, rather than render, time.
2016-10-07 02:54:26 +01:00
Gokmen Goksel a927a9bf6b Support integration with Koding (online IDE)
Koding: #index: landing page for Koding integration

If enabled it will provide a link to open remote Koding instance url
for now we are also providing the sneak preview video for how
integration works in detail.

Repository: check whether .koding.yml file exists on repository

Projects: landing page: show Run in IDE (Koding) button if repo has stack file

Projects: MR: show Run in IDE Koding button if repo has stack file on active branch

ProjectHelpers: add_koding_stack: stack generator for provided project

With this helper we will auto-generate the required stack template
for a given project. For the feature we can request this base template
from the running Koding instance on integration.

Currently this will provide users to create a t2.nano instance on aws
and it'll automatically configures the instance for basic requirements.

Projects: empty state and landing page provide shortcuts to create stack

projects_helper: use branch on checkout and provide an entry point

This ${var.koding_queryString_branch} will be replaced with the branch
provided in query string which will allow us to use same stack template
for different branches of the same repository.

ref: b8c0e43c4c

projects_helper: provide sha info in query string to use existing vms

With this change we'll be able to query existing vms on Koding side
based on the commit id that they've created.

ref: 1d630fadf3

Integration: Docs: Koding documentation added

Disable /koding route if integration is disabled

Use application settings to enable Koding

Projects_helper: better indentation with strip_heredoc usage

Projects_helper: return koding_url as is if there is no project provided

current_settings: set koding_enabled: false by default

Koding_Controller: to render not_found once integration is disabled

Dashboard_specs: update spec for Koding enabled case

Projects_Helper: make repo dynamic

ref: 4d615242f4

Updated documentation to have right format
2016-08-19 12:10:58 -07:00
Patricio Cano 0bdf6fe4ba Use keyword arguments for boolean values and use `span` instead of `a` for clone "button" 2016-07-05 16:54:22 -05:00
Patricio Cano 29c50c5315 Default Git access protocol to `web` 2016-07-05 16:54:22 -05:00
Patricio Cano fbaabb3911 Rename `enabled_git_access_protocols` to singular. 2016-07-05 16:54:22 -05:00
Patricio Cano 7735ef86f0 Only allow Git Access on the allowed protocol 2016-07-05 16:54:22 -05:00
Patricio Cano ea9d910c8b Refactor clone button sanitation to its own method to avoid duplication. 2016-07-05 16:54:22 -05:00
Patricio Cano 512adc21fe Add setting that allows admins to choose which Git access protocols are enabled 2016-07-05 16:54:22 -05:00
Alejandro Rodríguez 4a8a69837a Add Application Setting to configure default Repository Path for new projects 2016-06-29 23:35:00 -04:00
Sean McGivern 40b6d9064a Allow custom text on 'almost there' page
Add a new application setting, after_sign_up_text. This is text to be
rendered as Markdown and shown on the 'almost there' page after a user
signs up, but before they've confirmed their account.

Tweak the styles for that page so that centered lists look reasonable.
2016-06-08 19:08:53 +01:00
Andrei Gliga 260c88a758 no need to define the help block since there's no help block 2016-05-12 13:44:46 +03:00
Andrei Gliga 6cdce04937 Revert "Revert "no need to show the help about Github or the other authentication sources""
This reverts commit 075ace5686c63d40f7e9fa02bf37e1bd3168f7e7.
2016-05-12 13:44:46 +03:00