Add pages domains acme orders
What does this MR do?
WIP
Adds service for obtaining Let's Encrypt certificates for pages domains
If you aren't familiar with the process, I think easiest way to understand it would be just reading this gem README: https://github.com/unixcharles/acme-client
Based on PoC: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26359/
What's already done:
- redirecting from pages daemon: gitlab-pages!141 (merged)
- generating private key for GitLab instance: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27581
- frontend for enabling Let's Encrypt certificate: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26438
- admin settings: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27361
- initialising Let's Encrypt client and account creation: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27624
In scope of this MR:
- check if there is ACME order already, if so, check it's state and go to particular step
- generate private key
- create Let's Encrypt ACME order
- save acme challenge's token and file content into database (there is 1-to-N relation between ACME order and challenges, since one order can contain multiple authorization for different domains, and each of them can contain multiple challenges, but we ignore it here and use 1-to-1, since we create new order for each individual domain, and use only http challenge)
- initiate challenge process
- serve acme challenges on special controller(here pages daemon will be redirecting after merging gitlab-pages!141 (merged) )
- check status of ACME order, and when it's ready, obtain certificate
What's out of scope of this MR:
- starting certificate obtaining process (currently works only from rails console or specs)
- renewal of certificates
- displaying status/progress
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Vladimir Shushlin