Commit Graph

51 Commits

Author SHA1 Message Date
Thong Kuah 85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12:00
Peter Bábics eadee27a3f Add support for deleting images in registry 2.7 2019-03-18 23:04:29 +01:00
Stan Hu 34f51dee0d Set the JWT algorithm to RS256 in decode specs
By default, the JWT decode only allows HS256 mode (HMAC using SHA-256
hash algorithm). The specs using RSA tokens failed per
https://github.com/jwt/ruby-jwt#algorithms-and-usage:

It is strongly recommended that you hard code the algorithm, as you may
leave yourself vulnerable by dynamically picking the algorithm.
2018-12-29 06:20:04 -08:00
Marcel Amirault eb640eded7 Correct Gitlab Capitalization in code files 2018-09-21 12:05:37 +00:00
Kamil Trzciński 34ec29b956 Support multiple scopes when using authing container registry scopes 2018-08-01 13:03:16 +02:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Lin Jen-Shin c519cac2cb Bring changes from EE 2018-06-21 22:38:58 +08:00
Mayra Cabrera 3e35f65394 Verify that deploy token has valid access when pulling container registry image 2018-04-10 07:31:30 +00:00
Dmitriy Zaporozhets 86df5c6793
Replace deprecated path_with_namespace with full_path
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-03-05 15:41:54 +02:00
Vratislav Kalenda 3d744009ed fix code style issues 2017-10-10 23:46:18 +02:00
Vratislav Kalenda 3b95f5881f fix lint 2017-10-08 22:11:36 +02:00
Vratislav Kalenda cd3fa2a709 remove whitespace 2017-10-08 21:01:45 +02:00
Vratislav Kalenda 74d37438d5 Issue JWT token with registry:catalog:* scope when requested by GitLab admin 2017-10-08 20:40:01 +02:00
Lin Jen-Shin 64aa9e21b2 Rename user_can_admin? because it's more accurate
Also fix the test because we no longer have :empty_project,
just use :project is the same as before
2017-08-07 17:29:34 +08:00
Lin Jen-Shin b9a8147333 Merge remote-tracking branch 'upstream/master' into add-star-for-action-scope
* upstream/master: (184 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix pipeline icon in contextual nav for projects
  Since mysql is not a priority anymore, test it less
  Fix order of CI lint ace editor loading
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Fix spec
  Fix spec
  Fix spec
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Add changelog
  Install yarn via apt in update guides
  Use long curl options
  fix
  Add a spec for concurrent process
  Remove monkey-patched Array.prototype.first() and last() methods
  ...
2017-08-07 16:19:28 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Lin Jen-Shin b3e058996c Cleanup tests and add admin_container_image to
full_authentication_abilities. This is fine because
we're going to check with can?(..) anyway
2017-08-02 17:51:29 +08:00
Maxime Visonneau 1cdc76f455 Implemented star auth capabilities on docker registry to enable deletion of images 2017-08-02 17:09:54 +08:00
Lin Jen-Shin a210ddaa1b Merge remote-tracking branch 'upstream/master' into add-star-for-action-scope
* upstream/master: (3161 commits)
  Derive project path from import URL
  add article to list
  link to CI/CD Deep Dive demo for #5800
  Add code review guidelines related to Build [CI skip].
  Make time span dropdown style on cycle analytics page consistent
  copyedit, add article to the list
  Make Markdown autocomplete dropdown style consistent
  Add 204. Remove duplicated method.
  Make sure we didn't commit conflicts
  Fix bug in blob test
  Always fetch branches before finding the merge base, otherwise we could find an outdated merge base
  Fixes dropdown margin in sidebar
  Fixes the search losing focus
  Docs add blog articles
  Inline script cleanup globals and easy
  Add option to use CommitLanguages RPC
  CI fixes for gitaly-ruby
  fix
  Allow logged in users to read user list under public restriction
  Small refactor in LegacyNamespace and moved back send_update_instructions
  ...
2017-08-02 15:55:17 +08:00
Gabriel Mazetto fb06a4d8fe Rename more path_with_namespace -> full_path or disk_path 2017-08-01 07:28:13 +02:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Jean Praloran 2822081821 fix unit testing for admin 2017-05-30 07:11:28 +12:00
Jean Praloran d890c6e81b fix typo and check 2017-05-30 07:11:28 +12:00
Jean Praloran 6c9da29241 add test and rebase 2017-05-30 07:11:28 +12:00
Grzegorz Bizon 4726ff9dbe Add test example for invalid registry access request 2017-03-31 12:37:44 +02:00
Grzegorz Bizon 7d3d1ec5a7 Create container repository on successful push auth
Because we do not have yet two way communication between container
registry and GitLab, we need to eagerly create a new container
repository objects in database. We now do that after user/build
successfully authenticates a push action using auth service.
2017-03-30 15:24:46 +02:00
Grzegorz Bizon 5a7f8cb5d2 Add readability improvements to registry auth specs 2017-03-29 12:30:38 +02:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Kamil Trzcinski 517dd4a3f3 Allow owners to fetch source code in CI builds
Due to different way of handling owners of a project, they were not allowed to fetch CI sources for project.
2016-11-01 09:37:20 +01:00
Kamil Trzcinski e941365f3b Rename capabilities to authentication_abilities 2016-09-16 11:12:21 +02:00
Kamil Trzcinski eed5c58d85 Verify permission of build in context of dependent project 2016-09-15 16:36:39 +02:00
Kamil Trzcinski 548169cfb5 Fix most of specs 2016-09-15 15:40:53 +02:00
Kamil Trzcinski 9d1ccd2ad3 Fix existing authorization specs 2016-09-15 13:49:11 +02:00
Kamil Trzcinski 1744c742f2 Allow to access Container Registry for Public and Internal projects 2016-07-15 17:05:41 +02:00
Kamil Trzcinski f27daddfc6 Fix rubocop offenses 2016-05-31 15:38:42 +02:00
Kamil Trzcinski 7a6ba30d9a Test token expirability 2016-05-31 13:48:21 +02:00
Kamil Trzcinski 7ec1fa212d Make authentication service for Container Registry to be compatible with < Docker 1.11 2016-05-30 16:57:39 +02:00
Robert Speicher 75739e54be Enable RSpec/NotToNot cop and auto-correct offenses
Also removes the note from the development/testing.md guide
2016-05-24 15:40:29 -04:00
Kamil Trzcinski 646018a40e Fix the CI login to Container Registry (the gitlab-ci-token user) 2016-05-23 00:34:51 +02:00
Kamil Trzcinski 4474eab4f6 Fix container deletion permission issue 2016-05-20 18:43:11 -05:00
Kamil Trzcinski ac6992ba68 Fix specs 2016-05-16 23:40:40 -05:00
Kamil Trzcinski 04933fd572 Use container registry config stub 2016-05-16 18:07:49 -05:00
Kamil Trzcinski 938d5b6fe4 Fix http status codes for container registry authentication service 2016-05-15 10:46:54 -05:00
Kamil Trzcinski 3d18b3a0e7 Merge branch 'docker-registry' into docker-registry-view 2016-05-15 08:53:18 -05:00
Kamil Trzcinski dfd0e2450a Improve authentication service specs 2016-05-15 08:52:26 -05:00
Kamil Trzcinski f63b6fc297 Merge branch 'docker-registry' into docker-registry-view 2016-05-14 18:23:55 -05:00
Kamil Trzcinski f4f9184a01 Rename JWT to JSONWebToken 2016-05-14 18:23:31 -05:00
Kamil Trzcinski 715a8cfa2f Fix authentication service 2016-05-14 14:27:56 -05:00
Kamil Trzcinski 9496f7a71a Merge branch 'docker-registry' into docker-registry-view 2016-05-14 11:16:21 -05:00