summaryrefslogtreecommitdiff
path: root/app/models/pages_domain.rb
Commit message (Collapse)AuthorAgeFilesLines
* Validate certificate chain only if it's changedVladimir Shushlin2019-07-221-1/+1
| | | | | This validation prevents the domain from being saved from the UI e.g. when user tries to enable Let's Encrypt integration
* Fix saving domain without certificate for auto_sslfix-only-https-pages-domainsVladimir Shushlin2019-07-121-2/+8
|
* Renew Let's Encrypt certificatesVladimir Shushlin2019-06-241-0/+10
| | | | | | | | Add index for pages domain ssl auto renewal Add PagesDomain.needs_ssl_renewal scope Add cron worker for ssl renewal Add worker for ssl renewal Add pages ssl renewal worker queues settings
* Don't show private keys for letsencrypt certsVladimir Shushlin2019-06-211-0/+30
| | | | | | | | | | | | | | | | | | | | Adds enum certificate_source to pages_domains table with default manually_uploaded Mark certificates as 'gitlab_provided' if the were obtained through Let's Encrypt Mark certificates as 'user_provided' if they were uploaded through controller or api Only show private key in domain edit form if it is 'user_provided' Only show LetsEncrypt option if is enabled by application settings (and feature flag) Refactor and fix some specs to match new logic Don't show Let's Encrypt certificates as well
* Add certificate valid time to pages domain tableVladimir Shushlin2019-06-061-1/+9
| | | | | Save certificate validity time for pages domains on save Fill validity time for existing pages domains in background migration
* Add pages domains acme ordersVladimir Shushlin2019-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Extract acme double to helper Create ACME challanges for pages domains * Create order & challange through API * save them to database * request challenge validation We're saving order and challenge as one entity, that wouldn't be correct if we would order certificates for several domains simultaneously, but we always order certificate per domain Add controller for processing acme challenges redirected from pages Don't save acme challenge url - we don't use it Validate acme challenge attributes Encrypt private_key in acme orders
* Revert "Merge branch 'pages-domain_ssl-valid-period' into 'master'"revert-a05f86ceNick Thomas2019-06-061-9/+1
| | | This reverts merge request !28743
* Add certificate valid time to pages domain tableVladimir Shushlin2019-06-061-1/+9
| | | | | Save certificate validity time for pages domains on save Fill validity time for existing pages domains in background migration
* Merge branch '9932-fix-deprecated-attribute_changed-ce' into 'master'Andreas Brandl2019-05-021-2/+2
|\ | | | | | | | | [CE] Remove deprecated usage of `attribute_changed?` See merge request gitlab-org/gitlab-ce!27577
| * Remove deprecated uses of attribute_changed?9932-fix-deprecated-attribute_changed-ceHeinrich Lee Yu2019-04-301-2/+2
| | | | | | | | Prepares us for upgrade to Rails 5.2
* | Remove disabled pages domainsVladimir Shushlin2019-04-301-0/+2
|/ | | | | Domain will be removed by verification worker after 1 week of being disabled
* Upgrade Rails to 5.1.6.1Jasper Maes2019-04-231-6/+6
| | | | Model.new.attributes now also returns encrypted attributes.
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* 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.
* Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | Partially addresses #47424.
* Upgrade to Ruby 2.4.4sh-bump-ruby-2.4Stan Hu2018-05-291-1/+1
| | | | | | | | | | | | Fixes that make this work: * A change in Ruby (https://github.com/ruby/ruby/commit/ce635262f53b760284d56bb1027baebaaec175d1) requires passing in the exact required length for OpenSSL keys and IVs. * Ensure the secrets.yml is generated before any prepended modules are loaded. This is done by renaming the `secret_token.rb` initializer to `01_secret_token.rb`, which is a bit ugly but involves the least impact on other files.
* Add HTTPS-only pagesRob Watson2018-03-221-2/+8
| | | | Closes #28857
* Add DNS verification to Pages custom domainsNick Thomas2018-02-231-1/+64
|
* Generate HTTP URLs for custom Pages domains when appropriateNick Thomas2018-01-081-1/+1
|
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+5
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* Add administrative endpoint to list all pages domainsTravis Miller2017-11-131-0/+4
|
* Rename conflicting private method in PagesDomain modelTravis Miller2017-10-221-4/+4
|
* Allow numeric pages domainDrew Blessing2017-06-061-2/+2
| | | | | | Previously, `PagesDomain` would not allow a domain such as 123.example.com. With this change, this is now allowed, because it is a perfectly valid domain.
* Enable Rails/ValidationDouwe Maan2017-02-231-1/+1
|
* fix attr_encrypted in EEJames Lopez2017-02-011-0/+1
|
* Adds algorithm to the pages domain key and remote mirror credentials ↵Connor Shea2017-01-311-1/+4
| | | | | | | | encrypted attributes for forward compatibility with attr_encrypted 3.0.0. aes-256-cbc is the default algorithm for attr_encrypted 1.x, but the default is changed in 3.0 and thus must be declared explicitly. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4216/ for more information. This will prevent OpenSSL errors once the code from that MR is merged into EE.
* Updated according to commentsKamil Trzcinski2017-01-311-2/+2
|
* Fix rubocop complainsKamil Trzcinski2017-01-311-2/+2
|
* Pages domain model specsKamil Trzcinski2017-01-311-20/+30
|
* Fix viewsKamil Trzcinski2017-01-311-2/+2
|
* Implement extra domains and save pages configurationKamil Trzcinski2017-01-311-4/+80
|
* Added PagesDomainKamil Trzcinski2017-01-311-0/+29