-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Allow override of baseUrl and apiUrl in GitHub identity provider #7021
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
Allow override of baseUrl and apiUrl in GitHub identity provider #7021
Conversation
1cdc177
to
63694e5
Compare
63694e5
to
2663784
Compare
Hi @stianst, I pushed updated commit to add unit test for my suggested changes. Please review. |
This PR is for https://issues.redhat.com/browse/KEYCLOAK-13828 |
@stianst Is there anything else I need to get this PR approved and merged? |
At first glance this looks good, we just need to find someone to do a deeper review for this one |
@stianst any traction on getting a deeper review of this PR? Maybe @EricWittmann could help? this change is pretty straight forward, but then I am biased. |
Looks pretty good to me. It would be good to make the same changes for GitLab as well (along with any other identity providers that have "enteprise" versions). Not sure how much of deep dive is needed here - the test is reasonable. |
Will try to review by the end of this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
services/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java
Show resolved
Hide resolved
services/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java
Show resolved
Hide resolved
services/src/test/java/org/keycloak/social/github/GitHubIdentityProviderTest.java
Outdated
Show resolved
Hide resolved
...c/main/resources/theme/base/admin/resources/partials/realm-identity-provider-github-ext.html
Outdated
Show resolved
Hide resolved
services/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java
Show resolved
Hide resolved
services/src/test/java/org/keycloak/social/github/GitHubIdentityProviderTest.java
Outdated
Show resolved
Hide resolved
services/src/test/java/org/keycloak/social/github/GitHubIdentityProviderTest.java
Show resolved
Hide resolved
2663784
to
722323f
Compare
@nngo I'm sorry for delayed response. Added a few comments. |
…provider * Add partial github-ext.html fragment to allow user to override the GitHub identity provider's base URL and api URL (this allows using a custom GitHub Enterprise server. * using generic identity-provider.base-url* and identity-provider.api-url* in admin-messages_en.properties so that this could also be used for other identity providers. * add new DEFAUL_*_URL public constants * Add GitHubIdentityProviderTest unit test
722323f
to
2aa5c0d
Compare
Hi Appreciate any feedback on when this functionality will be included. It's stopping us from deploying keycloak and would really appreciate if we have a timeline on when this can be released. Thank you. |
yes, I believe I have already responded to all the comments. I can merge (or rebase) from the latest origin/master branch if you want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nngo Thank you for your response!
From my PoV, in order to merge this we need to:
- Rebase.
- Fix the UI issue – probably remove the override section and put the new fields directly among other fields (see below).
- Remove the empty test method (see below).
- Add a simple social login test. Something like: add GitHub IdP with overridden URLs and check it really tries to access those URLs (maybe non-existing because we do not have access to GitHub Enterprise). Nothing fancy.
...c/main/resources/theme/base/admin/resources/partials/realm-identity-provider-github-ext.html
Outdated
Show resolved
Hide resolved
services/src/test/java/org/keycloak/social/github/GitHubIdentityProviderTest.java
Outdated
Show resolved
Hide resolved
@nngo would you like to move forward with this change? |
* it is tested in testGitHubIdentityProvider()
* i.e. no longer hide it in a collapsed section
…-enterprise-intergration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nngo Thank you for the update and sorry for late response. LGTM.
And thanks to @nehachopra27 for testing it!
thanks @abstractj looking forward to this getting into the next Keycloak release |
against a GitHub Enterprise server using an overridable/configurable fields for:
GitHub identity provider's base URL and api URL (this allows using
a custom GitHub Enterprise server.
in admin-messages_en.properties and html fragment so that these
could also be used for other identity providers.
Closes #11144