Skip to content

Commit 0dc4292

Browse files
committed
chore(docs): Added reference to the needed environmental variables.
1 parent 55cec3a commit 0dc4292

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,89 @@
11
# Keyfactor Util
2+
23
General go-lang CLI utility for the Keyfactor API.
34

45
## Quickstart
6+
57
```bash
68
make install
79
kfutil --help
810
````
911

12+
### Environmental Variables
13+
14+
All the variables listed below need to be set in your environment. The `kfutil` command will look for these variables
15+
and use them if they are set. If they are not set, the utility will fail to connect to Keyfactor.
16+
17+
```bash
18+
export KEYFACTOR_HOSTNAME=<mykeyfactorhost.mydomain.com>
19+
export KEYFACTOR_USERNAME=<myusername> # Do not include domain
20+
export KEYFACTOR_PASSWORD=<mypassword>
21+
export KEYFACTOR_DOMAIN=<mykeyfactordomain>
22+
```
23+
1024
## Commands
1125

1226
### Bulk operations
1327

1428
#### Bulk create cert stores
29+
1530
`# TODO: Not implemented`
16-
This will attempt to process a CSV input file of certificate stores to create. The template can be generated by running: `kfutil generate-template --type bulk-certstore` command.
31+
This will attempt to process a CSV input file of certificate stores to create. The template can be generated by
32+
running: `kfutil generate-template --type bulk-certstore` command.
33+
1734
```bash
1835
kfutil bulk create certstores --file <path to csv file>
1936
```
2037

2138
#### Bulk create cert store types
22-
`# TODO: Not implemented`
23-
This will attempt to process a CSV input file of certificate store types to create. The template can be generated by running: `kfutil generate-template --type bulk-certstore-types` command.
39+
40+
`# TODO: Not implemented`
41+
This will attempt to process a CSV input file of certificate store types to create. The template can be generated by
42+
running: `kfutil generate-template --type bulk-certstore-types` command.
43+
2444
```bash
2545
kfutil bulk create certstores --file <path to csv file>
2646
```
2747

2848
### Root of Trust
2949

3050
#### Generate Certificate List Template
51+
3152
This will write the file `certs_template.csv` to the current directory.
53+
3254
```bash
3355
kfutil stores generate-template-rot --type certs
3456
```
3557

3658
#### Generate Certificate Store List Template
59+
3760
This will write the file `certs_template.csv` to the current directory.
61+
3862
```bash
3963
kfutil stores generate-template-rot --type stores
4064
```
4165

4266
#### Run Root of Trust Check
43-
This will read the file `certs.csv` from the current directory or the absolute path, and generate a report of the certificate stores that contain the specified certificates.
67+
68+
This will read the file `certs.csv` from the current directory or the absolute path, and generate a report of the
69+
certificate stores that contain the specified certificates.
70+
4471
```bash
4572
kfutil stores rot --stores stores.csv --certs certs.csv
4673
```
4774

4875
### Development
76+
4977
This CLI developed using [cobra](https://umarcor.github.io/cobra/)
78+
5079
#### Adding a new command
80+
5181
```bash
5282
cobra-cli add <my-new-command>
5383
```
84+
5485
alternatively you can specify the parent command
86+
5587
```bash
5688
cobra-cli add <my-new-command> -p '<parent>Cmd'
5789
```

0 commit comments

Comments
 (0)