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
2023-05-08Upgrade golangci-lint to v1.52.2 on CIJaime Martinez
2023-04-12Update golangci-lint toolKassio Borges
2023-01-19Refactor auth constructor to use options structNaman Jagdish Gala
2022-12-28Merge branch 'master' into 'security-arbitrary-protocol-redirection'Naman Jagdish Gala
# Conflicts: # internal/auth/auth_test.go
2022-12-28Reduce race condition on pages authenticationKassio Borges
2022-11-29Restrict arbitrary protocol redirection to only https or http URLsngala
This commit restricts arbitrary protocol redirection to only https or http URLs and introduces nolint: gocyclo for auth.handleProxyingAuth method. Changelog: security
2022-11-03Add auth-cookie-session-timeout flagKassio Borges
Related to: https://gitlab.com/gitlab-org/gitlab-pages/-/issues/806 Changelog: added
2022-06-28Improve consistency of log fieldsfeistel
2022-05-02Add nolintlint linter configurationfeistel
Require an explanation for nolint rules and warn about unused rules
2022-04-08chore: move check outside of fetching token functionJaime Martinez
2022-04-08fix: handle context canceled gracefully for auth and artifactsJaime Martinez
Changelog: changed
2022-03-24fix: validate that session was issued on the same hostVladimir Shushlin
Currently, sessions are valid across all domains. And our auth tokens are also valid for all pages projects user has access to. This means that cookie from one website can be reused on the another. Attackers can steal cookies in many different ways. The easiest way would be to setup a validated custom domain, then proxy all requests to pages server, but log the cookies. Once you have a cookie for attackers domain, you can reuse it on any other pages domain the target user has access to. This commit saves current domain in the session and validates it when reading the session. Changelog: security
2022-03-15feat: allow auth http.Client timeout to be configurableOsman İlge Ünaldı
Changelog: added
2022-03-11Add correlation_id to all exception capturesKassio Borges
2022-01-31fix: ensure logging status codes field names are consistentStan Hu
LabKit logs all HTTP responses with a `status` field of an integer. We ensure that all errors now use this convention and store the full status text as `status_text`. This is needed to enusre Elasticsearch doesn't drop logs due to mapping conflicts. Changelog: fixed
2022-01-24lint: fix gci issuesfeistel
2021-12-08Merge branch 'remove-unused-ctx' into 'master'Jaime Martinez
refactor: enable unparam in .gitlabci.yml See merge request gitlab-org/gitlab-pages!631
2021-12-07refactor: enable unparam in .golangci.ymlVladimir Shushlin
and fix offences
2021-12-07chore: upgrade to labkit 1.11.0Jaime Martinez
And report stack trace with error tracking to Sentry. Changelog: other
2021-11-22fix(auth): check suffix correctly in domainAllowedMarkus Legner
Changelog: fixed
2021-11-19Escape user supplied code before inserting as a POST parameterJoern Schneeweisz
2021-09-02refactor: replace magic numbers with http status codesfeistel
2021-08-10Merge branch 'fix/no-ctx' into 'master'Jaime Martinez
fix: propagate context to sub requests See merge request gitlab-org/gitlab-pages!538
2021-08-09feat: capture errors when trying to fetch the access tokenfeistel
2021-08-09refactor: improve checkAuthentication logic, check error first and log ↵feistel
status code during an unexpected response
2021-08-08fix: propagate context to sub requestsfeistel
2021-08-05fix: close response body and fix memory leakfeistel
2021-07-22Use internal-gitlab-server in auth-related tasksfeistel
Update the auth package to use the internal server when fetching access token or checking for authentication. Changelog: changed
2021-07-07Add correlation_id to outbound requestsJaime Martinez
2021-07-07Improve logging and correlation IDJaime Martinez
2021-04-22Follow error strings conventionfeistel
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-03Simplify meteredRoundTripper initJaime Martinez
Use file.html explicitly in test
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-17Encrypt and sign OAuth codeJaime Martinez
Add AES GCM encryption/decryption to auth Add signing key to Auth Abstract key generation and Auth init to their own funcs. Cleanup and DRY unit tests. Use same code parameter in auth redirect Cleanup auth and add tests for enc/dec oauth code Add acceptance test for fix Apply suggestion from review Add missing test and apply feedback Fix unit test Simplify acceptance test
2020-07-06Move serving 404 logic to domain packageJaime Martinez
Simplify responsibilities of auth package and reduce complexity of app.go deciding which content to serve.
2020-07-06Get namespace domain if auth fails for a private domainJaime Martinez
Add acceptance test and some more domains for testing Move namespace domain serving logic Restore go.sum Remove redundant return Fix linter
2020-07-06Find parent namepsace domain if auth fails for current projectJaime Martinez
Update labkit
2020-07-06Serve custom 404 even in case of auth failureAlessio Caiazza
2020-06-01Enable the remaining lintersJaime Martinez
- ineffassign - misspell - structcheck - typecheck - unconvert - unused - varcheck - whitespace
2020-06-01Enable deadcode linterJaime Martinez
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-08explicitly set MaxIdleConns, so that it is clear we need to update it when ↵Igor
increasing MaxIdleConnsPerHost
2019-11-25Make it possible to pass client config to gitlab sourceGrzegorz Bizon
2019-11-24Respond with 502 if a domain can not be retrieved from a sourceGrzegorz Bizon
2019-11-23Add abstract GitLab domains source interfaceGrzegorz Bizon
2019-10-02Merge branch 'backstage/gb/separate-domain-source-storage' into 'master'Nick Thomas
Separate domain config source See merge request gitlab-org/gitlab-pages!188
2019-09-26Add support for previewing artifacts that are not publicTuomo Ala-Vannesluoma
Remove some duplicate logic on Auth module Separate handling artifact to own handlers package Unit test handlers by mocking auth and artifact modules Add generate-mock step to Makefile Use additional handler func to simplify TryMakeRequest return type Always try with token if exists Do not log RequestURI, log path only Remove not used logRequest func
2019-09-24Encapsulate groups config in the source packageGrzegorz Bizon