Skip to content

Commit 3df81ef

Browse files
authored
Merge 3c3a7c1 into f8c5617
2 parents f8c5617 + 3c3a7c1 commit 3df81ef

174 files changed

Lines changed: 13776 additions & 868 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/config/MODULE.MD

Lines changed: 18 additions & 46 deletions
Large diffs are not rendered by default.

.github/config/README.md

Lines changed: 30 additions & 72 deletions
Large diffs are not rendered by default.

.github/config/environments.tf

Lines changed: 7 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,12 @@
1-
module "keyfactor_github_test_environment_10_5_0" {
1+
module "keyfactor_github_test_environment_ses_2541" {
22
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
33

4-
gh_environment_name = "KFC_10_5_0"
5-
gh_repo_name = data.github_repository.repo.name
6-
keyfactor_hostname = var.keyfactor_hostname_10_5_0
7-
keyfactor_username = var.keyfactor_username_AD
8-
keyfactor_password = var.keyfactor_password_AD
9-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
10-
}
11-
12-
module "keyfactor_github_test_environment_10_5_0_CLEAN" {
13-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
14-
15-
gh_environment_name = "KFC_10_5_0_CLEAN"
16-
gh_repo_name = data.github_repository.repo.name
17-
keyfactor_hostname = var.keyfactor_hostname_10_5_0_CLEAN
18-
keyfactor_username = var.keyfactor_username_AD
19-
keyfactor_password = var.keyfactor_password_AD
20-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
21-
}
22-
23-
module "keyfactor_github_test_environment_11_5_0" {
24-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
25-
26-
gh_environment_name = "KFC_11_5_0"
27-
gh_repo_name = data.github_repository.repo.name
28-
keyfactor_hostname = var.keyfactor_hostname_11_5_0
29-
keyfactor_username = var.keyfactor_username_AD
30-
keyfactor_password = var.keyfactor_password_AD
31-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
32-
}
33-
34-
module "keyfactor_github_test_environment_11_5_0_CLEAN" {
35-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
36-
37-
gh_environment_name = "KFC_11_5_0_CLEAN"
38-
gh_repo_name = data.github_repository.repo.name
39-
keyfactor_hostname = var.keyfactor_hostname_11_5_0_CLEAN
40-
keyfactor_username = var.keyfactor_username_AD
41-
keyfactor_password = var.keyfactor_password_AD
42-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
43-
}
44-
45-
module "keyfactor_github_test_environment_11_5_0_OAUTH" {
46-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
47-
48-
gh_environment_name = "KFC_11_5_0_OAUTH"
49-
gh_repo_name = data.github_repository.repo.name
50-
keyfactor_hostname = var.keyfactor_hostname_11_5_0_OAUTH
51-
keyfactor_auth_token_url = var.keyfactor_auth_token_url
52-
keyfactor_client_id = var.keyfactor_client_id
53-
keyfactor_client_secret = var.keyfactor_client_secret
54-
keyfactor_tls_skip_verify = true
55-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
56-
}
57-
58-
module "keyfactor_github_test_environment_11_5_0_OAUTH_CLEAN" {
59-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
60-
61-
gh_environment_name = "KFC_11_5_0_OAUTH_CLEAN"
4+
gh_environment_name = "SES_2541"
625
gh_repo_name = data.github_repository.repo.name
63-
keyfactor_hostname = var.keyfactor_hostname_11_5_0_OAUTH_CLEAN
64-
keyfactor_auth_token_url = var.keyfactor_auth_token_url
65-
keyfactor_client_id = var.keyfactor_client_id
66-
keyfactor_client_secret = var.keyfactor_client_secret
6+
keyfactor_hostname = var.ses_2541_hostname
7+
keyfactor_auth_token_url = var.ses_2541_auth_token_url
8+
keyfactor_client_id = var.ses_2541_client_id
9+
keyfactor_client_secret = var.ses_2541_client_secret
6710
keyfactor_tls_skip_verify = true
68-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
11+
keyfactor_config_file = base64encode(file("${path.module}/ses2541_command_config.json"))
6912
}
70-
71-
module "keyfactor_github_test_environment_12_3_0_AD" {
72-
source = "git::ssh://git@github.com/Keyfactor/terraform-module-keyfactor-github-test-environment-ad.git?ref=main"
73-
gh_environment_name = "KFC_12_3_0_AD"
74-
gh_repo_name = data.github_repository.repo.name
75-
keyfactor_hostname = var.keyfactor_hostname_12_3_0
76-
keyfactor_username = var.keyfactor_username_AD
77-
keyfactor_password = var.keyfactor_password_AD
78-
keyfactor_tls_skip_verify = true
79-
keyfactor_config_file = base64encode(file("${path.module}/command_config.json"))
80-
}
81-
82-
83-

.github/config/int1230_oauth.tf

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/config/int1230c_ad.tf

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/config/int1230c_oauth.tf

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/config/variables.tf

Lines changed: 11 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,22 @@
1-
// Hosts
2-
variable "keyfactor_hostname_10_5_0" {
3-
description = "The hostname of the Keyfactor v10.5.x instance"
1+
variable "ses_2541_hostname" {
2+
description = "The hostname of the SES 25.4.1 Keyfactor Command instance"
43
type = string
5-
default = "integrations1050-lab.kfdelivery.com"
4+
default = "int25-4-1.kftestlab.com"
65
}
76

8-
variable "keyfactor_hostname_10_5_0_CLEAN" {
9-
description = "The hostname of the Keyfactor v10.5.x instance with no stores or orchestrators. This is used for store-type tests."
7+
variable "ses_2541_auth_token_url" {
8+
description = "The OAuth token URL for the SES 25.4.1 Keyfactor Command instance"
109
type = string
11-
default = "int1050-test-clean.kfdelivery.com"
10+
default = "https://auth.kftestlab.com/oauth2/token"
1211
}
1312

14-
15-
variable "keyfactor_hostname_11_5_0" {
16-
description = "The hostname of the Keyfactor v11.5.x instance"
17-
type = string
18-
default = "integrations1150-lab.kfdelivery.com"
19-
}
20-
21-
variable "keyfactor_hostname_11_5_0_CLEAN" {
22-
description = "The hostname of the Keyfactor v11.5.x instance with no stores or orchestrators. This is used for store-type tests."
23-
type = string
24-
default = "int1150-test-clean.kfdelivery.com"
25-
}
26-
27-
variable "keyfactor_hostname_11_5_0_OAUTH" {
28-
description = "The hostname of the Keyfactor instance"
29-
type = string
30-
default = "int-oidc-lab.eastus2.cloudapp.azure.com"
31-
}
32-
33-
variable "keyfactor_hostname_11_5_0_OAUTH_CLEAN" {
34-
description = "The hostname of the Keyfactor instance"
35-
type = string
36-
default = "int1150-oauth-test-clean.eastus2.cloudapp.azure.com"
37-
}
38-
39-
40-
variable "keyfactor_hostname_12_3_0" {
41-
description = "The hostname of the Keyfactor v12.3.x instance"
42-
type = string
43-
default = "integrations1230-lab.kfdelivery.com"
44-
}
45-
46-
variable "keyfactor_hostname_12_3_0_CLEAN" {
47-
description = "The hostname of the Keyfactor v12.3.x instance with no stores or orchestrators. This is used for store-type tests."
13+
variable "ses_2541_client_id" {
14+
description = "The OAuth client ID for the SES 25.4.1 Keyfactor Command instance"
4815
type = string
49-
default = "int1230-test-clean.kfdelivery.com"
5016
}
5117

52-
variable "keyfactor_hostname_12_3_0_OAUTH" {
53-
description = "The hostname of the Keyfactor instance"
18+
variable "ses_2541_client_secret" {
19+
description = "The OAuth client secret for the SES 25.4.1 Keyfactor Command instance"
5420
type = string
55-
default = "int-oidc-lab.eastus2.cloudapp.azure.com"
21+
sensitive = true
5622
}
57-
58-
59-
// Authentication
60-
variable "keyfactor_username_AD" {
61-
description = "The username to authenticate with a Keyfactor instance that uses AD authentication"
62-
type = string
63-
}
64-
65-
variable "keyfactor_password_AD" {
66-
description = "The password to authenticate with Keyfactor instance that uses AD authentication"
67-
type = string
68-
}
69-
70-
variable "keyfactor_client_id" {
71-
description = "The client ID to authenticate with the Keyfactor instance using oauth2 client credentials"
72-
type = string
73-
}
74-
75-
variable "keyfactor_client_secret" {
76-
description = "The client secret to authenticate with the Keyfactor instance using oauth2 client credentials"
77-
type = string
78-
}
79-
80-
variable "keyfactor_auth_token_url" {
81-
description = "The token URL to authenticate with the Keyfactor instance using oauth2 client credentials"
82-
type = string
83-
default = "https://int-oidc-lab.eastus2.cloudapp.azure.com:8444/realms/Keyfactor/protocol/openid-connect/token"
84-
}
85-

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# v1.9.2
2+
3+
## Fixes
4+
5+
### CLI
6+
7+
- `stores import csv`: Support create and sync workflows for certificate stores that use PAM provider-backed
8+
`ServerUsername`, `ServerPassword`, and store password values.
9+
- `stores import csv`: Preserve JSON-shaped secret values as secret strings instead of parsing them into nested
10+
request objects.
11+
- `login`: Add `--skip-validate` to save login configuration without validating credentials against Keyfactor Command.
12+
13+
### Docs
14+
15+
- Add top-level README link to the use-case documentation index.
16+
- Add use-case documentation for bulk certificate store creation.
17+
- Add use-case documentation for bulk certificate store updates.
18+
- Add use-case documentation for migrating certificate store credentials from static values to a PAM provider.
19+
- Add generated per-store-type bulk create and update use-case guides.
20+
- Add generated PAM Operations use-case documentation for PAM type and provider creation.
21+
- `makedocs` now regenerates command docs, store-type use cases, and PAM operation use cases without date-based
22+
generated footers.
23+
124
# v1.9.1
225

326
## Fixes

GNUmakefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,10 @@ generate_toc:
8383
@command -v markdown-toc >/dev/null 2>&1 || (echo "markdown-toc is not installed. Installing..." && npm install -g markdown-toc)
8484
markdown-toc -i $(MARKDOWN_FILE) --skip 'Table of Contents'
8585

86+
store-type-docs:
87+
GOWORK=off GOCACHE=/tmp/kfutil-gocache go run ./tools/storetypedocs
8688

87-
.PHONY: build prerelease release install test fmt vendor version setversion
89+
pam-operation-docs:
90+
GOWORK=off GOCACHE=/tmp/kfutil-gocache go run ./tools/pamdocs
91+
92+
.PHONY: build prerelease release install test fmt vendor version setversion store-type-docs pam-operation-docs

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ at https://support.keyfactor.com/
2020
To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual
2121
bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
2222

23+
## Documentation
24+
25+
- [Command Reference](docs/kfutil.md)
26+
- [Use Cases](docs/use-cases/README.md)
27+
2328
## Quickstart
2429

2530
### Linux/MacOS
@@ -229,13 +234,14 @@ kfutil logout
229234

230235
#### Bulk create cert stores
231236

232-
For full documentation, see [stores import](docs/kfutil_stores_import.md).
237+
For command documentation, see [stores import](docs/kfutil_stores_import.md). For a task-oriented walkthrough, see
238+
[Bulk Certificate Store Creation](docs/use-cases/Certificate%20Store%20Operations/bulk-certificate-store-creation.md).
233239

234240
This will attempt to process a CSV input file of certificate stores to create. The template can be generated by
235241
running: `kfutil stores import generate-template` command.
236242

237243
```bash
238-
kfutil stores import create --file <file name to import> --store-type-id <store type id> --store-type-name <store type name> --results-path <filepath for results> --dry-run <check fields only> [flags]
244+
kfutil stores import csv --file <file name to import> --store-type-id <store type id> --store-type-name <store type name> --results-path <filepath for results> --dry-run <check fields only> [flags]
239245
```
240246

241247
```bash
@@ -246,7 +252,7 @@ Usage:
246252
kfutil stores import [command]
247253
248254
Available Commands:
249-
create Create certificate stores
255+
csv Create certificate stores from CSV file.
250256
generate-template For generating a CSV template with headers for bulk store creation.
251257
252258
Flags:
@@ -255,6 +261,18 @@ Flags:
255261
Use "kfutil stores import [command] --help" for more information about a command.
256262
```
257263

264+
#### Bulk update cert stores
265+
266+
For a task-oriented walkthrough, see [Bulk Certificate Store Updates](docs/use-cases/Certificate%20Store%20Operations/bulk-certificate-store-updates.md).
267+
268+
Bulk updates use the CSV import command with `--sync`. Export the target stores, edit the exported CSV, preserve the
269+
`Id` column, then sync the changes back to Keyfactor Command.
270+
271+
```bash
272+
kfutil stores export --store-type-name <store type name>
273+
kfutil stores import csv --file <exported csv file> --store-type-name <store type name> --sync --no-prompt
274+
```
275+
258276
#### Bulk create cert store types
259277

260278
For full documentation, see [store-types](docs/kfutil_store-types.md).
@@ -514,6 +532,24 @@ kfutil stores inventory remove \
514532
515533
## Development
516534
535+
### Regenerating documentation
536+
537+
The command reference and generated use-case docs are checked into this repository. Regenerate them after changing CLI
538+
commands, flags, embedded store type metadata, or embedded PAM type metadata:
539+
540+
```bash
541+
go run . makedocs
542+
```
543+
544+
This updates:
545+
546+
- `docs/kfutil*.md` command reference pages
547+
- `docs/use-cases/Certificate Store Operations/Store Types/*.md`
548+
- `docs/use-cases/PAM Operations/*.md`
549+
550+
The store type and PAM operation docs are generated from `cmd/store_types.json` and `cmd/pam_types.json`. The generated
551+
command docs intentionally omit date-based generator footers to avoid unrelated documentation churn.
552+
517553
This CLI developed using [cobra](https://umarcor.github.io/cobra/)
518554
519555
### Adding a new command

0 commit comments

Comments
 (0)