-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
certdog: Adjust certdog to use a generated configuration file
- Loading branch information
Showing
13 changed files
with
144 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[required-extensions] | ||
std = { version = "v1", helpers = ["default"]} | ||
pki = "v1" | ||
+++ | ||
{{#if settings.pki}} | ||
{{#each settings.pki}} | ||
["{{@key}}"] | ||
trusted = {{this.trusted}} | ||
data = "{{this.data}}" | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
sources/api/migration/migrations/v1.20.0/certdog-config-file-v0-1-0/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "certdog-config-file-v0-1-0" | ||
version = "0.1.0" | ||
authors = ["Jarrett Tierney <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
edition = "2021" | ||
publish = false | ||
# Don't rebuild crate just because of changes to README. | ||
exclude = ["README.md"] | ||
|
||
[dependencies] | ||
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0" } |
20 changes: 20 additions & 0 deletions
20
sources/api/migration/migrations/v1.20.0/certdog-config-file-v0-1-0/src/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use migration_helpers::common_migrations::{ | ||
AddPrefixesMigration, ListReplacement, ReplaceListsMigration, | ||
}; | ||
use migration_helpers::{migrate, Result}; | ||
use std::process; | ||
|
||
/// Add settings for the new certdog-toml config file | ||
fn run() -> Result<()> { | ||
migrate(AddPrefixesMigration(vec![ | ||
"services.pki", | ||
"configuration-files.certdog-toml", | ||
])) | ||
} | ||
|
||
fn main() { | ||
if let Err(e) = run() { | ||
eprintln!("{}", e); | ||
process::exit(1); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
sources/api/migration/migrations/v1.20.0/certdog-service-cfg-v0-1-0/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "certdog-service-cfg-v0-1-0" | ||
version = "0.1.0" | ||
authors = ["Jarrett Tierney <[email protected]>"] | ||
license = "Apache-2.0 OR MIT" | ||
edition = "2021" | ||
publish = false | ||
# Don't rebuild crate just because of changes to README. | ||
exclude = ["README.md"] | ||
|
||
[dependencies] | ||
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0" } |
21 changes: 21 additions & 0 deletions
21
sources/api/migration/migrations/v1.20.0/certdog-service-cfg-v0-1-0/src/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use migration_helpers::common_migrations::{ | ||
AddPrefixesMigration, ListReplacement, ReplaceListsMigration, | ||
}; | ||
use migration_helpers::{migrate, Result}; | ||
use std::process; | ||
|
||
/// Add settings for the new certdog-toml config file | ||
fn run() -> Result<()> { | ||
migrate(ReplaceListsMigration(vec![ListReplacement { | ||
setting: "services.pki.configuration-files", | ||
old_vals: &[], | ||
new_vals: &["certdog-toml"], | ||
}])) | ||
} | ||
|
||
fn main() { | ||
if let Err(e) = run() { | ||
eprintln!("{}", e); | ||
process::exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters