gerrit-oauth-provider: Plugin does not work in master branch with oauth.type=OAUTH
It 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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (8 by maintainers)
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.