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

How use ENV variables to define other settings keys not exposed (non standard & plugin settings) #517

Open
f-leclere opened this issue Mar 1, 2024 · 3 comments

Comments

@f-leclere
Copy link

Hi,
thank's for this oidc plugin.

to automate fully website deployment, how is it possible to define other settings (below list) using ENV ?

need of ENV definition for settings keys:

			// Non-standard settings.
			'no_sslverify'    => 0,
			'http_request_timeout' => 5,
			'identity_key'    => 'preferred_username',
			'nickname_key'    => 'preferred_username',
			'email_format'       => '{email}',
			'displayname_format' => '',
			'identify_with_username' => false,

			// Plugin settings.
			'alternate_redirect_uri' => 0,
			'token_refresh_enable' => 1,
			'enable_logging'  => 0,
			'log_limit'       => 1000,

Regards

@timnolte
Copy link
Collaborator

timnolte commented Mar 1, 2024

Given the nonsensitive nature of those settings I haven't felt the need to make those available in the ENV as I generally end up thinking of just using the WP-CFM plugin and these settings are committed to configuration that is deployed and loaded as part of a deployment.

https://wordpress.org/plugins/wp-cfm/

I'll have to double check elsewhere as some of those might have hooks that could be used to set them from ENV. For those not available we'll have to expand the ENV support with additional code changes.

@f-leclere
Copy link
Author

thanks for wp-cfm link, i'll take a look on.

for more explainations,
our context is containers with gitops deployment process (w/o any interruption), we're using ci/cd, kustomize/kapp or ArgoCd/Flux to deploy. Website deployment is using ENV vars, PHP_define and wp-cli actions.
Config values and secret are centralized in secure vault and inserted as ENV.

@timnolte
Copy link
Collaborator

timnolte commented Mar 1, 2024

@f-leclere yep, totally get it, we do something similar which is actually why I originally submitted the changes for the plugin before I took over primary maintenance to add ENV support for most of the settings. It shouldn't actually take much to get those additional settings covered so I'll take a look at that.

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