-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
I was looking through the test results and fixed the sample config check, but I think the other one is a build system error. |
Generally the code seems pretty reasonable, is there an MSC for using hcaptcha? |
@clokep what changes are you looking for? |
It probably requires a proper MSC to be made first and then some vendor-prefixing added here until the MSC lands. |
I think the only place here where it's needed is the login type: it can't use the |
@tulir Gotcha, I'll update it to reflect that, thanks for the feed back! ( I'll double check that's the only spot too.) |
…atrix auth standard yet and is related to msc2745.
@tulir @clokep The only other thing I noticed is that there is a twister test for the current recaptcha implementation. Should I update that test to add testing support for hcaptcha? Auth Test Implementation Where the test is actually used Line 34 I'm still looking through the current test implementation for what it does exactly. |
Oops, sorry about that! I think I failed to comment after moving around some labels. First off, thanks for putting this together, overall it looks fairly reasonable! Some questions/thoughts in my mind:
Thanks for making the changes to use an unstable endpoints / identifiers! I'm not really sure what to do about the fallback endpoint here. It seems hard implementation wise to only have this show up as unstable, so probably ignore that for the moment. |
@clokep No problem, I was hoping that this would skate by without a more abstraction implementation. I was thinking about making it more of a template style of implementation, but that's only really good for captcha's that are implemented in almost the same exact way as recaptcha. The ideal thing would be to template out all of the special call back names as an additional config param and make it a one size fits all solution? (since that is the only thing that seems to be hard coded in the template for recaptcha and related tests). I'm going to take a look at trying to template that out and maybe do a nice clean up of the config. I'll get back to you in a bit and update my production environment to test it out and see if it works. Looks like the script, callback data/class name need to be made into a template in And I'll follow up with some updates if everything seems to work. |
@MarkPugner79 that sounds about like what I was thinking! 👍 If it turns out to be extremely difficult, please do shout, but I think it is mostly making a few more things configurable! |
Brief update: Tracked down that I need to be able to template the main reg page and found it The short list of stuff I was looking at adding are: Those need to be peppered into a few of the registration flows and a few other spots that I've tracked down. If you have some pointers or feedback let me know. Thanks! ... |
This isn't the main registration page, it is an unspecced fallback page. Looking at it...it seems to assume an awful lot about the registration flow. I'm not sure we would require changes to that to accept this. See #7676 for more info (which says this page is straight-up broken so 🤷 ). |
I'm still trying to track down how
The recaptcha part of the spec covers very little To make this work as expected we would/should add a altcaptcha config with params as I've outlined(similar to my current hcaptcha commits), since it isn't ReCaptcha, it uses the fallback api's and works for authentication by opening a new tab/window and integrates cleanly with the auth flows. I'm probably going to close this PR after further investigation into what it would take to retool the current recaptcha implementation it's too tightly integrated into element to abstract out and use other captcha's at this point. It seems like adding another auth/registration flow similar to my hcaptcha work flow with some of the abstractions will be the more correct answer of how to implement generic captcha support. ReCaptcha is baked into https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/components/views/auth/CaptchaForm.js and several other parts for those in the future that want to work on this problem. |
Right, so this brings us back around to the conversation in matrix-org/matrix-doc#1281. It might be reasonable to simply add hcaptcha support to matrix-js-sdk also...but it might make sense to get a bit more decision on the MSC first. |
@clokep I need to look at how much can be passed from matrix to the ui/client, might be able to make a generic captcha interface for cleaner integration of other captchas. |
This would be my hope! I believe the fallback page is already implemented in this PR, so hopefully that Just Works without client support, but 🤷 |
@clokep the fall back does work from testing it in production 👍 |
I might shoe horn hcaptcha as a suggested alternative captcha and keep working on this PR after doing some more testing with some other captcha systems. Will update after more testing. |
Good news, added a bunch of new stuff that I've been testing such as:
New stuff to support most recaptcha/hcaptcha like api's:
What I have tested it with: hCaptcha Works fine MtCaptcha DOES NOT WORK They use a GET request api, which means splitting out and doing a one off param for their api. Aside from adding some type of lambda functions for everything in the config that's about as good as I think it's going to get. I need to clean up a bunch of stuff and I'll commit the changes for comment. |
…out generic support.
This should be removed for the PR as it is no longer used.
@MarkPugner79 Just shout when you think this is ready for someone to take a look at. |
@clokep I think it's at a good functional point for initial feedback. I haven't added any tests since I don't think there is a graceful way to handle testing. |
+1, waiting for this to enter the release. |
I haven't done an in-depth review, but I think it looks reasonable overall. The main blocker is that there's no MSC for the "altcaptcha" proposed in this PR. |
As @clokep said this seems reasonable. However, we're not comfortable merging this until the MSC has been merged, or at least further along. (This is to ensure that we don't end up a) merging code that doesn't really get used and b) to ensure that proposals don't get de-facto standardised by being in implementations.) I think the next steps here are to address the comments in Thanks for spending the time here! Having a working implementation is a prerequisite of an MSC being merged, so this isn't wasted effort at all :) |
As per my comment above, I think this is blocked on responding to the MSC, so I'm going to close this for now. |
…il.com
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.