Secure configuration
Description
Environment
Potential Workaround
blocks
continues
defines
relates to
Checklist
hideTestRail: Results
Activity

Marc Johnson March 16, 2023 at 5:09 PM
Thanks for adding to the documentation

Mike Taylor March 16, 2023 at 4:29 PMEdited
I added the substance of the explanatory comment as a new Appendix A to the existing document Porting your module from mod-configuration to mod-settings.

Mike Taylor March 2, 2023 at 3:25 PMEdited
Thanks, Marc, good to know. Yes, at present mod-ldp stores stuff like database connection details in its own very simple key-value facility at /ldp/config
. We should probably switch that to use mod-settings when we have the spare time.

Marc Johnson March 2, 2023 at 1:11 PM
Thanks for your responses.
Yes, granular permissions for accessing configuration information is one of the goals of mod-settings. And, yes, the way this is done is by defining scopes.
That is good to know.
The first module to use this was ui-ldp (not mod-ldp!)
I'm not sure it completely answers your questions but this PR in ui-ldp that implements the use of mod-settings
Ah, that's helpful. I guess I misunderstood what settings were going to be stored. I thought it was going to be the database configuration for LDP and I assumed that meant mod-ldp.
I hope that gives your colleagues all they need to get started — if not, they are welcome to ping me directly, or leave a further comment on this issue. (Once this is resolved, I will write up the results as a HOWTO document in the mod-settings repository.)
Much appreciated, thanks, I think the example is probably enough for me and the folks who I've been talking to.

Mike Taylor March 2, 2023 at 10:48 AM
Hi, . Yes, granular permissions for accessing configuration information is one of the goals of mod-settings. And, yes, the way this is done is by defining scopes.
The first module to use this was ui-ldp (not mod-ldp!)
The package file defines four permissions: read and write for each of two scopes, which are named
ui-ldp.admin
(for setting things like the default number of records requested) andui-ldp.queries
(for loading and saving queries).The settings page that maintains record-limits does so by invoking
<ConfigManager>
withscope="ui-ldp.admin"
— the invocation works because that component has been extended to work with mod-settings as well as mod-configuration.Those settings are loaded by fetching
/settings/entries?query=(scope=="ui-ldp.admin" and key=="config")
.A query is is saved by POSTing (for a new query) or PUTting (to overwrite an existing one) to
/settings/entries
a settings record that hasscope: 'ui-ldp.queries'
.Saved queries are loaded by fetching
/settings/entries?query=scope=="ui-ldp.queries"
I hope that gives your colleagues all they need to get started — if not, they are welcome to ping me directly, or leave a further comment on this issue. (Once this is resolved, I will write up the results as a HOWTO document in the mod-settings repository.)
Details
Details
Assignee

Reporter

As discussed outlined in MODCONF-131, we are proceeding in the short term with the approach outlined in https://github.com/MikeTaylor/folio-docs/blob/main/doc/fixing-mod-configuration.md to closing the gaping security hole in mod-configuration. (We leave open the possibility of a different scheme becoming the recommended one across FOLIO once a broader discussion has completed.)