Skip to content

Commit 005653b

Browse files
update docu for custom extra hedaers in cmemc
1 parent 53b8086 commit 005653b

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

  • docs/automate/cmemc-command-line-interface/configuration
    • file-based-configuration
    • getting-credentials-from-external-processes

docs/automate/cmemc-command-line-interface/configuration/file-based-configuration/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,12 @@ Setting this to a PEM file allows for using private Certificate Authorities for
269269
Please refer to [Certificate handling and SSL verification](../certificate-handling-and-ssl-verification/index.md) for more information.
270270

271271
This variable defaults to `$PYTHON_HOME/site-packages/certifi/cacert.pem`.
272+
273+
274+
#### CMEMC_CUSTOM_HEADER_*
275+
276+
Setting this allows all http requests cmemc does to use the specified custom headers as well.
277+
278+
The `CMEMC_CUSTOM_HEADER_` prefix gets stripped from the header, so only `*` will remain.
279+
280+
This variable defaults to `none`

docs/automate/cmemc-command-line-interface/configuration/getting-credentials-from-external-processes/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ In order to get credential information from an external process you need to use
6060
- `OAUTH_PASSWORD_PROCESS`, to set up the process to get the user password when using the `password` grant type.
6161
- `OAUTH_CLIENT_SECRET_PROCESS`, to set up the process to get the client secret when using `client_credentials` grant type .
6262
- `OAUTH_ACCESS_TOKEN_PROCESS`, to set up the process to get the direct access token (`prefetched_token`).
63+
- `CMEMC_CUSTOM_HEADER_*_PROCESS` to set up the process to get custom http headers if needed (the `*` needs to be replaced with the correct header name using all uppercase and `_` instead of `-`, e.g. `CMEMC_CUSTOM_HEADER_CF_ACCESS_TOKEN_PROCESS` for the `cf-access-token` header variable)
6364

6465
The credential executable can use the other cmemc environment keys of the configuration block for fetching the credentials (e.g. `CMEM_BASE_URI` and `OAUTH_USER`).
6566

@@ -87,6 +88,7 @@ OAUTH_CLIENT_ID=cmem-service-account
8788
OAUTH_CLIENT_SECRET_PROCESS=["getpass.sh", "parameter1", "parameter2"]
8889
```
8990

91+
Note: You need to define a named connection for this to take effect. Using the `[DEFAULT]` section fallback will not execute the process.
9092
### Example: MacOS Keychain
9193

9294
Here is a working example with the MacOS Keychain, which can be queried with the command line tool `security`.

0 commit comments

Comments
 (0)