github-oauth-plugin icon indicating copy to clipboard operation
github-oauth-plugin copied to clipboard

Add redirect_uri oauth param and configuration

Open tdaniely-dn opened this issue 3 years ago • 12 comments

https://issues.jenkins.io/browse/JENKINS-43214

Continue work from #111

Add request_uri parameter according to: https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps

Support:

  1. Shared GitHub apps with multiple Jenkins instances.
  2. Custom OAuth proxy setup.

Just to comment, GitHub App now does support multiple callback domains, so the proxy scenario is less likely. Still made the value overridable just in case, but the default will be the correct route for the server.

  • [x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!

  • [x] Ensure that the pull request title represents the desired changelog entry

  • [x] Please describe what you did

  • [x] Link to relevant issues in GitHub or Jira

  • [x] Link to relevant pull requests, esp. upstream and downstream changes

  • [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

  • [x] Manually test mechanism (Tested redirect, manual conf, and JCasc with both valid an invalid values)

tdaniely-dn avatar Aug 05 '22 11:08 tdaniely-dn

@basil can you take a look? @fred-vogt @Moofasax fyi

tdaniely-dn avatar Aug 05 '22 13:08 tdaniely-dn

Hi @tdaniely-dn, as of https://github.com/jenkins-infra/repository-permissions-updater/pull/2590 I have removed myself from the list of maintainers for this plugin. I no longer have write access to merge PRs, and I no longer have Artifactory access to perform releases.

If the changes from this PR work, you can consider adopting the plugin to merge and release the PR. The "Contributing to Open Source" workshop from DevOps World 2021 is a useful starting point for new maintainers. That document includes links to a five part video series that illustrates many of the steps. If the plugin is crucial to your work, you may want to ask your employer to support your work efforts by allowing you to adopt the plugin.

basil avatar Aug 05 '22 17:08 basil

Hi @tdaniely-dn, as of jenkins-infra/repository-permissions-updater#2590 I have removed myself from the list of maintainers for this plugin. I no longer have write access to merge PRs, and I no longer have Artifactory access to perform releases.

If the changes from this PR work, you can consider adopting the plugin to merge and release the PR. The "Contributing to Open Source" workshop from DevOps World 2021 is a useful starting point for new maintainers. That document includes links to a five part video series that illustrates many of the steps. If the plugin is crucial to your work, you may want to ask your employer to support your work efforts by allowing you to adopt the plugin.

@basil Thank you for the references, and thank you for the contributions. I'll look into adopting.

tdaniely-dn avatar Aug 05 '22 20:08 tdaniely-dn

Oh nice @tdaniely-dn, we would love to have this as part of the standard!!!!

Moofasax avatar Apr 20 '23 20:04 Moofasax

@tdaniely-dn, this is really cool feature. Hope we can get this soon!

idrislaw avatar May 22 '23 19:05 idrislaw

@Moofasax and @idrislaw the comment from the earlier message applies to you as well. You could adopt the plugin, merge the pull request, and release it. It would help you and help the Jenkins community.

If the changes from this PR work, you can consider adopting the plugin to merge and release the PR. The "Contributing to Open Source" workshop from DevOps World 2021 is a useful starting point for new maintainers. That document includes links to a five part video series that illustrates many of the steps. If the plugin is crucial to your work, you may want to ask your employer to support your work efforts by allowing you to adopt the plugin.

If you'd prefer a more polished tutorial, the "Improve a Plugin" tutorial provides some of the same information in a more polished form.

If you're not able to adopt the plugin, you could also install the most recent build of the plugin on your controller and report the results of using it. That would meet your needs and provide feedback to others that you've tested the plugin and confirmed that the feature works in a way that meets your needs.

MarkEWaite avatar May 22 '23 21:05 MarkEWaite

@MarkEWaite thanks for this, I will take a look. I don't know much Java, but I'll check out those links.

We have been using this PR in production with the latest LTS version (2.387.3-lts) of Jenkins. We run about 15 or 20 separate Jenkins instances, with tons of other plugins on them and haven't had any issues with this PR!

I can send screenshots of it installed, or if I can provide anymore feedback on its function, let me know!!

Moofasax avatar May 23 '23 02:05 Moofasax

I'm trying to automate a lot of new jenkins to automatically launch and allow them to authenticate with github oauth. For that, it seems that you need to set the redirect_url parameter mentioned in this issue. This ticket has been updated until recently, how can I use it?

itjobs-levi avatar Aug 09 '23 00:08 itjobs-levi

I am using the plugin that includes the redirect_uri function in jenkins 2.401.3 version. It works very nice. I hope that the plugin with this feature will be officially released soon :)

itjobs-levi avatar Aug 28 '23 08:08 itjobs-levi