|
3 | 3 | Key types and providers for OS2Web built on the [Key module](https://www.drupal.org/project/key).
|
4 | 4 |
|
5 | 5 | 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 [Infisical](#infisical), are |
| 6 | +(OIDC)](#openid-connect-oidc). Two _key providers_, [Azure Key Vault](#azure-key-vault) and [HashiCorp Vault](#hashiCorp-vault), are |
7 | 7 | planned, but not yet implemented.
|
8 | 8 |
|
9 | 9 | See [the Key Developer Guide](https://www.drupal.org/docs/contributed-modules/key/developer-guide) for details in how to
|
@@ -106,13 +106,16 @@ $key = $repository->getKey('openid_connect_ad');
|
106 | 106 |
|
107 | 107 | ## Providers
|
108 | 108 |
|
| 109 | +The module comes with two key providers. |
| 110 | + |
109 | 111 | ### Azure Key Vault
|
110 | 112 |
|
111 |
| -`@todo` <https://azure.microsoft.com/en-us/products/key-vault> |
| 113 | +Used for fetching certificate from Azure Key vault. |
112 | 114 |
|
113 |
| -### Infisical |
| 115 | +### HashiCorp Vault |
114 | 116 |
|
115 |
| -`@todo` <https://infisical.com/> |
| 117 | +Used to fetch any sort of secret string from HashiCorp vault. Note that |
| 118 | +this can only provide string values, i.e. no binary files. |
116 | 119 |
|
117 | 120 | ## Coding standards
|
118 | 121 |
|
@@ -146,3 +149,17 @@ analysis:
|
146 | 149 | ```shell
|
147 | 150 | docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm ./scripts/code-analysis
|
148 | 151 | ```
|
| 152 | + |
| 153 | +## Unit tests |
| 154 | + |
| 155 | +We use [PHPUnit](https://phpunit.de/documentation.html) for unit testing. |
| 156 | + |
| 157 | +Testing mostly centers around the conversion and parsing of certificates. For this purpose a bunch of test |
| 158 | +certificates has been generated. |
| 159 | + |
| 160 | +Running PHPUnit tests in a standalone Drupal module is a bit tricky, so we use a helper script to run the |
| 161 | +analysis: |
| 162 | + |
| 163 | +```shell |
| 164 | +docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm ./scripts/unit-tests |
| 165 | +``` |
0 commit comments