- Issue created by @catch
- πΊπΈUnited States benjifisher Boston area
I agree it is a good idea to have an extra level of authentication before making changes to the codebase, but I think that "password authentication" is too restrictive.
Some sites use single sign-on (SSO) or other methods of authentication, so requiring a password would not be appropriate. On the other hand, it may be that sites using SSO also have dev, stage, and prod versions of the site, so they could use the proposed dev/prod toggle.
It is out of scope for this issue, but I think that Drupal core should provide an authentication API. That would make it possible, in this issue, to let the site owner choose the method of authentication. It would also simplify the
tfa
(Two Factor Authentication) module. - π¬π§United Kingdom mcdruid π¬π§πͺπΊ
Very definitely +1 to the idea of requiring an additional authentication step to install a module via Project Browser to defend against XSS/CSRF attacks.
Benji makes good points about SSO and TFA, and whether requiring the password to be supplied is overly prescriptive; having an API for (re-)authentication would be great.
I can think of other use cases for this too (I'll link to issues I plan to file).
As for being able to toggle the extra protection on/off (e.g. development mode), would it make sense to have this as setting that cannot be altered via the UI?
- π¬π§United Kingdom catch
As for being able to toggle the extra protection on/off (e.g. development mode), would it make sense to have this as setting that cannot be altered via the UI?
I thought about this a bit. If we require re-authentication in project browser, but not when toggling dev mode, then you'd be able to bypass the project browser protection by going to the dev mode UI, which would... not be great. So this either means re-auth before toggling dev mode, or make it CLI-only, or a settings.php flag that determines the behaviour. But I think that is more of a consideration for β¨ Add a Production/Development Toggle To Core Needs work to worry about.
- πΊπΈUnited States chrisfromredfin Portland, Maine
We're not opposed to adding this - but we (a) need to think around SSO/TFA issues that Benji brings up, and (b) I think we need to think through the UI / user flow for this. I would imagine a modal might make the most sense, "interrupting" the process if we're not within the flood limit.
Agree to keep the dev mode settings CLI-only or in settings.php. I think a 'dev mode' UI would be a poor choice. If it's a dev, it's a dev - and you can count on them to modify settings.php, (even an Ambitious Site Builder could do this, IMO) etc.