Plugin does not work in master branch with oauth.type=OAUTH
See original GitHub issueIt appears that choosing this auth type means that Gerrit now expects a plugin to include an OAuthLoginProvider to be used for logging in. Since gerrit-oauth-provider does not include this, the plugin no longer works.
I was still able to get the plugin to work by using the OPENID_SSO auth type, but the plugin docs say not to do that so I’m concerned that it is not a good workaround.
edit: looking into it more, I guess the issue is that on the master branch of gerrit the logic in GitOverHttpModule.java is different: it sets authFilter = ProjectOAuthFilter.class whenever the auth type is OAUTH, whereas in the release branch it requires basic auth to be enabled as well. This was done in commit 84d830b5b350fdbae7c075473bceea9ec619b3c9
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
oauth 2.0 - How to pull from official/master using github api for ...
The merge will just merge code from the new branch to existing branches, it has nothing to do with pulling latest code from...
Read more >Introduction to OAuth - Snowflake Documentation
Authorization Server¶. This server displays an interface to a user to approve or deny client access to their data. The server issues an...
Read more >GitHub autentication with Gerrit - Google Groups
I've read to do this I need a few plugins to get the OAuth setup, ... the master branch points to Gerrit API...
Read more >Use the Jenkins OAuth plug-in to securely pull from GitHub
Starting from the very basics -- how to download the application WAR file and pull code from GitHub -- this Jenkins tutorial will...
Read more >What is the OAuth 2.0 Authorization Code Grant Type?
This ensures that the request to get the access token is made only from the application, and not from a potential attacker that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ah right, the configuration is invalid. We should document it more prominently.
See this change and particularly the default: [1]
auth.gitBasicAuthPolicyis configured as:So, that in case of
auth.type==OAUTH,auth.gitBasicAuthPolicyis initialized toOAUTH. However thegerrit-provider-plugincurrently doesn’t implement that policy, so that it cannot work.Solution: overload that policy with
HTTP:and this should fix it.
[1] https://gerrit-review.googlesource.com/#/c/gerrit/+/99079/5/Documentation/config-gerrit.txt@495
I added documentation to https://github.com/davido/gerrit-oauth-provider/wiki/FAQ.