Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-22Avoid chdir inside RootDir if disk is not enabledfeistel
2022-05-20Propagate errors for better handlingfeistel
2022-04-27Use labkit for fips checkVishal Tak
Changelog: changed
2022-03-28Add FIPS supportVishal Tak
Changelog: added
2022-02-01refactor: stop passing file descriptors around and use net.Listenfeistel
Changelog: changed
2021-11-22lint: remove outdated nolint directivesfeistel
2021-10-08Merge branch 'remove/root' into 'master'Jaime Martinez
Remove gitlab-pages daemon Closes #114 and #133 See merge request gitlab-org/gitlab-pages!542
2021-10-07docs: remove obsolete paragraph from readme and any reference to the Daemon ↵feistel
from documentation
2021-10-07refactor: stop running gitlab-pages as rootfeistel
We have now disabled chroot by default since %14.1, and recently removed support for disk-based configuration coming in %14.3. And we've also removed the chroot completely from Pages. Since nginx can do TCP proxying and there's no need to use privileged ports, Pages has been confirmed to run as non-root in k8s environment without any issues. This MR removes support for the gitlab-pages daemon completely. Changelog: removed
2021-09-02fix: switch to a warning to avoid breaking productionfeistel
2021-09-02fix: handle errortracking init errorfeistel
2021-08-10fix: do not fail to print --versiondo-not-fail-for-versionJaime Martinez
when there are missing parameters such as `--listen-http` by splitting configuration loading and validation. Related to omnibus-gitlab#6321. Changelog: other
2021-07-12Disable chroot and add daemon-enable-jail flagJaime Martinez
- Disable chroot mechanism by default. - Adds the daemon-enable-jail flag which will allow users to enable the legacy chroot mechanism if anything goes wrong. This flag won't be available via Omnibus, instead users will need to define the environment variable and pass to Pages. - Simplify chroot logic from http_fs - Update jail documentation - Enable chroot when domain-config-source=disk Changelog: changed
2021-07-08Update test mocksJaime Martinez
2021-07-07Improve logging and correlation IDJaime Martinez
2021-04-28Handle and return errors in internal/config/feistel
2021-03-01Use actual structs in Config struct instead of pointers to themBalasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-03-01Move configuration parsing to Config packageBalasankar "Balu" C
Changelog: changed Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-02-24fix: use correlationID middlewareErcan Ucan
As discussed within https://gitlab.com/gitlab-org/gitlab-pages/-/issues/510 this MR adds the usage of labkit's correlationID middleware. It uses a similar approach to the implemantion in gitlab-workhorse. Fixes https://gitlab.com/gitlab-org/gitlab-pages/-/issues/510 :tools: with :heart: at Siemens Changelog: fixed
2021-02-15fix(auth): make authentication scope for Pages configurableErcan Ucan
This MR makes required authentication permission scope for Pages configurable. By default, Pages will use `api` scope to authenticate with Pages Application registered on GitLab. With this MR, the scope is configurable and can be set to `read_api` by providing the `auth-scope` variable in the arguments or in the `gitlab-pages.conf` /label ~security Changelog: added
2021-02-12Merge branch '485-use-httpfs-with-httprange' into 'master'Vladimir Shushlin
Allow registering a file protocol in the zip VFS See merge request gitlab-org/gitlab-pages!429
2021-02-08Add deprecation note for domain-config-sourceJaime Martinez
2021-02-08Refactor http client usage in httprageJaime Martinez
Moves the http.Client initialization inside the `httprange` package to the zip VFS. This makes the type `Resource` depend on an http.Client that needs to be passed on initialization. It also makes the zip VFS initialize the client. It's possible to reconfigure it to register a file protocol by calling vfs.Reconfigure explicitly.
2021-02-02Use pages-root as jail pathJaime Martinez
2021-01-28Define separator for MultiStringFlagJaime Martinez
Allows initializing each MultiStringFlag using its own separator and defaults to `,` when not specified. This change makes the `-header` flag use a `;;` separator so that it can be defined inside a config file. Fixes https://gitlab.com/gitlab-org/gitlab-pages/-/issues/531.
2021-01-20Inline error messages not reusedKevin
2021-01-11Refactor 'Error's not used as errors to stringsKevin
Change variables of error type to strings constants when these variables are solely used for the message contained in the errors.
2020-12-07Handle auto domain-config-source gracefullyJaime Martinez
2020-12-02Merge branch '464-make-cache-configurable' into 'master'Vladimir Shushlin
Add zip serving configuration flags See merge request gitlab-org/gitlab-pages!392
2020-11-30Fix importJaime Martinez
2020-11-30Apply 1 suggestion(s) to 1 file(s)Jaime Martinez
2020-11-30Move flag definition to mainJaime Martinez
Add zip config to appConfig
2020-11-30Log zip configJaime Martinez
2020-11-30Move zip flags to configJaime Martinez
2020-11-30Add default configJaime Martinez
Use DefaultConfig as global
2020-11-30Add zip config flagsJaime Martinez
Adds a config package with specific zip configuration structure that can be shared between packages.
2020-11-27De-capitalise all fm.Errorf messagesstandardize-error-msg-formattingTom Quirk
Conform to the official CodeReviewComments guide, which says: Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context. That is, use fmt.Errorf("something bad") not fmt.Errorf("Something bad") Source: https://github.com/golang/go/wiki/CodeReviewComments#error-strings
2020-11-18Support for HTTPS over PROXYv2 protocolIgor Wiedler
2020-10-20Revert "Add Host and SNI-based rate limiting"Kamil Trzciński
This reverts commit 7f8e9bd39def730616a4c7d1d5f00ee6ca9ea76a.
2020-10-20Add Host and SNI-based rate limitingKamil Trzciński
This adds a per-process rate limiting of the incoming requests and connections. This assume two: - Requests generate a pressure on Object Storage - New TLS connections generate a pressure on CPU due to TLS handshake (generating and exchanging asymmetric keys)
2020-08-07Revert "Merge branch 'revert-a3365a7b' into 'master'"revert-185e0a0Jaime Martinez
This reverts commit 185e0a0e5c621f350335495291c535e5c05df89b, reversing changes made to a3365a7b1b41b3dee206cbcf27e915ee45d556a5.
2020-08-04Revert "Merge branch 'use-domain-config-source-disk' into 'master'"revert-a3365a7bVladimir Shushlin
This reverts merge request !305
2020-08-04Update acceptance tests without gitlabsourceconfigJaime Martinez
2020-07-02fix default value for gitlab-server to include scheme and portIgor
2020-05-28Add .golangci.yml linter configurationJaime Martinez
As part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/385 we have introduced the use of a custom `.golangci.yml` file with some custom rules for linting. This replaces the need of downloading and using `golint`, `gofmt` `go vet` and `gocyclo` manually. We take advantage of the custom `golangci-lint` docker image as stated in the [Automatic lintinb] (https://docs.gitlab.com/ee/development/go_guide/#automatic-linting) section of the Go standards and style guidelines. This iteration enables a subset of linters, with the remaining of them enabled on a separate MR as described in the issue above. The main changes introduced by this linter include: - gosec: potential hardcoded credentials - goconst: DRY by declaring and using constants - gosimple: reduce statements complexity and improve return statements
2020-05-19Rename flag to domain-config-sourceJaime Martinez
2020-05-18Add domain-source config flagJaime Martinez
This is an incremental step for adding `-domain-source` as described in https://gitlab.com/gitlab-org/gitlab/-/issues/217912. We are only adding the flag here but it's not doing anything at the moment. Add TODO for implementation
2020-05-08Enforce loading secrets from fileJaime Martinez
Passing secrets via command line is not allowed anymore. A config file should be used instead. The default filename is `gitlab-pages-config`. The following command line options will throw an error and prevent pages from running if set explicitly: - `-auth-client-id` - `-auth-client-secret` - `-auth-secret`
2020-05-08Fix deprecated args validationJaime Martinez
Fixes check for deprecated arguments to cater for key=value arugments. It also logs the warning if a deprecated flag is used.
2020-04-30make internalGitLabServerFromFlags unexportedIgor Wiedler