Age | Commit message (Collapse) | Author |
|
'rd-43185-revert-sanitize-extra-blank-spaces-used-when-uploading-a-ssh-key' into 'master'"
This reverts commit e607fd796657afd214b8f25201919d3e33b3f35f.
|
|
'rd-40552-gitlab-should-check-if-keys-are-valid-before-saving' into 'master'"
This reverts commit a58f8c32c62bcf5824d1fe1d0de53e9bda974d65, reversing
changes made to cd5d75c362cdf06efb8174eddfbd0f4b65687dec.
|
|
into 'master'
Sanitize extra blank spaces used when uploading a SSH key
Closes #40552
See merge request gitlab-org/gitlab-ce!16821
|
|
including/extending it
|
|
|
|
|
|
By caching the number of personal SSH keys we reduce the number of
queries necessary on pages such as ProjectsController#show (which can
end up querying this data multiple times).
The cache is refreshed/flushed whenever an SSH key is added, removed, or
when a user is removed.
|
|
|
|
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.
The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
|
|
|
|
|
|
`allowed_key_types` is removed and the `minimum_<type>_bits` fields are
renamed to `<tech>_key_restriction`. A special sentinel value (`-1`) signifies
that the key type is disabled.
This also feeds through to the UI - checkboxes per key type are out, inline
selection of "forbidden" and "allowed" (i.e., no restrictions) are in.
As with the previous model, unknown key types are disallowed, even if the
underlying ssh daemon happens to support them. The defaults have also been
changed from the lowest known bit size to "no restriction". So if someone
does happen to have a 768-bit RSA key, it will continue to work on upgrade, at
least until the administrator restricts them.
|
|
This is an amalgamation of:
* Cory Hinshaw: Initial implementation !5552
* Rémy Coutable: Updates !9350
* Nick Thomas: Resolve conflicts and add ED25519 support !13712
|
|
|
|
|
|
Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
Use Gitlab::ExclusiveLease to make sure that we enqueue Sidekiq job
at most once per day for given key.
|
|
Addresses: Issue #13810
1. Adds a last_used_at attribute to the Key table/model
2. Update a key's last_used_at whenever it gets used
3. Display how long ago an ssh key was last used
|
|
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18517263
|
|
ref: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6763
|
|
|
|
|
|
|
|
In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.
Fixes: #17382
|
|
|
|
Related to #2235.
This is done by:
1. Delaying the notification sending after the SSH key is commited in DB
2. Gracefully exit the mailer method if the record cannot be found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signe-in -> signed-in
go_to_gihub_for_permissions -> go_to_github_for_permissions
descendand -> descendant
behavour -> behaviour
recepient_email -> recipient_email
generate_fingerpint -> generate_fingerprint
dependes -> depends
Cant't -> Can't
wisit -> visit
notifcation -> notification
sufficent_scope -> sufficient_scope?
levet -> level
|
|
[\d\h] is the same as \h
|
|
Add system hook for ssh key create and destroy
Update and fix documentation
Update tests
|
|
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
Update app/models/key.rb to permit SSH keys of type ecdsa rather than forcing dsa and rsa algorithms.
|
|
|
|
|