diff --git a/CHANGELOG.md b/CHANGELOG.md index 93502cd7..9aaa3f19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 6.2.0 +- Add support for managing TLSPC Connectors via `Get-VcConnector`, `New-VcConnector`, `Set-VcConnector`, and `Remove-VcConnector`. The old Connector functions, Get, New, and Remove, which were for managing Webhooks, have been renamed to more appropriately reflect their usage. They are now `Get-VcWebhook`, `New-VcWebhook`, and `Remove-VcWebhook`. +- Add support for TLSPC EU region with `New-VenafiSession -VcRegion`. The default is 'us' and accepts 'eu' as well. This detail will be stored in the resulting session and vault if utilized. +- Update `Invoke-VcCertificateAction -Renew` to retrieve all existing CSR details, [#260](https://github.com/Venafi/VenafiPS/issues/260), [#264](https://github.com/Venafi/VenafiPS/issues/264). Also update this function to return any missing/incorrect details when renewing. +- Add `Invoke-VcCertificateAction -Renew -Force` to override the default behavior of stopping when more than 1 common name is encountered. Use of `-Force` will use the first common name found in the array. +- Update readme to remove deprecated -VaultMetadata parameter, [#256](https://github.com/Venafi/VenafiPS/issues/256) +- Fix duplicate parameter error with `Get-VdcAttribute -All`, [#259](https://github.com/Venafi/VenafiPS/issues/259) +- Update default value of `New-VcCertificate -ValidUntil` from 1 year to 90 days + + ## 6.1.4 - Fix property not found error with `New-VenafiSession -AccessToken`, [#252](https://github.com/Venafi/VenafiPS/issues/252) - Update `Invoke-VenafiRestMethod` to ensure parameter verbose output does not convert the body to json twice @@ -662,5 +672,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/VenafiPS/VenafiPS.psd1 b/VenafiPS/VenafiPS.psd1 index f333003a..6673145e 100644 --- a/VenafiPS/VenafiPS.psd1 +++ b/VenafiPS/VenafiPS.psd1 @@ -3,7 +3,7 @@ # # Generated by: Venafi # -# Generated on: 02/01/2024 +# Generated on: 03/07/2024 # @{ @@ -12,7 +12,7 @@ RootModule = 'VenafiPS.psm1' # Version number of this module. -ModuleVersion = '6.2' +ModuleVersion = '6.2.0' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/docs/changelog.md b/docs/changelog.md index 93f6fd4b..9b26814c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,13 @@ +## 6.2.0 +- Add support for managing TLSPC Connectors via `Get-VcConnector`, `New-VcConnector`, `Set-VcConnector`, and `Remove-VcConnector`. The old Connector functions, Get, New, and Remove, which were for managing Webhooks, have been renamed to more appropriately reflect their usage. They are now `Get-VcWebhook`, `New-VcWebhook`, and `Remove-VcWebhook`. +- Add support for TLSPC EU region with `New-VenafiSession -VcRegion`. The default is 'us' and accepts 'eu' as well. This detail will be stored in the resulting session and vault if utilized. +- Update `Invoke-VcCertificateAction -Renew` to retrieve all existing CSR details, [#260](https://github.com/Venafi/VenafiPS/issues/260), [#264](https://github.com/Venafi/VenafiPS/issues/264). Also update this function to return any missing/incorrect details when renewing. +- Add `Invoke-VcCertificateAction -Renew -Force` to override the default behavior of stopping when more than 1 common name is encountered. Use of `-Force` will use the first common name found in the array. +- Update readme to remove deprecated -VaultMetadata parameter, [#256](https://github.com/Venafi/VenafiPS/issues/256) +- Fix duplicate parameter error with `Get-VdcAttribute -All`, [#259](https://github.com/Venafi/VenafiPS/issues/259) +- Update default value of `New-VcCertificate -ValidUntil` from 1 year to 90 days + + ## 6.1.4 - Fix property not found error with `New-VenafiSession -AccessToken`, [#252](https://github.com/Venafi/VenafiPS/issues/252) - Update `Invoke-VenafiRestMethod` to ensure parameter verbose output does not convert the body to json twice @@ -662,5 +672,6 @@ This is a major release. Although every attempt has been made to be backwards c + diff --git a/docs/functions/Get-VcConnector.md b/docs/functions/Get-VcConnector.md index c6cf6c18..03596cc9 100644 --- a/docs/functions/Get-VcConnector.md +++ b/docs/functions/Get-VcConnector.md @@ -1,7 +1,7 @@ # Get-VcConnector ## SYNOPSIS -Get connector/webhook info +Get connector info ## SYNTAX @@ -17,7 +17,7 @@ Get-VcConnector [-All] [-VenafiSession ] [-ProgressAction [-VenafiSession ] [-ProgressAction ] + [] +``` + +### All +``` +Get-VcWebhook [-All] [-VenafiSession ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Get 1 or all webhooks + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-VcWebhook -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' | ConvertTo-Json +``` + +{ + "webhookId": "a7ddd210-0a39-11ee-8763-134b935c90aa", + "name": "ServiceNow-expiry, + "properties": { + "connectorKind": "WEBHOOK", + "filter": { + "filterType": "EXPIRATION", + "applicationIds": \[\] + }, + "target": { + "type": "generic", + "connection": { + "secret": "MySecret", + "url": "https://instance.service-now.com/api/company/endpoint" + } + } + } +} + +Get a single object by ID + +### EXAMPLE 2 +``` +Get-VcWebhook -ID 'My Webhook' +``` + +Get a single object by name. +The name is case sensitive. + +### EXAMPLE 3 +``` +Get-VcWebhook -All +``` + +Get all webhooks + +## PARAMETERS + +### -ID +Webhook ID or name + +```yaml +Type: String +Parameter Sets: ID +Aliases: webhookId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -All +Get all webhooks + +```yaml +Type: SwitchParameter +Parameter Sets: All +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPC key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### ID +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Invoke-VcCertificateAction.md b/docs/functions/Invoke-VcCertificateAction.md index fb7b84b5..07ca1141 100644 --- a/docs/functions/Invoke-VcCertificateAction.md +++ b/docs/functions/Invoke-VcCertificateAction.md @@ -19,7 +19,7 @@ Invoke-VcCertificateAction -ID [-Recover] [-AdditionalParameters [-Renew] [-AdditionalParameters ] +Invoke-VcCertificateAction -ID [-Renew] [-Force] [-AdditionalParameters ] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -50,13 +50,38 @@ Perform an action against 1 certificate ### EXAMPLE 2 ``` +Invoke-VcCertificateAction -ID '3699b03e-ff62-4772-960d-82e53c34bf60' -Renew -AdditionalParameters @{'Application'='10f71a12-daf3-4737-b589-6a9dd1cc5a97'} +``` + +Perform an action against 1 certificate with additional parameters. +In this case we are renewing a certificate, but the certificate has multiple applications associated with it. +Only one certificate and application combination can be renewed at a time so provide the specific application to be renewed. + +### EXAMPLE 3 +``` +Invoke-VcCertificateAction -ID '3699b03e-ff62-4772-960d-82e53c34bf60' -Renew -Force +``` + +Renewals can only support 1 CN assigned to a certificate. +To force this function to renew and automatically select the first CN, use -Force. + +### EXAMPLE 4 +``` +Invoke-VcCertificateAction -ID '3699b03e-ff62-4772-960d-82e53c34bf60' -Delete +``` + +Delete a certificate. +As only retired certificates can be deleted, it will be retired first. + +### EXAMPLE 5 +``` Invoke-VcCertificateAction -ID '3699b03e-ff62-4772-960d-82e53c34bf60' -Delete -Confirm:$false ``` Perform an action bypassing the confirmation prompt. Only applicable to Delete. -### EXAMPLE 3 +### EXAMPLE 6 ``` Find-VcObject -Type Certificate -Filter @('certificateStatus','eq','retired') | Invoke-VcCertificateAction -Delete ``` @@ -111,7 +136,8 @@ Accept wildcard characters: False ``` ### -Renew -Requests immediate renewal for an existing certificate +Requests immediate renewal for an existing certificate. +If more than 1 application is associated with the certificate, provide -AdditionalParameters @{'Application'='application id'} to specify the id. ```yaml Type: SwitchParameter @@ -156,6 +182,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Force +Force the operation under certain circumstances. +- During a renewal, force choosing the first CN in the case of multiple CNs as only 1 is supported. + +```yaml +Type: SwitchParameter +Parameter Sets: Renew +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AdditionalParameters Additional items specific to the action being taken, if needed. See the api documentation for appropriate items, many are in the links in this help. @@ -243,10 +285,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### ID ## OUTPUTS -### PSCustomObject with the following properties: +### When using retire and recover, PSCustomObject with the following properties: ### CertificateID - Certificate uuid ### Success - A value of true indicates that the action was successful ## NOTES +If performing a renewal and subjectCN has more than 1 value, only the first will be submitted with the renewal. ## RELATED LINKS diff --git a/docs/functions/New-VcCertificate.md b/docs/functions/New-VcCertificate.md index ba731378..de4e22b4 100644 --- a/docs/functions/New-VcCertificate.md +++ b/docs/functions/New-VcCertificate.md @@ -269,7 +269,7 @@ Aliases: Required: False Position: Named -Default value: (Get-Date).AddYears(1) +Default value: (Get-Date).AddDays(90) Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/functions/New-VcConnector.md b/docs/functions/New-VcConnector.md index 279a37bb..44fd21b3 100644 --- a/docs/functions/New-VcConnector.md +++ b/docs/functions/New-VcConnector.md @@ -5,72 +5,36 @@ Create a new connector ## SYNTAX -### EventName (Default) ``` -New-VcConnector -Name -Url -EventName [-Secret ] [-CriticalOnly] - [-PassThru] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -### EventType -``` -New-VcConnector -Name -Url -EventType [-Secret ] [-CriticalOnly] - [-PassThru] [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] +New-VcConnector [-ManifestPath] [-PassThru] [[-VenafiSession] ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Create a new connector +Create a new machine, CA, TPP, or credential connector ## EXAMPLES ### EXAMPLE 1 ``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' +New-VcConnector -ManifestPath '/tmp/manifest.json' ``` -Create a new connector for one event type +Create a new connector ### EXAMPLE 2 ``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication', 'Certificates', 'Applications' -``` - -Create a new connector with multiple event types - -### EXAMPLE 3 -``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventName 'Certificate Validation Started' -``` - -Create a new connector with event names as opposed to event types. -This will result in fewer messages received as opposed to subscribing at the event type level. - -### EXAMPLE 4 -``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Certificates' -CriticalOnly -``` - -Subscribe to critical messages only for a specific event type - -### EXAMPLE 5 -``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' -Secret 'MySecret' +New-VcConnector -ManifestPath '/tmp/manifest.json' -PassThru ``` -Create a new connector with optional secret - -### EXAMPLE 6 -``` -New-VcConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' -PassThru -``` - -Create a new connector returning the newly created object +Create a new connector and return the newly created connector object ## PARAMETERS -### -Name -Connector name +### -ManifestPath +Path to an existing manifest. +Ensure the manifest has the deployment element which is not needed when testing in the simulator. +See https://github.com/Venafi/vmware-avi-connector?tab=readme-ov-file#manifest for details. ```yaml Type: String @@ -78,89 +42,12 @@ Parameter Sets: (All) Aliases: Required: True -Position: Named +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Url -Endpoint to be called when the event type/name is triggered. -This should be the full url and will be validated during connector creation. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EventType -One or more event types to trigger on. -You can retrieve a list of possible values from the Event Log and filtering on Event Type. - -```yaml -Type: String[] -Parameter Sets: EventType -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EventName -One or more event names to trigger on. - -```yaml -Type: String[] -Parameter Sets: EventName -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Secret -Secret value used to calculate signature which will be sent to the endpoint in the header - -```yaml -Type: String -Parameter Sets: (All) -Aliases: token - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CriticalOnly -Only subscribe to log messages deemed as critical - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -PassThru Return newly created connector object @@ -187,7 +74,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: Named +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -251,9 +138,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[http://VenafiPS.readthedocs.io/en/latest/functions/New-VcConnector/](http://VenafiPS.readthedocs.io/en/latest/functions/New-VcConnector/) - -[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-VcConnector.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-VcConnector.ps1) - -[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_create](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_create) +[https://developer.venafi.com/tlsprotectcloud/reference/post-v1-plugins](https://developer.venafi.com/tlsprotectcloud/reference/post-v1-plugins) diff --git a/docs/functions/New-VcWebhook.md b/docs/functions/New-VcWebhook.md new file mode 100644 index 00000000..570b5007 --- /dev/null +++ b/docs/functions/New-VcWebhook.md @@ -0,0 +1,253 @@ +# New-VcWebhook + +## SYNOPSIS +Create a new webhook + +## SYNTAX + +### EventName (Default) +``` +New-VcWebhook -Name -Url -EventName [-Secret ] [-CriticalOnly] [-PassThru] + [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### EventType +``` +New-VcWebhook -Name -Url -EventType [-Secret ] [-CriticalOnly] [-PassThru] + [-VenafiSession ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a new webhook + +## EXAMPLES + +### EXAMPLE 1 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventType 'Authentication' +``` + +Create a new webhook for one event type + +### EXAMPLE 2 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventType 'Authentication', 'Certificates', 'Applications' +``` + +Create a new webhook with multiple event types + +### EXAMPLE 3 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventName 'Certificate Validation Started' +``` + +Create a new webhook with event names as opposed to event types. +This will result in fewer messages received as opposed to subscribing at the event type level. + +### EXAMPLE 4 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventType 'Certificates' -CriticalOnly +``` + +Subscribe to critical messages only for a specific event type + +### EXAMPLE 5 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventType 'Authentication' -Secret 'MySecret' +``` + +Create a new webhook with optional secret + +### EXAMPLE 6 +``` +New-VcWebhook -Name 'MyWebhook' -Url 'https://my.com/endpoint' -EventType 'Authentication' -PassThru +``` + +Create a new webhook returning the newly created object + +## PARAMETERS + +### -Name +Webhook name + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Url +Endpoint to be called when the event type/name is triggered. +This should be the full url and will be validated during webhook creation. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EventType +One or more event types to trigger on. +You can retrieve a list of possible values from the Event Log and filtering on Event Type. + +```yaml +Type: String[] +Parameter Sets: EventType +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EventName +One or more event names to trigger on. + +```yaml +Type: String[] +Parameter Sets: EventName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Secret +Secret value used to calculate signature which will be sent to the endpoint in the header + +```yaml +Type: String +Parameter Sets: (All) +Aliases: token + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CriticalOnly +Only subscribe to log messages deemed as critical + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Return newly created webhook object + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPC key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### PSCustomObject, if PassThru provided +## NOTES + +## RELATED LINKS + +[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_create](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_create) + diff --git a/docs/functions/New-VenafiSession.md b/docs/functions/New-VenafiSession.md index 027e188e..7fe3afea 100644 --- a/docs/functions/New-VenafiSession.md +++ b/docs/functions/New-VenafiSession.md @@ -69,10 +69,10 @@ New-VenafiSession -Server -Credential [-PassThru] [-Skip [-ProgressAction ] [] ``` -### Vaas +### Vc ``` -New-VenafiSession -VcKey [-VaultVcKeyName ] [-PassThru] [-SkipCertificateCheck] - [-ProgressAction ] [] +New-VenafiSession -VcKey [-VcRegion ] [-VaultVcKeyName ] [-PassThru] + [-SkipCertificateCheck] [-ProgressAction ] [] ``` ### VaultVcKey @@ -157,6 +157,12 @@ Create session against TLSPC ### EXAMPLE 12 ``` +New-VenafiSession -VcKey $cred -VcRegion 'eu' +Create session against TLSPC in EU region +``` + +### EXAMPLE 13 +``` New-VenafiSession -VaultVcKeyName vaas-key Create session against TLSPC with a key stored in a vault ``` @@ -437,7 +443,7 @@ If providing a credential, the username is not used. ```yaml Type: PSObject -Parameter Sets: Vaas +Parameter Sets: Vc Aliases: VaasKey Required: True @@ -447,14 +453,32 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -VcRegion +TLSPC region to connect to. +Valid values are 'us' and 'eu'. +Defaults to 'us'. + +```yaml +Type: String +Parameter Sets: Vc +Aliases: + +Required: False +Position: Named +Default value: Us +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -VaultVcKeyName Name of the SecretManagement vault entry for the TLSPC key. First time use requires it to be provided with -VcKey to populate the vault. With subsequent uses, it can be provided standalone and the key will be retrieved without the need for -VcKey. +The server associated with the region will be saved and restored when this parameter is used on subsequent use. ```yaml Type: String -Parameter Sets: Vaas +Parameter Sets: Vc Aliases: VaultVaasKeyName Required: False diff --git a/docs/functions/Remove-VcConnector.md b/docs/functions/Remove-VcConnector.md index 4f05e0d9..535abf47 100644 --- a/docs/functions/Remove-VcConnector.md +++ b/docs/functions/Remove-VcConnector.md @@ -6,8 +6,8 @@ Remove a connector ## SYNTAX ``` -Remove-VcConnector [-ID] [[-ThrottleLimit] ] [[-VenafiSession] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] +Remove-VcConnector [-ID] [[-VenafiSession] ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -44,21 +44,6 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` -### -ThrottleLimit -{{ Fill ThrottleLimit Description }} - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 100 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -VenafiSession Authentication for the function. The value defaults to the script session object $VenafiSession created by New-VenafiSession. @@ -70,7 +55,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/functions/Remove-VcWebhook.md b/docs/functions/Remove-VcWebhook.md new file mode 100644 index 00000000..f024587e --- /dev/null +++ b/docs/functions/Remove-VcWebhook.md @@ -0,0 +1,135 @@ +# Remove-VcWebhook + +## SYNOPSIS +Remove a webhook + +## SYNTAX + +``` +Remove-VcWebhook [-ID] [[-ThrottleLimit] ] [[-VenafiSession] ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Remove a webhook from TLSPC + +## EXAMPLES + +### EXAMPLE 1 +``` +Remove-VcWebhook -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' +Remove a webhook +``` + +### EXAMPLE 2 +``` +Remove-VcWebhook -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -Confirm:$false +Remove a webhook bypassing the confirmation prompt +``` + +## PARAMETERS + +### -ID +Webhook ID, this is the guid/uuid + +```yaml +Type: String +Parameter Sets: (All) +Aliases: webhookId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ThrottleLimit +{{ Fill ThrottleLimit Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 100 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPC key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### ID +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Set-VcApplication.md b/docs/functions/Set-VcApplication.md index 3aa49bc1..ba2b5ff2 100644 --- a/docs/functions/Set-VcApplication.md +++ b/docs/functions/Set-VcApplication.md @@ -1,7 +1,7 @@ # Set-VcApplication ## SYNOPSIS -{{ Fill in the Synopsis }} +Update an existing application ## SYNTAX @@ -11,16 +11,31 @@ Set-VcApplication [-Application] [[-Name] ] [[-TeamOwner] {{ Add example code here }} +### EXAMPLE 1 ``` +Set-VcApplication -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -Name 'ThisAppNameIsBetter' +``` + +Rename an existing application + +### EXAMPLE 2 +``` +Set-VcApplication -ID 'MyApp' -TeamOwner 'GreatTeam' +``` + +Change the owner to this team -{{ Add example description here }} +### EXAMPLE 3 +``` +Set-VcApplication -ID 'MyApp' -TeamOwner 'GreatTeam' -NoOverwrite +``` + +Append this team to the list of owners ## PARAMETERS @@ -33,14 +48,14 @@ Parameter Sets: (All) Aliases: applicationId, ID Required: True -Position: 0 +Position: 1 Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` ### -Name -{{ Fill Name Description }} +Provide a new name for the application if you wish to change it. ```yaml Type: String @@ -48,29 +63,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -NoOverwrite -{{ Fill NoOverwrite Description }} +### -TeamOwner +Associate a team as an owner of this application ```yaml -Type: SwitchParameter +Type: String[] Parameter Sets: (All) Aliases: Required: False -Position: Named +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -PassThru -{{ Fill PassThru Description }} +### -NoOverwrite +Append to existing details as opposed to overwriting ```yaml Type: SwitchParameter @@ -79,28 +94,30 @@ Aliases: Required: False Position: Named -Default value: None +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -TeamOwner -{{ Fill TeamOwner Description }} +### -PassThru +Return the newly updated object ```yaml -Type: String[] +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` ### -VenafiSession -{{ Fill VenafiSession Description }} +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPC key can also provided. ```yaml Type: PSObject @@ -108,7 +125,7 @@ Parameter Sets: (All) Aliases: Key Required: False -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -134,10 +151,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### System.String +### ID ## OUTPUTS -### System.Object +### PSCustomObject ## NOTES ## RELATED LINKS diff --git a/docs/functions/Set-VcConnector.md b/docs/functions/Set-VcConnector.md new file mode 100644 index 00000000..3d7c6aa4 --- /dev/null +++ b/docs/functions/Set-VcConnector.md @@ -0,0 +1,197 @@ +# Set-VcConnector + +## SYNOPSIS +Update an existing connector + +## SYNTAX + +### Manifest (Default) +``` +Set-VcConnector -ManifestPath [-ID ] [-VenafiSession ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### Disable +``` +Set-VcConnector -ID [-Disable] [-VenafiSession ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a new machine, CA, TPP, or credential connector. +You can either update the manifest or disable/reenable it. + +## EXAMPLES + +### EXAMPLE 1 +``` +Set-VcConnector -ManifestPath '/tmp/manifest_v2.json' +``` + +Update an existing connector with the same name as in the manifest + +### EXAMPLE 2 +``` +Set-VcConnector -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -ManifestPath '/tmp/manifest_v2.json' +``` + +Update an existing connector utilizing a specific connector ID + +### EXAMPLE 3 +``` +Set-VcConnector -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -Disable +``` + +Disable a connector + +### EXAMPLE 4 +``` +Get-VcConnector -ID 'My connector' | Set-VcConnector -Disable +``` + +Disable a connector by name + +### EXAMPLE 5 +``` +Set-VcConnector -ID 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -Disable:$false +``` + +Reenable a disabled connector + +## PARAMETERS + +### -ManifestPath +Path to an updated manifest for an existing connector. +Ensure the manifest has the deployment element which is not needed when testing in the simulator. +See https://github.com/Venafi/vmware-avi-connector?tab=readme-ov-file#manifest for details. + +```yaml +Type: String +Parameter Sets: Manifest +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ID +Connector ID to update. +If not provided, the ID will be looked up by the name in the manifest provided by ManifestPath. +Note that if both ManifestPath and ID are provided and the name in the manifest is different than the one associated with ID, the name will be changed. + +```yaml +Type: String +Parameter Sets: Manifest +Aliases: connectorId, connector + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +```yaml +Type: String +Parameter Sets: Disable +Aliases: connectorId, connector + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Disable +Disable or reenable a connector + +```yaml +Type: SwitchParameter +Parameter Sets: Disable +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TLSPC key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Connector +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/functions/Test-VdcToken.md b/docs/functions/Test-VdcToken.md index c0726e83..9fb9bd9e 100644 --- a/docs/functions/Test-VdcToken.md +++ b/docs/functions/Test-VdcToken.md @@ -135,8 +135,6 @@ Accept wildcard characters: False ### -VaultAccessTokenName Name of the SecretManagement vault entry for the access token; the name of the vault must be VenafiPS. -Note: '-Server' parameter is required if the vault does not contain saved metadata. -See New-VenafiSession -VaultMetaData ```yaml Type: String diff --git a/mkdocs.yml b/mkdocs.yml index 56dca9bb..f9b19a67 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,6 +62,7 @@ nav: - Get-VcTag: functions/Get-VcTag.md - Get-VcTeam: functions/Get-VcTeam.md - Get-VcUser: functions/Get-VcUser.md + - Get-VcWebhook: functions/Get-VcWebhook.md - Get-VdcAttribute: functions/Get-VdcAttribute.md - Get-VdcCertificate: functions/Get-VdcCertificate.md - Get-VdcClassAttribute: functions/Get-VdcClassAttribute.md @@ -90,6 +91,7 @@ nav: - New-VcMachineCommonKeystore: functions/New-VcMachineCommonKeystore.md - New-VcMachineIis: functions/New-VcMachineIis.md - New-VcTeam: functions/New-VcTeam.md + - New-VcWebhook: functions/New-VcWebhook.md - New-VdcCapiApplication: functions/New-VdcCapiApplication.md - New-VdcCertificate: functions/New-VdcCertificate.md - New-VdcCustomField: functions/New-VdcCustomField.md @@ -110,6 +112,7 @@ nav: - Remove-VcTeam: functions/Remove-VcTeam.md - Remove-VcTeamMember: functions/Remove-VcTeamMember.md - Remove-VcTeamOwner: functions/Remove-VcTeamOwner.md + - Remove-VcWebhook: functions/Remove-VcWebhook.md - Remove-VdcCertificate: functions/Remove-VdcCertificate.md - Remove-VdcCertificateAssociation: functions/Remove-VdcCertificateAssociation.md - Remove-VdcClient: functions/Remove-VdcClient.md @@ -124,6 +127,7 @@ nav: - Revoke-VdcToken: functions/Revoke-VdcToken.md - Search-VdcHistory: functions/Search-VdcHistory.md - Set-VcApplication: functions/Set-VcApplication.md + - Set-VcConnector: functions/Set-VcConnector.md - Set-VcTeam: functions/Set-VcTeam.md - Set-VdcAttribute: functions/Set-VdcAttribute.md - Set-VdcCredential: functions/Set-VdcCredential.md