You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**url**| string | yes || The url pointing to the keyfactor platform with no trailing slashes **(example: "https://kftrain.keyfactor.lab")**|
388
+
|**api_path**| string | no |_"KeyfactorAPI"_| The path after the Command instance url to reach the Keyfactor API |
389
+
|**ca**| string | no[^1]||| The certificate authority used when issuing certificates via the plugin **(example: kftrain.keyfactor.lab\\\\keyfactor-KFTRAIN-CA)**|
390
+
|**template**| string | no[^1]|| The certificate template name to use when issuing certificates. It should be issuable by the CA |
|**token_url**| string | no[^3]|| oAuth authentication: Endpoint for retreiving the authentication token |
397
+
|**access_token**| string | no || oAuth access token, if retrieved outside the context of the plugin |
398
+
|**scopes**|[]string (comma separated list) | no || the defined scopes to apply to the retreived token in the oAuth authorization flow. If not provided, all available scopes for the service account will be assigned to the token upon authentication |
399
+
|**audience**|[]string (comma seperated list) | no || the OpenID Connect v1.0 or oAuth v2.0 token audience |
400
+
|**skip_verify**| bool | no |_false_| set this to true to skip checking the CRL list of the HTTPS endpoint |
401
+
| **command_cert_path** | string | no | | set this value to the local path of the CA cert if it is untrusted by the client and skip_verify is false
402
+
403
+
[^1]: The **ca** and **template** fields can be provided via command line parameters. If they are not provided, the plugin will default to what is set in the configuration values. If neither are available an error will occur.
458
404
459
405
#### Basic Authentication Configuration
460
406
461
407
If you are using basic authentication to Keyfactor Command, you will also need to set the following values:
462
408
463
-
- username
464
-
- The username of the account used for authenticating to the platform including the domain **(example: "
465
-
KEYFACTOR\VaultUser")**
466
-
- password
409
+
-**domain**
410
+
- The Active Directory domain of the account **(example: "KEYFACTOR")**
411
+
-**username**
412
+
- The username of the account used for authenticating to the platform excluding the domain **(example: "VaultUser")**
413
+
-**password**
467
414
- The password corresponding to the user account for authenticating to the platform.
468
415
469
-
#### oAuth2 Configuration
416
+
[^2]: While none of these configuration values are explicitly required; they are _all_ required in order to use basic (username/password) authentication into Command.
470
417
471
-
##### Client Credentials Grant
418
+
####OpenID Connect / oAuth Configuration
472
419
473
-
If you are using the client credentials grant to authenticate to Keyfactor Command, you will also need to set the
474
-
following values:
420
+
If you are using an oAuth or OpenID Connect provider to authenticate into Keyfactor Command, you will also need to set the following values:
421
+
-**client_id**
422
+
- The client ID of the service principal account used to authenticate
475
423
476
-
- client_id
477
-
- The client ID of the oAuth2 client used for authenticating to the platform
478
-
- client_secret
479
-
- The client secret corresponding to the oAuth2 client for authenticating to the platform
480
-
- token_url
481
-
- The URL to the oAuth2 token endpoint for the platform
482
-
- scopes
483
-
- The scopes of the oAuth2 client
484
-
- audience
485
-
- The audience of the oAuth2 client
424
+
-**client_secret**
425
+
- The client secret value generated via the identity provider when the service account was created
486
426
487
-
##### Access Token
427
+
-**token_url**
428
+
- The url where the token can be requested
429
+
430
+
[^3]: While none of these configuration values are explicitly required; they are _all_ required in order to use openID Connect / oAuth authentication into Command.
488
431
489
-
If you are using a static access token to authenticate to Keyfactor Command, you will also need to set the following
490
-
value:
432
+
##### Access Token
491
433
492
-
- access_token
493
-
- The access token used for authenticating to the platform
434
+
Rather than have the plugin perform the oAuth/OpenID authentication workflow, it is also possible to retreive the access token yourself and provide it in the configuration.
435
+
If a valid access token is provided then the values for **client_id**, **client_secret** or **token_url** are not required.
494
436
495
437
Once you've set the configuration properties, run the command:
496
438
`vault read <instance name>/config`
497
439
in order to view the configuration settings (see example below).
498
440
499
441

500
442
443
+
> [!NOTE]
444
+
> By default the sensitive values (password, client_secret) are hidden. To show these, pass the "show_hidden=true" parameter to the request; `vault read <instance name>/config show_hidden=true`
445
+
446
+
501
447
### Adding Roles
502
448
503
449
Hashicorp Vault supports being able to add roles to control certificate issuance policies for allowed domains and
@@ -509,7 +455,10 @@ To create a role, use the vault write command as in the below example.
509
455
This will create a role called "hashiwebserver" that can be used to generate certificates for domains ending with "
510
456
kftrain.lab".
511
457
512
-
These properties can also be set in the certificate template. If they differ, the most restrictive setting is applied.
458
+
> [!NOTE]
459
+
> Use "*" for the value in "allowed_domains" to allow issuing for any domain.
460
+
461
+
These properties can also be set in the certificate template configured in Command. If they differ, the most restrictive setting is applied.
513
462
514
463
## Using the plugin
515
464
@@ -622,7 +571,7 @@ instance of the plugin is named "keyfactor".
0 commit comments