-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Chef PKI sync #4897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Chef PKI sync #4897
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3b35b22
Add Chef PKI sync
carlosmonastyrski ca637ca
Remove wrong tooltip message
carlosmonastyrski cf63266
Add missing RE2 usage
carlosmonastyrski 37ff9df
Add CA certs to Chef sync and make field names more dynamic
carlosmonastyrski 350fcc8
Lint fix
carlosmonastyrski 1ddabab
Add AWS secret manager PKI Sync
carlosmonastyrski fe97a77
Remove import certificates option not supported yet
carlosmonastyrski 002969a
Merge pull request #4910 from Infisical/feat/PKI-42
carlosmonastyrski 5a4cb9f
Add AWS Secret Manager and Chef PKI Sync docs
carlosmonastyrski db30b98
Address greptile comments
carlosmonastyrski b095a15
Address PR suggestions
carlosmonastyrski 4ed9ca1
Fix PKI syncs to return intermidiate chain and root CA on the json ob…
carlosmonastyrski b46313e
Improve URL management on Chef PKI fns
carlosmonastyrski e0c6f48
PKI syncs: fixes and add includeRootCa to PKI cert issuance endpoints
carlosmonastyrski b8afa81
Remove unused state change on aws cert removals
carlosmonastyrski 8d628d7
Merge remote-tracking branch 'origin/main' into feat/PKI-29
carlosmonastyrski b8c7eb0
Merge branch 'feat/pki-sync-docs' into feat/PKI-29
carlosmonastyrski b255a20
Add include Root CA on PKI syncs docs
carlosmonastyrski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
backend/src/server/routes/v1/pki-sync-routers/aws-secrets-manager-pki-sync-router.ts
This file contains hidden or 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,22 @@ | ||
| import { | ||
| AWS_SECRETS_MANAGER_PKI_SYNC_LIST_OPTION, | ||
| AwsSecretsManagerPkiSyncSchema, | ||
| CreateAwsSecretsManagerPkiSyncSchema, | ||
| UpdateAwsSecretsManagerPkiSyncSchema | ||
| } from "@app/services/pki-sync/aws-secrets-manager"; | ||
| import { PkiSync } from "@app/services/pki-sync/pki-sync-enums"; | ||
|
|
||
| import { registerSyncPkiEndpoints } from "./pki-sync-endpoints"; | ||
|
|
||
| export const registerAwsSecretsManagerPkiSyncRouter = async (server: FastifyZodProvider) => | ||
| registerSyncPkiEndpoints({ | ||
| destination: PkiSync.AwsSecretsManager, | ||
| server, | ||
| responseSchema: AwsSecretsManagerPkiSyncSchema, | ||
| createSchema: CreateAwsSecretsManagerPkiSyncSchema, | ||
| updateSchema: UpdateAwsSecretsManagerPkiSyncSchema, | ||
| syncOptions: { | ||
| canImportCertificates: AWS_SECRETS_MANAGER_PKI_SYNC_LIST_OPTION.canImportCertificates, | ||
| canRemoveCertificates: AWS_SECRETS_MANAGER_PKI_SYNC_LIST_OPTION.canRemoveCertificates | ||
| } | ||
| }); |
17 changes: 17 additions & 0 deletions
17
backend/src/server/routes/v1/pki-sync-routers/chef-pki-sync-router.ts
This file contains hidden or 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,17 @@ | ||
| import { ChefPkiSyncSchema, CreateChefPkiSyncSchema, UpdateChefPkiSyncSchema } from "@app/services/pki-sync/chef"; | ||
| import { PkiSync } from "@app/services/pki-sync/pki-sync-enums"; | ||
|
|
||
| import { registerSyncPkiEndpoints } from "./pki-sync-endpoints"; | ||
|
|
||
| export const registerChefPkiSyncRouter = async (server: FastifyZodProvider) => | ||
| registerSyncPkiEndpoints({ | ||
| destination: PkiSync.Chef, | ||
| server, | ||
| responseSchema: ChefPkiSyncSchema, | ||
| createSchema: CreateChefPkiSyncSchema, | ||
| updateSchema: UpdateChefPkiSyncSchema, | ||
| syncOptions: { | ||
| canImportCertificates: false, | ||
| canRemoveCertificates: true | ||
| } | ||
| }); |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,11 +1,15 @@ | ||
| import { PkiSync } from "@app/services/pki-sync/pki-sync-enums"; | ||
|
|
||
| import { registerAwsCertificateManagerPkiSyncRouter } from "./aws-certificate-manager-pki-sync-router"; | ||
| import { registerAwsSecretsManagerPkiSyncRouter } from "./aws-secrets-manager-pki-sync-router"; | ||
| import { registerAzureKeyVaultPkiSyncRouter } from "./azure-key-vault-pki-sync-router"; | ||
| import { registerChefPkiSyncRouter } from "./chef-pki-sync-router"; | ||
|
|
||
| export * from "./pki-sync-router"; | ||
|
|
||
| export const PKI_SYNC_REGISTER_ROUTER_MAP: Record<PkiSync, (server: FastifyZodProvider) => Promise<void>> = { | ||
| [PkiSync.AzureKeyVault]: registerAzureKeyVaultPkiSyncRouter, | ||
| [PkiSync.AwsCertificateManager]: registerAwsCertificateManagerPkiSyncRouter | ||
| [PkiSync.AwsCertificateManager]: registerAwsCertificateManagerPkiSyncRouter, | ||
| [PkiSync.AwsSecretsManager]: registerAwsSecretsManagerPkiSyncRouter, | ||
| [PkiSync.Chef]: registerChefPkiSyncRouter | ||
| }; |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.