Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self activation and configuration via GenericSetup #10

Open
enyachoke opened this issue Jul 6, 2021 · 2 comments
Open

Self activation and configuration via GenericSetup #10

enyachoke opened this issue Jul 6, 2021 · 2 comments

Comments

@enyachoke
Copy link

Thanks for creating this plugin. We are currently planning on using the plugin to provide SSO on SENAITE LIMS. To allow us to easily package our solutions we require that various components are able to auto-initialize themselves. For ftw.oidcauth we would like to have the plugin activate and configure itself. The approach we are taking is using the post_handler of Genericsetup to activate the plugin, set it up as the first challenge plugin and configure it by reading a json file from the filesystem. You can find our attempt at doing this here. This works for us but we could ideally like to have ftw.oidcauth do this itself. So;

  • Is this a reasonable approach
  • Will it be possible to add this functionality as part of ftw.oidcauth
@buchi
Copy link
Member

buchi commented Jul 10, 2021

Thanks for your suggestion.

Adding a GenericSetup install profile sounds reasonable to me. However I'm not very happy with the JSON file approach.
Do you have the requirement to provide the configuration outside of your code?

Basically I see two approaches:

  1. Implement a GenericSetup import/export handler and provide the configuration in an XML file. But this requires the configuration to be part of a GS profile.
  2. Read the configuration from a JSON file on the server as proposed by you. This is more flexible as you can provide the configuration independently from a policy or product. I'm not sure if CLIENT_HOME is the best location as it's specific to a single Zope instance and in a multi-client setup there are multiple client homes. But I don't have a better suggestion.

In the end I'm ok with both approaches. So you're welcome to provide a PR.

@enyachoke
Copy link
Author

Thanks @buchi I will work on the PR taking into account your suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants