-
Notifications
You must be signed in to change notification settings - Fork 84
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
Plugin does not work in master branch with oauth.type=OAUTH #84
Comments
I'm seeing this exception too on most recent gerrit master (cd0c6ba34a7c681ab022263fd82fd83b499af79a), investigating.
|
Fixed in: [1]. |
Yes, the problem was that gerrit wouldn't start. Sorry for the unclear report. |
Thanks for the report. Should be fixed now. I will merge the fix in this repository, once it's accepted on Gerrit-review. |
Thanks! |
Since [1] OAuthLoginProvider is required for oauth provider plugin to work. [1] https://gerrit-review.googlesource.com/96370 Bug: davido/gerrit-oauth-provider#84 Change-Id: I487858d40d489a8b4e55665aa33a0df89d1150b6
I've setup gerrit 2.15-rc1 yesterday and added gerrit-oauth-provider.jar v2.14.3. It was throwing an error with |
What error? |
The exception from comment: |
Are you sure it's exactly the same exception? The root cause was fixed. Can you paste the exception you are seeing with latest plugin version? Can it be that you are using the old plugin version? |
I also got the same error in Gerrit 2.4.15.1-1, the plugin version I used is 2.14.3 got from: The error message I got: (same as @orian mention)
|
Can the folks who are getting the exception post the relevant part of their Gerrit config (masking any secrets, obviously)? I'm thinking that the |
It's okay to me and here is my 'gerrit.config':
|
Ah right, the configuration is invalid. We should document it more prominently. See this change and particularly the default: [1]
So, that in case of Solution: overload that policy with
and this should fix it. [1] https://gerrit-review.googlesource.com/#/c/gerrit/+/99079/5/Documentation/config-gerrit.txt@495 |
Yes!! That's my root cause, it fixed my problem and working fine now. So sorry for my careless and many thanks for your great help! |
I added documentation to https://github.com/davido/gerrit-oauth-provider/wiki/FAQ. |
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 84d830b5b350fdbae7c075473bceea9ec619b3c9The text was updated successfully, but these errors were encountered: