Three questions from building an AD sign-in module: extension point, ImageSharp pin, two-factor #20342
Replies: 1 comment
|
I looked at these on current 1. External password check There is no hook that replaces the password check inside A module that needs to verify a password against an external directory therefore still has to replace or wrap that login action, as Tor does. A dedicated “external credential validator” that 2. ImageSharp pin On the https://github.com/OrchardCMS/OrchardCore/blob/v3.0.1/Directory.Packages.props 3. Two-factor after an external password check I did not find a supported hook that means “I have already verified the credentials; continue into Orchard’s two-factor page.” Local password login does that via The built-in external login path does not take that step. So refusing directory users who have two-factor enabled is consistent with there being no module API for that handoff. Reproducing Identity’s two-factor cookie ( |
Uh oh!
There was an error while loading. Please reload this page.
I've just published an Active Directory sign-in module for Orchard Core (Tor, announced separately in Show and tell). Building it raised three questions about Orchard itself. None of them is a vulnerability report; they are design and maintenance questions.
1. Is there a supported way for a module to check a password against an external directory?
Tor replaces Orchard's own password check for directory users. To do that it re-implements the sequence in
AccountController.LoginPOSTfor Orchard Core 3.0.1:LoggingInAsync, the password check,ValidatingLoginAsync, the sign-in, thenLoggedInAsyncorLoggingInFailedAsync. That risks drifting from core between releases. Is there, or would the team consider, a supported hook (for example an external credential validator that the login action consults) so modules don't need to copy the login flow?2. Will the ImageSharp pin be raised in a 3.0.x patch release?
As far as I can tell, Orchard Core 3.0.1 ships ImageSharp 3.1.12. My dependency scan lists six advisories against that version, four rated High, with fixes in 3.2.0 or later. ImageSharp 3.2.0 also refuses Release builds in a project that references it directly unless a Six Labors licence key is present. A site that wants the fix today therefore has to take on a key, whereas a bump in Orchard's own pin would reach sites transitively. Is a bump planned, and is there guidance for sites that stay on 3.0.1 in the meantime? (Please correct me if I've misread the advisories or the pin.)
3. Can an external sign-in take part in Orchard's two-factor step?
Tor refuses directory users who have two-factor authentication turned on or required in Orchard, because it has no way to hand off to the two-factor step after it has verified the password. Is there a supported way for an external sign-in module to continue into Orchard's two-factor flow, or is refusing those users the sensible behaviour?
Thanks. Details of what Tor does are in the repository: https://github.com/LaughingDragon/Tor-AD-Authentication
All reactions