Skip to content

Commit 09afced

Browse files
committed
Update setting names
1 parent bf5cbcb commit 09afced

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Key types and providers for OS2Web built on the [Key module](https://www.drupal.org/project/key).
44

55
The OS2Web key module provides two _key types_, [Certificate](#certificate) and [OpenID Connect
6-
(OIDC)](#openid-connect-oidc). Two _key providers_, [Azure Key Vault](#azure-key-vault) and
7-
[HashiCorp Vault](#hashicorp-vault), are planned, but not yet implemented.
6+
(OIDC)](#openid-connect-oidc). It also comes with two _key providers_,
7+
[Azure Key Vault](#azure-key-vault) and [HashiCorp Vault](#hashicorp-vault).
88

99
See [the Key Developer Guide](https://www.drupal.org/docs/contributed-modules/key/developer-guide) for details in how to
1010
use keys in Drupal.
@@ -117,6 +117,14 @@ Used for fetching certificate from Azure Key vault.
117117
Used to fetch any sort of secret string from HashiCorp vault. Note that
118118
this can only provide string values, i.e. no binary files.
119119

120+
To use this provider you must configure the following in `settings.local.php`:
121+
122+
``` php
123+
$settings['os2web_vault_role_id'] = '{ROLE_ID}';
124+
$settings['os2web_vault_secret_id'] = '{SECRET_ID}';
125+
$settings['os2web_vault_url'] = '{VAULT_URL}';
126+
```
127+
120128
## Coding standards
121129

122130
Our coding are checked by GitHub Actions (cf. [.github/workflows/pr.yml](.github/workflows/pr.yml)). Use the commands

src/Plugin/KeyProvider/VaultKeyProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public function defaultConfiguration(): array {
100100
* {@inheritdoc}
101101
*/
102102
public function getKeyValue(KeyInterface $key) {
103-
$roleId = Settings::get('itkdev_vault_role_id');
104-
$secretId = Settings::get('itkdev_vault_secret_id');
103+
$roleId = Settings::get('os2web_vault_role_id');
104+
$secretId = Settings::get('os2web_vault_secret_id');
105105

106106
$vault = $this->getVault();
107107

@@ -250,7 +250,7 @@ private function getVault(): VaultClient {
250250
requestFactory: $httpFactory,
251251
streamFactory: $httpFactory,
252252
cache: $this->cache,
253-
vaultUrl: Settings::get('itkdev_vault_url'),
253+
vaultUrl: Settings::get('os2web_vault_url'),
254254
);
255255
}
256256

0 commit comments

Comments
 (0)