Client secret cannot be overridden

Created on 24 October 2023, 8 months ago

Problem/Motivation

Since upgrading to Drupal 10 and v2 of this module, I can no longer override the client secret, I guess because it's now mandatory to use a key via the Key module. The error I get is:

Error: Call to a member function getKeyValue() on null in Drupal\openid_connect_windows_aad\Plugin\OpenIDConnectClient\WindowsAad->getRequestOptions()

However, I was happily using Acquia's secret settings file for sensitive value overrides per environment. By using a mandatory key, I now need to use an environment variable, which I don't think is as secure and not recommended by Acquia.

Steps to reproduce

Attempt to override the client secret using a config override - eg:
$config['openid_connect.client.windows_aad']['settings']['client_secret'] = 'override';

Proposed resolution

Make using a key via the Key module for the client secret optional, and allow it to be overridden via a config override.

FYI I also tried overriding a key's value from the Key module, but it doesn't work (I guess this is by design):
$config['key']['key']['openid_connect_windows_aad_key']['key_provider_settings']['key_value'] = 'override';

✨ Feature request
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom djvern

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024