Skip to content

Commit 65af919

Browse files
committed
chore(docs): Update docs
Signed-off-by: spbsoluble <[email protected]>
1 parent 2be6674 commit 65af919

File tree

4 files changed

+52
-9
lines changed

4 files changed

+52
-9
lines changed

cmd/inventory.go

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,30 @@ var inventoryFixRFPKCS12 = &cobra.Command{
602602
Use: "fixrfpkcs12",
603603
Aliases: nil,
604604
SuggestFor: nil,
605-
Short: "Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date.",
606-
GroupID: "",
607-
Long: `Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date.`,
605+
Short: "Fix RFPKCS12 stores that contain 2 or more leaf certificates. " +
606+
"This will remove all but the most recently issued certificate based on certificate `NotBefore` information.",
607+
GroupID: "",
608+
Long: `Fix RFPKCS12 stores that contain 2 or more leaf certificates.
609+
This will *remove all but the most recently issued certificate* based on certificate 'NotBefore' information.
610+
The command will output a CSV file with the following columns:
611+
- StoreId
612+
- StorePath
613+
- Action
614+
- Alias
615+
- IssuedDN
616+
- Thumbprint
617+
- IssuedDate
618+
- ExpiryDate
619+
- CertId
620+
621+
The 'Action' column will be set to 'REMOVE' for all certificates except the most recently issued certificate.
622+
The CSV file can be reviewed and modified and can be passed to the command with the --file option.
623+
The command will read the CSV file and schedule remove jobs as specified in the file where the 'Action' column is "REMOVE".
624+
625+
Alternatively the command can be run without the '--file' option if desired.
626+
627+
In both cases the '--force' flag is required to actually schedule the remove jobs for the certificates from the
628+
stores. This *cannot* be undone and should be used with caution.`,
608629
Example: `
609630
# The below will create a CSV file that can be reviewed and modified before running the command with the --file option.
610631
kfutil stores inventory fixrfpkcs12 --exp
@@ -627,9 +648,7 @@ kfutil stores inventory fixrfpkcs12 --file rfpkcs12_fix.csv --force --exp
627648
PreRunE: nil,
628649
Run: func(cmd *cobra.Command, args []string) {
629650
force, _ := cmd.Flags().GetBool("force")
630-
//dryRun, _ := cmd.Flags().GetBool("dry-run")
631651
importFile, _ := cmd.Flags().GetString("file")
632-
//csvHeader := "Alias,Issued Date,Store Path,Client Machine,StoreId"
633652

634653
authConfig := createAuthConfigFromParams(kfcHostName, kfcUsername, kfcPassword, kfcDomain, kfcAPIPath)
635654
isExperimental := true

docs/kfutil_stores_inventory.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Commands related to certificate store inventory management
3737
* [kfutil stores](kfutil_stores.md) - Keyfactor certificate stores APIs and utilities.
3838
* [kfutil stores inventory add](kfutil_stores_inventory_add.md) - Adds one or more certificates to one or more certificate store inventories.
3939
* [kfutil stores inventory fixrfpkcs12](kfutil_stores_inventory_fixrfpkcs12.md) - Fix RFPKCS12 stores that contain 2
40-
or more leaf certificates, by removing the certificate with the earliest issued date.
40+
or more leaf certificates. This will remove all but the most recently issued certificate based on certificate
41+
`NotBefore` information.
4142
* [kfutil stores inventory remove](kfutil_stores_inventory_remove.md) - Removes a certificate from the certificate store inventory.
4243
* [kfutil stores inventory show](kfutil_stores_inventory_show.md) - Show the inventory of a certificate store.
4344

docs/kfutil_stores_inventory_fixrfpkcs12.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
## kfutil stores inventory fixrfpkcs12
22

3-
Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date.
3+
Fix RFPKCS12 stores that contain 2 or more leaf certificates. This will remove all but the most recently issued
4+
certificate based on certificate `NotBefore` information.
45

56
### Synopsis
67

7-
Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date.
8+
Fix RFPKCS12 stores that contain 2 or more leaf certificates.
9+
This will *remove all but the most recently issued certificate* based on certificate 'NotBefore' information.
10+
The command will output a CSV file with the following columns:
11+
12+
- StoreId
13+
- StorePath
14+
- Action
15+
- Alias
16+
- IssuedDN
17+
- Thumbprint
18+
- IssuedDate
19+
- ExpiryDate
20+
- CertId
21+
22+
The 'Action' column will be set to 'REMOVE' for all certificates except the most recently issued certificate.
23+
The CSV file can be reviewed and modified and can be passed to the command with the --file option.
24+
The command will read the CSV file and schedule remove jobs as specified in the file where the 'Action' column is "
25+
REMOVE".
26+
27+
Alternatively the command can be run without the '--file' option if desired.
28+
29+
In both cases the '--force' flag is required to actually schedule the remove jobs for the certificates from the
30+
stores. This *cannot* be undone and should be used with caution.
831

932
```
1033
kfutil stores inventory fixrfpkcs12 [flags]

pkg/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
package version
1616

17-
const VERSION = "1.5.0-rc1"
17+
const VERSION = "1.6.0-rc.2"

0 commit comments

Comments
 (0)