8000 [KEYCLOAK-13171] - Add Apple identity provider by ebondu · Pull Request #7323 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

[KEYCLOAK-13171] - Add Apple identity provider - #7323

Closed
ebondu wants to merge 3 commits into
keycloak:mainfrom
ebondu:KEYCLOAK-13171
Closed

ebondu wants to merge 3 commits into
keycloak:mainfrom
ebondu:KEYCLOAK-13171

Conversation

@ebondu
@ebondu ebondu commented Aug 6, 2020
Copy link
Copy Markdown
Contributor

[KEYCLOAK-13171] - Add Apple identity provider

@pedroigor pedroigor added kind/feature Categorizes a PR related to a new feature area/ui and removed area/ui labels Aug 7, 2020
@pedroigor pedroigor added the status/needs-discussion PR needs discussion on developer mailing list label Aug 7, 2020
@ebondu
ebondu force-pushed the KEYCLOAK-13171 branch 2 times, most recently from c477fa2 to 85369f7 Compare August 7, 2020 15:13
@jan-berge-ommedal jan-berge-ommedal left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see that somebody is implementing an apple identity provider in keycloak! After having tested your branch, I have some feedback on the AppleIdentityProvider class:

@esiqveland
Copy link
Copy Markdown

Hi, thank you for contributing this. We have been testing this provider for the last week, and found something interesting:

It seems that Apples 'Login With Apple' only includes name/email on the first login done through their OpenID provider.

Subsequent logins will not give out a name nor email.

Do you have any thoughts on how to handle this for an AppleID provider?

@ebondu
ebondu commented Sep 14, 2020
Copy link
Copy Markdown
Contributor Author

@esiqveland, you are right Apple only provide email/name on the first login if scopes are correctly set. If you don't ask these scopes at the first time, users need to remove the association between the account and the application. That is why the provider default scopes are email+mail. There is no other option to update refresh email/name as long as Apple does not provide a user endpoint.

@doublechecker
Copy link
Copy Markdown

We would love to see this asap. SIWA is such a highly required feature for our Product but we cannot use it due to the fact keycloak cannot handle this.

@salamati-ehsan
salamati-ehsan commented Oct 1, 2020 •
Copy link
Copy Markdown

Any estimate on when this feature is going to be released?

@nicolasbenoist
Copy link
Copy Markdown

Any news on this ? Our app is currently blocked by Apple because we don't support SIWA.... We tried to negotiate but Apple is not answering anymore.

@doublechecker
8000
Copy link
Copy Markdown

@nicolasbenoist Exactly the same problem on our side. We need this feature ASAP and would be great if we can get at least an estimation on when its ready.

@ebiscardi
Copy link
Copy Markdown

If you haven't done it yet, take a look at this extension, for now we have solved with this:
https://github.com/BenjaminFavre/keycloak-apple-social-identity-provider/

We had to make a further modification to be able to insert the text 'Sign in with Apple' on the button. Without this, Apple rejected
our app. I have described in this thread what we have done:
https://keycloak.discourse.group/t/sign-in-with-apple/119/50?u=ebiscardi

@jpmastermind
Copy link
Copy Markdown

Hi guys, any update/estimate on this?

@doublechecker
Copy link
Copy Markdown

Still no progress on this. Too sad ;(

@SalahAdDin
Copy link
Copy Markdown

@ebondu Any ETA about this?
I was trying to implement the Benjamin Favre's provider, but it has a lot of issues now.

@ebondu
ebondu commented Feb 8, 2021
Copy link
Copy Markdown
Contributor Author

@SalahAdDin unfortunately, I have no feedback from keycloak team.
I am stuck since there is no method in KC apis to save the renewed key from the provide. BTW, on my side, the code is still working, renewing tokens every time do not impact performances, and our app has been approved by Apple with this implementation. So to me the MR is almost ready.

@SalahAdDin
Copy link
Copy Markdown

@SalahAdDin unfortunately, I have no feedback from keycloak team.
I am stuck since there is no method in KC apis to save the renewed key from the provide. BTW, on my side, the code is still working, renewing tokens every time do not impact performances, and our app has been approved by Apple with this implementation. So to me the MR is almost ready.

How do you handle the lack of so method?

@ebondu
ebondu commented Feb 8, 2021
Copy link
Copy Markdown
Contributor Author

To handle this lack, we renew the token each time instead of renewing the token if needed plus saving it to the db. It can be viewed as a possible optimization to save the token.

@pedroigor
Copy link
Copy Markdown
Contributor

@ebondu Sorry for the long time ...

I would like to resume discussions. I noticed that you got a lot of feedback.

I also noted that people mentioned about https://github.com/BenjaminFavre/keycloak-apple-social-identity-provider. Your implementation looks much more complete. Do you think is there anything we can borrow from there?

I'll be testing locally and try running the provider in our CI.

@henry2man
Copy link
Copy Markdown

@henry2man that's kinda stupid on Apple's part, as it would look pretty daft to include "Sign in with" only on the Apple button, but not for other providers. Then it would also look quite daft repeating "Sign in" on all the buttons, when it's already in the header.

@stianst I agree that in that sense the current implementation is perfect and usable. I only wanted to provide another vision and, at least, expose a possible problem that could occur.

Personally I would stay with the current aesthetic, perhaps just adjusting the background colors on the buttons so that they can be easily identified by users.

@stianst
stianst commented Nov 1, 2021
Copy link
Copy Markdown
Contributor

@henry2man that's kinda stupid on Apple's part, as it would look pretty daft to include "Sign in with" only on the Apple button, but not for other providers. Then it would also look quite daft repeating "Sign in" on all the buttons, when it's already in the header.

@stianst I agree that in that sense the current implementation is perfect and usable. I only wanted to provide another vision and, at least, expose a possible problem that could occur.

Personally I would stay with the current aesthetic, perhaps just adjusting the background colors on the buttons so that they can be easily identified by users.

With regards to styling and background colours, we just use PatternFly as the style and don't want to defer from that, but I do agree that the styling is not ideal as buttons don't really stand out as buttons.

@MarkusWendorf
Copy link
Copy Markdown

What is the current state of this PR? What needs to be done?

@big-mike-88
Copy link
Copy Markdown

What is the current state of this PR? What needs to be done?

@MarkusWendorf it looks like there's just some clean code/aesthetic changes that need to be approved, from what I am reading. Should be any day now, I suppose? SIWA for Keycloak would be a godsend for me as well.

@big-mike-88
Copy link
Copy Markdown

Yikes my previous comment aged very poorly. Saying "any day now" seems to bring bad karma.

@pedroigor @ebondu is there anything else that needs to be done other than that change request? My deadlines are approaching and I'm almost tempted to just yolo-build this branch and use it instead of the official versions.

@ebondu
ebondu commented Dec 6, 2021
Copy link
Copy Markdown
Contributor Author

@mihaipoenaru, to me there is nothing to change in the MR. The style/icon point was not relevant because anyone who wants to publish an app using the apple provider will have to customize the login page css to comply to Apple requirements. From my understanding, the last step was on KC team side (get apple credentials for their internal CI and test the provider).

@big-mike-88
Copy link
Copy Markdown

Thanks, @ebondu ! So if the KC team doesn't get it done soon, I should be fine with just building it on my own and publishing this branch's image to my corporate docker registry?

@zak905
zak905 commented Dec 6, 2021
Copy link
Copy Markdown
Contributor

@mihaipoenaru , FYI, there is already a keycloak extension for apple sign in: https://github.com/BenjaminFavre/keycloak-apple-social-identity-provider

You can use it in the meanwhile, and no need to build your own custom keycloak distribution.

@paultempleman
Copy link
Copy Markdown

@pedroigor @ebondu any update on where the testing is of this is with the KC team. Quite a lot of us patiently waiting for this to get into a release.

@big-mike-88
Copy link
Copy Markdown

@pedroigor @ebondu any update on where the testing is of this is with the KC team. Quite a lot of us patiently waiting for this to get into a release.

Checking this page has become my new morning routine

@pedroigor pedroigor removed their assignment Jan 19, 2022
@klausbetz
Copy link
Copy Markdown
Contributor

This might be interesting for some of you.
Since this PR is open for quite a while now, I created an extension that enables Sign in with Apple for web-based applications and token-exchange as well (which can be interesting for native Apps like iOS).
https://github.com/klausbetz/apple-identity-provider-keycloak

I still hope that the keycloak team manages to release their own version of SIWA, which should be more mature @pedroigor

@Jonas-Sander
Copy link
Copy Markdown

Is this feature still planned by the Keycloack team?
Even if not I would wish for some clear communication.

Personally I'm currently evaluating Keycloack as an alternative to Firebase Auth for an already existing mobile app.
We already use Apple Sign-In so any new solution would require it as well.
I would much rather use an official Apple identity provider instead of using something from an unknown GitHub user.

@SalahAdDin
Copy link
Copy Markdown

Is this feature still planned by the Keycloack team? Even if not I would wish for some clear communication.

Personally I'm currently evaluating Keycloack as an alternative to Firebase Auth for an already existing mobile app. We already use Apple Sign-In so any new solution would require it as well. I would much rather use an official Apple identity provider instead of using something from an unknown GitHub user.

@ebondu, @pedroigor asked f 10BC8 or one change on it, can you check it?

@JayAhn2
JayAhn2 commented Aug 17, 2022
Copy link
Copy Markdown

Apple Login is mandatory to any IOS project, so we desperately needs native apple IDP support.

@pedroigor
Copy link
Copy Markdown
Contributor

We discussed this several times. For me, it is more than proven the interest in this broker and its readiness to get merged.

The problem though is testing. That is the only reason.

@stianst Based on what we discussed, we can't afford to merge it without test coverage. One of the suggestions here is to offer this broker as a official extension. Wdyt?

@stianst
stianst commented Aug 29, 2022
Copy link
Copy Markdown
Contributor

@pedroigor if we can get a user created so we can automate testing I'd say we can move ahead with this one. Ideal would probably to start running the SocialTests with GA instead of the internal pipeline, to make it easier to maintain and allow the community to see test results.

@pedroigor
Copy link
Copy Markdown
Contributor

@stianst What is blocking this one is exactly the possibility to have an apple identity set to test the broker. From the discussions herein, it seems Apple Developer Program is paid.

@stianst
stianst commented Aug 29, 2022
Copy link
Copy Markdown
Contributor

@pedroigor read through all the comments so far. Options I see:

  • Check if there's some sandbox thing that works
  • Check if we can get a fee waiver from Apple by sending an email asking
  • Check if we can get budget to create one account for this purpose
  • Maybe someone from the community could setup a client for us that we could use
  • Just merge it without automated testing. My least favourite option as not only won't we have continuous testing, but we also won't be able to check/fix it if it becomes broken

@ebondu
ebondu commented Sep 7, 2022
Copy link
Copy Markdown
Contributor Author

@stianst Thanks for the review.

An important point to me is that the SIWA requires the 2FA (even with a sandbox account) so I don't think that will be compatible with automated tests. Even by paying the 99$ to get your own account/conf, you will have to finalize the auth by typing a SMS code. Does Apple is the only one to require 2FA ? If not, how do you test 2FA with other providers ?

As explain before, It is OK to me to share a working social.properties but that does not solve the 2FA problem. As an alternate solution, I can run this test when needed and share the results with you ?

@stianst
10BC8
stianst commented Sep 8, 2022
Copy link
Copy Markdown
Contributor

@stianst Thanks for the review.

An important point to me is that the SIWA requires the 2FA (even with a sandbox account) so I don't think that will be compatible with automated tests. Even by paying the 99$ to get your own account/conf, you will have to finalize the auth by typing a SMS code. Does Apple is the only one to require 2FA ? If not, how do you test 2FA with other providers ?

As explain before, It is OK to me to share a working social.properties but that does not solve the 2FA problem. As an alternate solution, I can run this test when needed and share the results with you ?

Missed the part around 2FA, but that is a real PITA for sure, as Apple has then basically made it impossible for anyone to continuously test the integration. Have you tried to reach out to Apple around this?

@stianst
stianst commented Sep 8, 2022
Copy link
Copy Markdown
Contributor

As we are not getting anywhere around continuous testing integration, and also Keycloak developers do not have access to Apple developer accounts, we are not able to merge this PR. From past discussions I don't see how this will change.

I'm sorry to disappoint everyone that where hoping for this to be merged, and also sorry that it taken so long for us to come to a conclusion.

It is not all bad news though. A better path forward is a community maintained extension, and here there seems to already be a great extension available:

https://github.com/BenjaminFavre/keycloak-apple-social-identity-provider

I have just tested this one out (as much as I could without an Apple account) and it looks like it's working just fine on the Quarkus distribution.

@stianst
stianst commented Sep 8, 2022
Copy link
Copy Markdown
Contributor

I've opened an issue BenjaminFavre/keycloak-apple-social-identity-provider#29 to request this extension to be listed on https://www.keycloak.org/extensions.html.

Going forward we will also put some effort into cleaning up how extensions are advertised on keycloak.org, and make it a lot more prominent.

@stianst stianst closed this Sep 8, 2022
@DaSchTour
Copy link
Copy Markdown

The mentioned extension doesn't look very well maintained. That's really disappointing development.

Is there any plan for keycloak to somehow close the increasing gap towards services like Auth0 which have better browser and mobile app tooling, better documentation, more built in providers and so on?

@stianst
stianst commented Sep 8, 2022
Copy link
Copy Markdown
Contributor

The mentioned extension doesn't look very well maintained. That's really disappointing development.

Here's an alternative extension:
https://github.com/klausbetz/apple-identity-provider-keycloak

If neither of these fits are good enough, then why not fork (or start from scratch) and provide a better maintained extension?

We would love to provide a better story around extensions and can start thinking about how we can achieve it. Including how to test extensions, how they are delivered/installed, etc. We could even consider pulling some "officially" blessed extensions into the Keycloak organization assuming we have sufficient maintainers on the individual extensions.

Is there any plan for keycloak to somehow close the increasing gap towards services like Auth0 which have better browser and mobile app tooling, better documentation, more built in providers and so on?

In terms of more built in providers, why do they have to be built-in? Why wouldn't a marketplace/community-maintained extensions fit the bill perfectly here?

For your other comments that is a bit out of the scope of this PRs, but for sure we would also like to see improvements in these areas. Suggest improvements, contribute improvements, build a community extension/project, etc.. This is a open source community after all, so can we not work on improving these things together?

@ebondu
ebondu commented Sep 8, 2022
Copy link
Copy Markdown
Contributor Author

From what I saw, lot of community extensions are only maintained by few peoples with many versions doing almost the same thing. For companies that are expecting quality, it is more relavant to rely on the official keycloak community rather than testing all existing extensions and picking one hopping someone will maintained it. Moreover extensions to enable SIWA would not have been developed if an official one existed.

@stianst I understand your CI & automatic E2E tests requirements so I can't blame you to reject the PR but I guess the problem will be the same with other extensions and/or any providers working with 2FA. If unit tests are not enough in that cases, you are right the SIWA can't be merged.

I will continue to maintain the provider on my side because it is already working in production here (on the latest quarkus version) but I am not sure to provide it as an extension because of existing ones and because I already lost a lot time trying to share it with the official community.

@SalahAdDin
Copy link
Copy Markdown

From what I saw, a lot of community extensions are only maintained by a few people with many versions doing almost the same thing. For companies that are expecting quality, it is more relevant to rely on the official keycloak community rather than testing all existing extensions and picking one hoping someone will maintain it. Moreover, extensions to enable SIWA would not have been developed if an official one existed.

@stianst I understand your CI & automatic E2E tests requirements so I can't blame you to reject the PR but I guess the problem will be the same with other extensions and/or any providers working with 2FA. If unit tests are not enough in that cases, you are right the SIWA can't be merged.

I will continue to maintain the provider on my side because it is already working in production here (on the latest quarkus version) but I am not sure to provide it as an extension because of existing ones and because I already lost a lot of time trying to share it with the official community.

But it seems they are not interested on make this provider functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes a PR related to a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0