0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-30 05:50:50 +01:00
gitea/modules/repository
zeripath 4979f15c3f
Add configurable Trust Models (#11712)
* Add configurable Trust Models

Gitea's default signature verification model differs from GitHub. GitHub
uses signatures to verify that the committer is who they say they are -
meaning that when GitHub makes a signed commit it must be the committer.
The GitHub model prevents re-publishing of commits after revocation of a
key and prevents re-signing of other people's commits to create a
completely trusted repository signed by one key or a set of trusted
keys.

The default behaviour of Gitea in contrast is to always display the
avatar and information related to a signature. This allows signatures to
be decoupled from the committer. That being said, allowing arbitary
users to present other peoples commits as theirs is not necessarily
desired therefore we have a trust model whereby signatures from
collaborators are marked trusted, signatures matching the commit line
are marked untrusted and signatures that match a user in the db but not
the committer line are marked unmatched.

The problem with this model is that this conflicts with Github therefore
we need to provide an option to allow users to choose the Github model
should they wish to.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Adjust locale strings

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @6543

Co-authored-by: 6543 <6543@obermui.de>

* Update models/gpg_key.go

* Add migration for repository

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-20 00:44:55 +08:00
..
branch.go Handle more pathological branch and tag names (#11843) 2020-06-11 19:49:47 -04:00
check.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
commits_test.go make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
commits.go make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
create_test.go
create.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
fork_test.go
fork.go Fix visibility of forked public repos from private orgs (#11717) 2020-06-06 20:45:12 -04:00
generate.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
hooks.go Re-attempt to delete temporary upload if the file is locked by another process (#12447) 2020-08-11 21:05:34 +01:00
init.go Add configurable Trust Models (#11712) 2020-09-20 00:44:55 +08:00
main_test.go
repo.go On Migration respect old DefaultBranch (#12843) 2020-09-15 22:37:44 +08:00
update.go