-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPG commit validation #1150
GPG commit validation #1150
Conversation
build failed. and it seems the image is not transparent ? |
models/gpg_key.go
Outdated
|
||
"code.gitea.io/gitea/modules/log" | ||
"github.com/go-xorm/xorm" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please following the style guide. https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md#styleguide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the catch i will fix it in the PR of the API from where I start this one : #710
I didn't precise but this is a really early WIP. I open this PR mainly to be able to discuss UI design. |
4765471
to
3748414
Compare
Validation of commit is ok and display a simple message on hover (title attr) with user/key that succeed or why it failed. (need go-gitea/git#36 to compile) I need to add more detail in commit page. For the little API part, I have a problem with json auto-encoding replacing "<" and ">" don't know the good way to tackle this prob in gitea.
|
3748414
to
ac80c69
Compare
Great work! Like to see it in Gitea. 👍 (And "Message" should be on the same line than all commit messages.) |
ac80c69
to
a9664b3
Compare
Visual updated in description. |
@sapk Great! If you only see the question mark, you do not know what is missing. I would use a gray lock which indicates that this commit is signed but not trusted. |
I think that if we use a grey lock it could be understood as trusted (with less security) also by the user and that is not the case. Actually if you hover the question mark it display "No good signature found in keystore" but i plan to find a better describing string like "No known key found for this signature" ? |
@sapk I think it will also be much cleaner if you use no border radius between the hash and the symbol. |
@sapk I see your point. What about an open gray lock? |
Nice! 💯 Background is ok. Do you think some kind of really small green border around the hash and icon looks good? (Border) |
Yes, looks good. :) Green border: "my hash is trusted" ✔️ |
This is really good! But then we should add a gray border around untrusted signatures and commits without. :) |
Looks good. I would use a grey lock on commit page as you have used in the commit list - not a black one. |
I am not sure if one should also use the border system of the commit list for the whole commit box on these single pages - so a green border around everything, might be too colorful. |
Yes. green border and background with black text maybe better. |
models/gpg_key.go
Outdated
"github.com/go-xorm/xorm" | ||
"github.com/ngaut/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use this log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That my editor that auto-import :-(
+ some little fix
3be5753
to
ff77237
Compare
So after testing it seems that .IssuerKeyId in sig is not the same the the KeyID of key so remove testing commits. |
9fe1278
to
4ced54d
Compare
Another thing, maybe all |
@lunny I didn't found any "Id" string in my change where did you see it ? |
@sapk |
LGTM, great to also see tests in here ! |
@sapk I guess migrations are needed, right ? |
@strk I have try to separate api and db from validation and presentation. I think it will be best to merge it after fix #1303. |
@lunny I could rebase to be sure that everything works and be more clear but it's not needed. The goal of API #710 was to put the foundation with db format and base object. This PR don't change DB and base object so this would merge seamlessly. All the new code is only call for rendering and don't even write to DB. |
@sapk this PR is ready to review and merge? |
Yes and allready have a LGTM ^^ |
LGTM , but I think we should deal with vendoring in a different way (as I know another |
Make L-G-T-M work ! |
LGTM |
Display signed commit and validation against gpg key in database. I have started with a very little UI with the a simple title attr indicating the reason.
Examples:
For comparison : https://github.com/sapk/testing-git/commits/master
Need and follow : #710 ✅ go-gitea/git#36 ✅
TODO List :