Hi, I am working on a bitbucket server/data center incoming application link.
I am developing locally so I have bitbucket server running in docker via http behind a caddy proxy, that terminates ssl
I have a PHP application where I want to do OAuth requests with. Pretty sure that the code is okay, because we have this running in production without issues.
When I hit the bitbucket oAuth2 authorize endpoint - I get a consent response of 412 code and the message -
"HTTP Status 412 – Precondition Failed Invalid 'redirect_uri' URL parameter provided"
I am using the bitbucket.properties to allow local development:
atlassian.oauth2.provider.skip.base.url.https.requirement=true
atlassian.oauth2.provider.skip.redirect.url.https.requirement=true
as per https://confluence.atlassian.com/bitbucketserver0720/oauth-2-0-provider-system-properties-1116282016.html
I am sure they are active and used, because otherwise I cannot add the redirect url into the application link.
I am 100% certain that the redirect_uri matches the one I have configured in the application link. I am redirected from the authorization page to the consent page (invalid redirect uri would be detected before?) I do not have any special chars in my URL. Url encoding / with or without %2f doesnt help.
We have two different redirect uris that were separated by , in the application link, but even if I reduce this to one redirect url, it doesnt help.
I wonder if there are more checks to the redirect_uri that are failing: Is it doing http requests to verify?
I enabled debug logs and didnt find something suspicious there, I just see the request in the access log and the 412 responses.
Bitbucket data center version is 8.19.3 8019003
Hello @pscheit
Hope you're doing good.
The issue you've reported is being tracked in this bug ticket: OAUTH20-2488, which is currently open and being worked on by our developers.
As per one of the comments on the ticket, this will be resolved in Bitbucket Data Center versions 8.9.15 and 8.19.4. Both are scheduled to be released between the 1st and 2nd Tuesday of June 2024. It will also be resolved in Bitbucket 9.0.0.
Hope this helps!
Regards,
Apoorva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.