Paging @nikosdion
When trying to add YubiKey to Joomla 4.0-dev @ fdab2c0
At the moment I press-to-activate my YubiKey
It works without Internal Server Errors.
Safari and Google Chrome on Mac
For those wanting to try YOU NEED A SSL ON YOUR SITE for the option to appear.
Skill up and let me introduce Ngrok ;-) You can do this with ngrok to tunnel back to your computer using their SSL certificate. A simple ngrok http 80
on your computer already running Joomla on port 80 will give you a SSL URL provided by ngrok like https://4d5342c09c3ea.ngrok.io
, when you go to that url (yours will be different) you will see YOUR Joomla Site on YOUR computer :) - full details https://ngrok.com
Labels |
Added:
?
|
Title |
|
Apparently version 2 of the WebAuthn library has a dependency on GMP that is not listed on the library itself but one if its dependencies, namely spomky-labs/cbor-php
. I cannot find a polyfill for it.
IMHO, the correct approach to this is list GMP as an optional requirement, if you want to use WebAuthn. It's not a big deal on real world sites; I've yet to come across a server where GMP is not installed by default and I'm dealing with some terrifyingly crappy hosts when doing support for my clients.
As for local server, um, both MAMP Pro and HomeBrew seem to install it by default. I don't have access to XAMPP or WAMPserver but someone could check that. I know that official PHP binaries on Windows do bundle gmp and seem to enable it by default – at least that's what I remember from a few months ago when I did an IIS, MySQL and PPH installation from scratch. On Ubuntu the default package doesn't include much and you do need to install the individual module packages so, yeah, we need to tell people that this is a requirement for WebAuthn, one that they don't even list in their library but, hey, what can you do? Crypto needs big integer math.
I can confirm that a default install of php on windows has GMP enabled
Thank you, Brian!
Actually I might not be 100% correct. It is enabled on mine. The only things I have ever changed were the things mentioned in your blog post and things specifically reported as needed by joomla.
I never mentioned GMP since I wasn't (aware that I may have been) using it anywhere and Joomla definitely didn't mention it by name. So it must have been enabled by default. That's also what I remembered.
GMP is an optional PHP module like XML and mbstring (both of which are listed as system requirements of Joomla).
SOME people/webhosts/maintainers enabled it by default, some are free to not to. PHP will work without GMP and therefore "someone" has to make the conscious decision to enable GMP in an installation - that decision, it seems, is currently being made before the web hosting customers ask for it.
On a cPanel based server, in Easy Apache 4, GMP is not selected by default. Therefore anyone on a cPanel server will need to have this enabled by the server admin when using WHM.
Furthermore the OFFICIAL JOOMLA docker images do not have the GMP module installed or enabled by default.
Anyways... Im sure being able to detect is the module is not installed and showing something better than an Internal Server Error is just a few lines of code right? That would fix this reported issue.
Then maybe we can get Joomla to update their system requirements pages, and documentation around this feature too ?
Feel free to make a PR for disabling the login button and the backend interface when GMP is not enabled and at-mention me so I can test it.
Added to the updated system requirements page too
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-21 11:37:46 |
Closed_By | ⇒ | PhilETaylor |
As I just upgraded php I checked again and by default gmp is not enabled with php 7.4.7
But it is shipped with the standard PHP for Windows distribution, right?
Yes it is shipped - you just need to uncomment it in the ini
Thank you! That makes it fairly feasible. It would be an entirely different ball game if we had to ask the user to go to PECL and figure out how to download and install the module's DLL :)
GMP is not installed in any of the official Joomla docker images.. Im working on that.
Looks to be a requirement of
gmp
being installed as a php module ..No such requirement is in the Joomla 4 System Requirements and no warning is given elsewhere that its needed
https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4#Updated_System_Requirements
After installing GMP for php 7.4 I was able to register my Yubikey.
GMP is an optional module for PHP, thus Joomla 4 needs to either warn that GMP is needed for WebAuth, pollyfill it, update the minimum requirements of Joomla, disable the WebAuth features if no GMP found, or hire some fluffy rabbits for developers to play with .