summaryrefslogtreecommitdiff
path: root/spec/gitlab_keys_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead Ruby codeNick Thomas2019-10-151-64/+0
|
* Remove gitlab-keys scriptPatrick Bajao2019-09-041-312/+0
|
* Actually print matched keys in list_keysChristian Ratzenhofer2019-04-301-8/+12
|
* Revert "Merge branch 'sh-bump-ruby-version' into 'master'"Douwe Maan2018-12-131-10/+4
| | | This reverts merge request !257
* Upgrade to Ruby 2.5.3Stan Hu2018-12-131-4/+10
|
* GitlabConfig, GitlabShell & GitlabKeys spec fixesAsh McKenzie2018-09-071-1/+1
| | | | GitlabConfig spec was relying upon real config.yml
* Use `output` matcher in one testRobert Speicher2018-08-151-4/+1
|
* Autocorrect specs via `transpec -k its -v stub_with_hash`Robert Speicher2018-08-151-36/+36
|
* Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"Nick Thomas2018-08-141-37/+38
| | | | | This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
* Merge remote-tracking branch 'origin/master' into ash.mckenzie/srp-refactorAsh McKenzie2018-08-011-3/+31
|\
| * Add support for SSH certificate authenticationÆvar Arnfjörð Bjarmason2018-07-261-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This along with the code submitted to gitlab-ce in the gitlab-org/gitlab-ce! MR implements SSH certificate authentication. See the docs added to gitlab-ce for why and how to enable this. This, along with that MR, closes gitlab-org/gitlab-ce#3457 Implementation notes: - Because it's easy to do, and because an earlier nascent version of this would pass user-ID to gitlab-shell, that's now supported, even though the SSH certificate authentication uses username-USERNAME. - The astute reader will notice that not all the API calls in gitlab-ce's lib/api/internal.rb support a "username" argument, some only support "user_id". There's a few reasons for this: a) For this to be efficient, I am bending over backwards to avoid extra API calls when using SSH certificates. Therefore the /allowed API call will now return a "user id" to us if we're allowed to proceed further. This is then fed to existing APIs that would only be called after a successful call to /allowed. b) Not all of the git-shell codepaths go through /internal/allowed, or ever deal with a repository, e.g. the argument-less "Welcome to GitLab", and /internal/2fa_recovery_codes. These need to use /internal/discover to figure out details about the user, so support looking that up by username. c) Once we have the "user id", the GL_ID gets passed down to e.g. user-authored hooks. I don't want to have those all break by having to handle a third GL_ID mode of "username" in addition to the current "key id" and "user id".
* | Fix some rspec deprecationsAsh McKenzie2018-08-011-40/+39
|/
* Rspec upgrade and deprecation fixesash.mckenzie/minor-tidy-upAsh McKenzie2018-07-201-4/+4
|
* Switch to structured loggingJacob Vosmaer (GitLab)2018-03-191-5/+5
|
* Ensure rm-key works with only IDMichael Kozono2017-06-281-0/+17
|
* Add list-key-ids commandMichael Kozono2017-06-281-2/+28
|
* Instrument GitLab Shell and log metrics data to a filePaco Guzman2016-10-111-2/+2
|
* In order to use chomp! on the input later, we need to dup the ARGV input ↵dup-frozen-argv-keyDJ Mountney2016-08-101-1/+1
| | | | | | string for keys Also updated the gitlab_key tests to freeze the ARGV variables.
* Update the keys permission check to open the file in write mode.DJ Mountney2016-08-101-0/+7
| | | | That way the file is created if it does not exist.
* Newline after "let"key-validationsJacob Vosmaer2016-08-101-0/+1
|
* Changes proposed during reviewJacob Vosmaer2016-08-101-2/+2
|
* Defense in depth for authorized_keys linesJacob Vosmaer2016-08-051-0/+26
|
* Add permission check tests, improve checkauthorized-keys-permission-checkJacob Vosmaer2016-08-031-1/+20
|
* Manage authorized_keys permissions continuouslykeys-chmodJacob Vosmaer2016-08-011-1/+1
| | | | | | We can lazily create authorized_keys and set its permissions. This adds negligible overhead and it allows us to remove a setup step from GitLab both on source and in omnibus-gitlab.
* Remove keys from authorized_keys in-placeJacob Vosmaer2015-07-161-3/+5
| | | | | | This will speed up the rm-key operation. The downside is that authorized_keys will not shrink when you remove a key. If this ever becomes a problem it can be fixed by running 'rake gitlab:shell:setup'.
* Added list-keys command and specDavid Martin2014-10-151-0/+13
| | | | | | | | | | | | | | | | | | Removed puts and tidied up regex Address the hound Address the hound, again Use single quotes Add back travis.yml file Remove travis.yml, only keep on fh-master Use single quotes Use single quotes
* Improve coverage.Gabor Nagy2014-06-231-0/+20
|
* Create keys fixtures in testDmitriy Zaporozhets2014-05-311-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Put authorized_keys.lock in the .ssh directoryJacob Vosmaer2014-05-301-1/+12
|
* Use lock file when add or remove keys from authorized_keys fileDmitriy Zaporozhets2014-04-181-0/+36
| | | | | | This prevents concurrent modification of authorized_keys file Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add gitlab-keys batch-add-keysJacob Vosmaer2014-03-141-0/+42
| | | | | This command is intended to be called by the GitLab Rails code when restoring an application backup.
* Stub file writing in testsJacob Vosmaer2013-11-251-6/+11
|
* Fix return values in GitlabKeysJacob Vosmaer2013-11-201-4/+23
|
* Refactor file writing testsJacob Vosmaer2013-11-201-33/+34
|
* More file writing tests for GitlabKeysJacob Vosmaer2013-11-051-27/+33
|
* Remove sed invocation from GitlabKeysJacob Vosmaer2013-11-021-5/+10
|
* Use Kernel#open to append lines to authorized_keysJacob Vosmaer2013-10-311-2/+5
|
* Use Tempfile instead of `sed -i`Jacob Vosmaer2013-07-191-1/+4
| | | | | | The syntax for `sed -i` is incompatible between GNU sed and BSD sed. By Tempfile from the Ruby standard library we can avoid using the `-i` option of sed.
* Use :warn instead of :error for invalid commands.ash2013-05-181-2/+2
|
* Add logging specs for gitlab-keys.ash2013-05-171-0/+21
|
* Fix tests and version up to 1.4.0v1.4.0Dmitriy Zaporozhets2013-04-301-1/+1
|
* test GitlabKeys execDmitriy Zaporozhets2013-03-111-19/+35
|
* fix keys testsDmitriy Zaporozhets2013-02-091-1/+1
|
* Updated with #{}Michael2013-02-071-2/+2
|
* Read auth keys file from configMichael2013-02-071-2/+2
|
* Fix key removeDmitriy Zaporozhets2013-02-051-1/+1
|
* add/remove keys by idDmitriy Zaporozhets2013-02-051-6/+6
|
* gitlab-initDmitriy Zaporozhets2013-02-051-1/+1
|
* gitlab-keys with testsDmitriy Zaporozhets2013-02-051-0/+47