From f85fdd8707ea17035476514adaf4f5b8784fed47 Mon Sep 17 00:00:00 2001 From: Greg Brownstein Date: Tue, 20 Sep 2022 15:55:58 +0000 Subject: [PATCH] Update manifest and docs to 5.0.0 --- CHANGELOG.md | 18 + VenafiPS/VenafiPS.psd1 | 9 +- docs/changelog.md | 18 + docs/functions/Add-TppEngineFolder.md | 134 ++++++++ docs/functions/Find-TppEngine.md | 75 +++++ docs/functions/Find-VenafiCertificate.md | 28 +- docs/functions/Get-TppAttribute.md | 310 ++++++------------ docs/functions/Get-TppEngineFolder.md | 117 +++++++ docs/functions/Get-TppObject.md | 3 +- docs/functions/Get-VaasConnector.md | 106 ++++++ docs/functions/Get-VenafiCertificate.md | 119 +++++-- .../Invoke-VenafiCertificateAction.md | 68 +++- docs/functions/New-VaasConnector.md | 190 +++++++++++ docs/functions/Remove-TppEngineFolder.md | 157 +++++++++ docs/functions/Remove-VaasConnector.md | 107 ++++++ mkdocs.yml | 7 + 16 files changed, 1200 insertions(+), 266 deletions(-) create mode 100644 docs/functions/Add-TppEngineFolder.md create mode 100644 docs/functions/Find-TppEngine.md create mode 100644 docs/functions/Get-TppEngineFolder.md create mode 100644 docs/functions/Get-VaasConnector.md create mode 100644 docs/functions/New-VaasConnector.md create mode 100644 docs/functions/Remove-TppEngineFolder.md create mode 100644 docs/functions/Remove-VaasConnector.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 17fdbeba..31922538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +## 5.0.0 +- Rewrite Get-TppAttribute + - Greatly simplified with far less parameters needed + - Attributes, which have values, available as properties at the root level in the response. This is useful for direct value access. + - A property named `Attribute` has been added with all attribute names, values, and configuration. This is useful for looping over the attributes, determining where a policy attribute is set, and more. +- Add TPP engine management functions `Add-TppEngineFolder`, `Find-TppEngine`, `Get-TppEngineFolder`, and `Remove-TppEngineFolder`. Thanks [@ccamacho1966](https://github.com/ccamacho1966)! +- Add VaaS connector management functions `Get-VaasConnector`, `New-VaasConnector`, and `Rmove-VaasConnector`. Currently limited to webhooks with event type scope. +- Add VaaS and TPP certificate deletion to `Invoke-VenafiCertificateAction` +- Add `-IncludeVaasOwner` to `Find-VenafiCertificate` and `Get-VenafiCertificate` to include user/team owner detailed info on VaaS +- Add 'application' property to `Find-VenafiCertificate` and `Get-VenafiCertificate` with application details on VaaS +- Add `-All` to `Get-VenafiCertificate` to retrieve all certificates. This replaces the default behavior of getting all with no parameters. +- Add prepending '\ved\policy' when a root path isn't provided to many functions +- Fix `Invoke-VenafiCertificateAction` not triggering some actions on VaaS +- Fix `Get-VenafiCertificate` returning TppObject instead of detailed certificate info when getting all +- **Note: please test your code when using the above functions as there are breaking changes in this release** + + ## 4.6.3 - Add paging support to `Find-VenafiCertificate` for VaaS - Update `Get-VaasApplication -ID` and `Get-VenafiTeam -ID` for VaaS to accept a name in addition to guid @@ -423,3 +440,4 @@ + diff --git a/VenafiPS/VenafiPS.psd1 b/VenafiPS/VenafiPS.psd1 index 145c8425..775eb96d 100644 --- a/VenafiPS/VenafiPS.psd1 +++ b/VenafiPS/VenafiPS.psd1 @@ -3,7 +3,7 @@ # # Generated by: Venafi # -# Generated on: 07/23/2022 +# Generated on: 09/20/2022 # @{ @@ -12,7 +12,7 @@ RootModule = 'VenafiPS.psm1' # Version number of this module. -ModuleVersion = '5.0' +ModuleVersion = '5.0.0' # Supported PSEditions # CompatiblePSEditions = @() @@ -102,8 +102,9 @@ FunctionsToExport = 'Add-TppCertificateAssociation', 'Convert-TppObject', 'Remove-VenafiTeam', 'Add-VenafiTeamMember', 'Add-VenafiTeamOwner', 'Remove-VenafiTeamMember', 'Remove-VenafiTeamOwner', 'New-VenafiTeam', 'Search-TppHistory', 'Get-VaasIssuingTemplate', 'New-VaasApplication', - 'Import-VaasCertificate', 'Get-VaasConnector', 'Remove-VaasConnector', 'New-VaasConnector', - 'Find-TppEngine', 'Get-TppEngineFolder', 'Remove-TppEngineFolder', 'Add-TppEngineFolder' + 'Import-VaasCertificate', 'Get-VaasConnector', 'Remove-VaasConnector', + 'New-VaasConnector', 'Find-TppEngine', 'Get-TppEngineFolder', + 'Remove-TppEngineFolder', 'Add-TppEngineFolder' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() diff --git a/docs/changelog.md b/docs/changelog.md index bc5a90f6..9bc91589 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,20 @@ +## 5.0.0 +- Rewrite Get-TppAttribute + - Greatly simplified with far less parameters needed + - Attributes, which have values, available as properties at the root level in the response. This is useful for direct value access. + - A property named `Attribute` has been added with all attribute names, values, and configuration. This is useful for looping over the attributes, determining where a policy attribute is set, and more. +- Add TPP engine management functions `Add-TppEngineFolder`, `Find-TppEngine`, `Get-TppEngineFolder`, and `Remove-TppEngineFolder`. Thanks [@ccamacho1966](https://github.com/ccamacho1966)! +- Add VaaS connector management functions `Get-VaasConnector`, `New-VaasConnector`, and `Rmove-VaasConnector`. Currently limited to webhooks with event type scope. +- Add VaaS and TPP certificate deletion to `Invoke-VenafiCertificateAction` +- Add `-IncludeVaasOwner` to `Find-VenafiCertificate` and `Get-VenafiCertificate` to include user/team owner detailed info on VaaS +- Add 'application' property to `Find-VenafiCertificate` and `Get-VenafiCertificate` with application details on VaaS +- Add `-All` to `Get-VenafiCertificate` to retrieve all certificates. This replaces the default behavior of getting all with no parameters. +- Add prepending '\ved\policy' when a root path isn't provided to many functions +- Fix `Invoke-VenafiCertificateAction` not triggering some actions on VaaS +- Fix `Get-VenafiCertificate` returning TppObject instead of detailed certificate info when getting all +- **Note: please test your code when using the above functions as there are breaking changes in this release** + + ## 4.6.3 - Add paging support to `Find-VenafiCertificate` for VaaS - Update `Get-VaasApplication -ID` and `Get-VenafiTeam -ID` for VaaS to accept a name in addition to guid @@ -423,3 +440,4 @@ + diff --git a/docs/functions/Add-TppEngineFolder.md b/docs/functions/Add-TppEngineFolder.md new file mode 100644 index 00000000..ac0169f6 --- /dev/null +++ b/docs/functions/Add-TppEngineFolder.md @@ -0,0 +1,134 @@ +# Add-TppEngineFolder + +## SYNOPSIS +Add policy folder assignments to a TPP processing engine + +## SYNTAX + +``` +Add-TppEngineFolder [-EnginePath] [-FolderPath] [[-VenafiSession] ] [-WhatIf] + [-Confirm] [] +``` + +## DESCRIPTION +Add one or more policy folder assignments to a TPP processing engine. + +## EXAMPLES + +### EXAMPLE 1 +``` +Add-TppEngineFolder -EnginePath '\VED\Engines\MYVENAFI01' -FolderPath '\VED\Policy\Certificates\Web Team' +Add processing engine MYVENAFI01 to the policy folders '\VED\Policy\Certificates\Web Team'. +``` + +### EXAMPLE 2 +``` +Add-TppEngineFolder -EnginePath '\VED\Engines\MYVENAFI01' -FolderPath @('\VED\Policy\Certificates\Web Team','\VED\Policy\Certificates\Database Team') +Add processing engine MYVENAFI01 to the policy folders '\VED\Policy\Certificates\Web Team' and '\VED\Policy\Certificates\Database Team'. +``` + +### EXAMPLE 3 +``` +$EngineObjects | Add-TppEngineFolder -FolderPath @('\VED\Policy\Certificates\Web Team','\VED\Policy\Certificates\Database Team') -Confirm:$false +Add one or more processing engines via the pipeline to multiple policy folders. Suppress the confirmation prompt. +``` + +## PARAMETERS + +### -EnginePath +The full DN path to a TPP processing engine. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: EngineDN, Engine, Path + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -FolderPath +The full DN path to one or more policy folders (string array). + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: FolderDN, Folder + +Required: True +Position: 2 +Default value: None +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 TPP token can also provided, but this requires an environment variable TPP_SERVER to be set. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: $script:VenafiSession +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 +``` + +### 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 + +### EnginePath or EngineObject, FolderPath[] +## OUTPUTS + +### None +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Add-TppEngineFolder/](http://VenafiPS.readthedocs.io/en/latest/functions/Add-TppEngineFolder/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Add-TppEngineFolder.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Add-TppEngineFolder.ps1) + +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-ProcessingEngines-Engine-eguid.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-ProcessingEngines-Engine-eguid.php) + diff --git a/docs/functions/Find-TppEngine.md b/docs/functions/Find-TppEngine.md new file mode 100644 index 00000000..60308b26 --- /dev/null +++ b/docs/functions/Find-TppEngine.md @@ -0,0 +1,75 @@ +# Find-TppEngine + +## SYNOPSIS +Find TPP engines using an optional pattern + +## SYNTAX + +``` +Find-TppEngine [-Pattern] [[-VenafiSession] ] [] +``` + +## DESCRIPTION +Find TPP engines using an optional pattern. +This function is an engine wrapper for Find-TppObject. + +## EXAMPLES + +### EXAMPLE 1 +``` +Find-TppEngine -Pattern '*partialname*' +``` + +Get engines whose name matches the supplied pattern + +## PARAMETERS + +### -Pattern +Filter against engine names using asterisk (*) and/or question mark (?) wildcard characters. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A TPP token can also provided, but this requires an environment variable TPP_SERVER to be set. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: $script:VenafiSession +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 + +### Pattern +## OUTPUTS + +### TppObject +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Find-TppEngine/](http://VenafiPS.readthedocs.io/en/latest/functions/Find-TppEngine/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Find-TppEngine.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Find-TppEngine.ps1) + diff --git a/docs/functions/Find-VenafiCertificate.md b/docs/functions/Find-VenafiCertificate.md index f8f19998..0ad513d9 100644 --- a/docs/functions/Find-VenafiCertificate.md +++ b/docs/functions/Find-VenafiCertificate.md @@ -29,8 +29,8 @@ Find-VenafiCertificate [-Path ] [-Guid ] [-Recursive] [-Limit ] [-Order ] [-VenafiSession ] - [-IncludeTotalCount] [-Skip ] [-First ] [] +Find-VenafiCertificate [-Filter ] [-Order ] [-IncludeVaasOwner] + [-VenafiSession ] [-IncludeTotalCount] [-Skip ] [-First ] [] ``` ## DESCRIPTION @@ -133,6 +133,14 @@ Find-VenafiCertificate -Filter ('and', @('validityEnd','GTE',(get-date)), @('val Find VaaS certificates matching multiple values. In this case, find all certificates expiring in the next 30 days. +### EXAMPLE 14 +``` +Find-VenafiCertificate -IncludeVaasOwner +``` + +When finding VaaS certificates, include user/team owner information. +This will make additional api calls and will increase the response time. + ## PARAMETERS ### -Path @@ -852,6 +860,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -IncludeVaasOwner +Retrieve detailed user/team owner info, only for VaaS. +This will cause additional api calls to be made and take longer. + +```yaml +Type: SwitchParameter +Parameter Sets: VaaS +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -CountOnly Return the count of certificates found from the query as opposed to the certificates themselves diff --git a/docs/functions/Get-TppAttribute.md b/docs/functions/Get-TppAttribute.md index 2c025d3b..22640df8 100644 --- a/docs/functions/Get-TppAttribute.md +++ b/docs/functions/Get-TppAttribute.md @@ -1,192 +1,146 @@ # Get-TppAttribute ## SYNOPSIS -Get object attributes as well as policies (policy attributes) +Get object attributes as well as policy attributes ## SYNTAX -### ByPath (Default) +### Attribute (Default) ``` -Get-TppAttribute -Path [-Attribute ] [-AsValue] [-New] [-VenafiSession ] +Get-TppAttribute -Path -Attribute [-Class ] [-VenafiSession ] [] ``` -### AllPolicy +### All ``` -Get-TppAttribute -Path [-All] [-Policy] -PolicyClass [-New] [-VenafiSession ] - [] -``` - -### Policy -``` -Get-TppAttribute -Path -Attribute [-Policy] -PolicyClass [-AsValue] [-New] - [-VenafiSession ] [] -``` - -### AllEffective -``` -Get-TppAttribute -Path [-Effective] [-All] [-New] [-VenafiSession ] [] -``` - -### Effective -``` -Get-TppAttribute -Path -Attribute [-Effective] [-AsValue] [-New] - [-VenafiSession ] [] -``` - -### AllByPath -``` -Get-TppAttribute -Path [-All] [-New] [-VenafiSession ] [] +Get-TppAttribute -Path [-Class ] [-All] [-VenafiSession ] [] ``` ## DESCRIPTION -Retrieves object attributes as well as policies (aka policy attributes). +Retrieves object attributes as well as policy attributes. You can either retrieve all attributes or individual ones. -By default, the attributes returned are not the effective policy, but that can be requested with the -Effective switch. Policy folders can have attributes as well as policies which apply to the resultant objects. For more info on policies and how they are different than attributes, see https://docs.venafi.com/Docs/current/TopNav/Content/Policies/c_policies_tpp.php. +Attribute properties are directly added to the return object for ease of access. +To retrieve attribute configuration, see the Attribute property of the return object which has properties +Name, PolicyPath, Locked, Value, Overridden (when applicable), and CustomFieldGuid (when applicable). + ## EXAMPLES ### EXAMPLE 1 ``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -New +Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'State' ``` -Name : test.gdb.com -Path : \VED\Policy\Certificates\test.gdb.com -TypeName : X509 Server Certificate -Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 -ServiceNow Assignment Group : @{Value=Venafi Management; CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}} -ServiceNow CI : @{Value=9cc047ed1bad81100774ebd1b24bcbd0; - CustomFieldGuid={a26df613-595b-46ef-b5df-79f6eace72d9}} -Certificate Vault Id : @{Value=442493; CustomFieldGuid=} -Consumers : @{Value=System.Object\[\]; CustomFieldGuid=} -Created By : @{Value=WebAdmin; CustomFieldGuid=} -CSR Vault Id : @{Value=442492; CustomFieldGuid=} +Name : test.gdb.com +Path : \VED\Policy\Certificates\test.gdb.com +TypeName : X509 Server Certificate +Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 +Attribute : {@{Name=State; PolicyPath=\VED\Policy\Certificates; Locked=False; Value=UT; Overridden=False}} +State : UT -Retrieve values directly set on an object, excluding values assigned by policy +Retrieve a single attribute ### EXAMPLE 2 ``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'Driver Name' -New +Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'State', 'Driver Name' ``` Name : test.gdb.com Path : \VED\Policy\Certificates\test.gdb.com TypeName : X509 Server Certificate Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 -Driver Name : @{Value=appx509certificate; CustomFieldGuid=} +Attribute : {@{Name=State; PolicyPath=\VED\Policy\Certificates; Locked=False; Value=UT; Overridden=False}, @{Name=Driver + Name; PolicyPath=; Locked=False; Value=appx509certificate; Overridden=False}} +State : UT +Driver Name : appx509certificate -Retrieve the value for a specific attribute +Retrieve multiple attributes ### EXAMPLE 3 ``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'ServiceNow Assignment Group' -New +Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'ServiceNow Assignment Group' ``` Name : test.gdb.com Path : \VED\Policy\Certificates\test.gdb.com TypeName : X509 Server Certificate -Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca199 -ServiceNow Assignment Group : @{Value=Venafi Management; CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}} +Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 +Attribute : {@{CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}; Name=ServiceNow Assignment Group; + PolicyPath=; Locked=False; Value=Venafi Management; Overridden=False}} +ServiceNow Assignment Group : Venafi Management -Retrieve the value for a custom field. +Retrieve a custom field attribute. You can specify either the guid or custom field label name. ### EXAMPLE 4 ``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Attribute 'Organization','State' -Effective -New +Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -All ``` -Name : test.gdb.com -Path : \VED\Policy\Certificates\test.gdb.com -TypeName : X509 Server Certificate -Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 -Organization : @{Value=Venafi, Inc.; CustomFieldGuid=; Overridden=False; Locked=True; - PolicyPath=\VED\Policy\Certificates} -State : @{Value=UT; CustomFieldGuid=; Overridden=False; Locked=False; PolicyPath=\VED\Policy\Certificates} +Name : test.gdb.com +Path : \VED\Policy\Certificates\test.gdb.com +TypeName : X509 Server Certificate +Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 +Attribute : {@{CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}; Name=ServiceNow + Assignment Group; PolicyPath=; Locked=False; Value=Venafi Management; + Overridden=False}…} +ServiceNow Assignment Group : Venafi Management +City : Salt Lake City +Consumers : {\VED\Policy\Installations\Agentless\US Zone\mydevice\myapp} +Contact : local:{b1c77034-c099-4a5c-9911-9e26007817da} +Country : US +Created By : WebAdmin +Driver Name : appx509certificate +... -Retrieve the effective (policy applied) value for a specific attribute(s). -This not only returns the value, but also the path where the policy is applied and if locked or overridden. +Retrieve all attributes applicable to this object ### EXAMPLE 5 ``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -Effective -All -New -``` - -Name : test.gdb.com -Path : \VED\Policy\certificates\test.gdb.com -TypeName : X509 Server Certificate -ServiceNow Assignment Group : @{Value=Venafi Management; - CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}; - Overridden=False; Locked=False; PolicyPath=} -ServiceNow CI : @{Value=9cc047ed1bad81100774ebd1b24bcbd0; - CustomFieldGuid={a26df613-595b-46ef-b5df-79f6eace72d9}; - Overridden=False; Locked=False; PolicyPath=} -ACME Account DN : -Adaptable CA:Binary Data Vault ID : -Adaptable CA:Early Password Vault ID : -Adaptable CA:Early Pkcs7 Vault ID : -Adaptable CA:Early Private Key Vault ID : - -Retrieve the effective (policy applied) value for all attributes. -This not only returns the value, but also the path where the policy is applied and if locked or overridden. - -### EXAMPLE 6 -``` -Get-TppAttribute -Path '\VED\Policy\certificates\test.gdb.com' -All -New -``` - -Name : test.gdb.com -Path : \ved\policy\certificates\test.gdb.com -TypeName : X509 Server Certificate -Guid : b7a7221b-e038-41d9-9d49-d7f45c1ca128 -Certificate Vault Id : @{Value=442493; CustomFieldName=; PolicyPath=} -City : @{Value=Salt Lake City; CustomFieldName=; PolicyPath=\VED\Policy\Certificates} -Consumers : @{Value=System.Object\[\]; CustomFieldName=; PolicyPath=} -Created By : @{Value=WebAdmin; CustomFieldName=; PolicyPath=} -State : @{Value=UT; CustomFieldName=; PolicyPath=\VED\Policy\Certificates} - -Retrieve values for all attributes applicable to this object - -### EXAMPLE 7 -``` -Get-TppAttribute -Path '\VED\Policy\certificates' -PolicyClass 'X509 Certificate' -Attribute 'State' -New +Get-TppAttribute -Path 'Certificates' -Class 'X509 Certificate' -Attribute 'State' ``` -Name : certificates -Path : \VED\Policy\certificates -TypeName : Policy -Guid : a91fc152-a9fb-4b49-a7ca-7014b14d73eb -PolicyClassName : X509 Certificate -State : @{Value=UT; Locked=False} +Name : Certificates +Path : \VED\Policy\Certificates +TypeName : Policy +Guid : a91fc152-a9fb-4b49-a7ca-7014b14d73eb +Attribute : {@{Name=State; PolicyPath=\VED\Policy\Certificates; Locked=False; Value=UT}} +ClassName : X509 Certificate +State : UT -Retrieve specific policy attribute values for the specified policy folder and class +Retrieve a policy attribute value for the specified policy folder and class. +\ved\policy will be prepended to the path. -### EXAMPLE 8 +### EXAMPLE 6 ``` -Get-TppAttribute -Path '\VED\Policy\certificates' -PolicyClass 'X509 Certificate' -All -New +Get-TppAttribute -Path '\VED\Policy\certificates' -Class 'X509 Certificate' -All ``` -Name : certificates -Path : \VED\Policy\certificates -TypeName : Policy -PolicyClassName : X509 Certificate -ServiceNow Assignment Group : -Certificate Authority : -Certificate Download: PBES2 Algorithm : -Certificate Process Validator : -Certificate Vault Id : -City : @{Value=Salt Lake City; Locked=False} +Name : Certificates +Path : \VED\Policy\Certificates +TypeName : Policy +Guid : a91fc152-a9fb-4b49-a7ca-7014b14d73eb +Attribute : {@{CustomFieldGuid={7f214dec-9878-495f-a96c-57291f0d42da}; Name=ServiceNow + Assignment Group; PolicyPath=; Locked=False; Value=}…} +ClassName : X509 Certificate +Approver : local:{b1c77034-c099-4a5c-9911-9e26007817da} +Key Algorithm : RSA +Key Bit Strength : 2048 +Managed By : Aperture +Management Type : Enrollment +Network Validation Disabled : 1 +Notification Disabled : 0 +... -Retrieve all policy attribute values for the specified policy folder and class +Retrieve all policy attributes for the specified policy folder and class ## PARAMETERS ### -Path -Path to the object to retrieve configuration attributes. -Just providing DN will return all attributes. +Path to the object. +If the root is excluded, \ved\policy will be prepended. ```yaml Type: String @@ -201,23 +155,12 @@ Accept wildcard characters: False ``` ### -Attribute -Only retrieve the value/values for this attribute - -```yaml -Type: String[] -Parameter Sets: ByPath -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` +Only retrieve the value/values for this attribute. +For custom fields, you provided either the Guid or Label. ```yaml Type: String[] -Parameter Sets: Policy, Effective +Parameter Sets: Attribute Aliases: Required: True @@ -227,98 +170,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Effective -Get the objects attribute value, once policies have been applied. -This is not applicable to policies, only objects. -The output will contain the path where the policy was applied from. - -```yaml -Type: SwitchParameter -Parameter Sets: AllEffective, Effective -Aliases: EffectivePolicy - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -All -Get all object attribute values. -This will perform 3 steps, get the object type, enumerate the attributes for the object type, and get all the values. -Note, expect this to take longer than usual given the number of api calls. - -```yaml -Type: SwitchParameter -Parameter Sets: AllPolicy, AllEffective, AllByPath -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Policy -Deprecated. -To retrieve policy attributes, just provide -PolicyClass. - -```yaml -Type: SwitchParameter -Parameter Sets: AllPolicy, Policy -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicyClass -Get policies (aka policy attributes) instead of object attributes. +### -Class +Get policy attributes instead of object attributes. Provide the class name to retrieve the value for. If unsure of the class name, add the value through the TPP UI and go to Support-\>Policy Attributes to find it. +The Attribute property will contain the path where the policy was applied. ```yaml Type: String -Parameter Sets: AllPolicy, Policy -Aliases: ClassName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AsValue -Deprecated. -No longer required with -New format. - -```yaml -Type: SwitchParameter -Parameter Sets: ByPath, Policy, Effective -Aliases: +Parameter Sets: (All) +Aliases: ClassName, PolicyClass Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -New -New output format which returns 1 object with multiple properties instead of an object per property +### -All +Get all object attributes or policy attributes. +This will perform 3 steps, get the object type, enumerate the attributes for the object type, and get all the values. +Note, expect this to take longer than usual given the number of api calls. ```yaml Type: SwitchParameter -Parameter Sets: (All) +Parameter Sets: All Aliases: -Required: False +Required: True Position: Named Default value: False Accept pipeline input: False @@ -328,7 +208,7 @@ Accept wildcard characters: False ### -VenafiSession Authentication for the function. The value defaults to the script session object $VenafiSession created by New-VenafiSession. -A TPP token or VaaS key can also provided. +A TPP token can be provided directly. If providing a TPP token, an environment variable named TPP_SERVER must also be set. ```yaml @@ -360,9 +240,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-TppAttribute.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-TppAttribute.ps1) -[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-read.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-read.php) - -[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readall.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readall.php) +[https://docs.venafi.com/Docs/currentSDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-findpolicy.php](https://docs.venafi.com/Docs/currentSDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-findpolicy.php) [https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readeffectivepolicy.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readeffectivepolicy.php) diff --git a/docs/functions/Get-TppEngineFolder.md b/docs/functions/Get-TppEngineFolder.md new file mode 100644 index 00000000..860d4fa8 --- /dev/null +++ b/docs/functions/Get-TppEngineFolder.md @@ -0,0 +1,117 @@ +# Get-TppEngineFolder + +## SYNOPSIS +Get TPP folder/engine assignments + +## SYNTAX + +### ID (Default) +``` +Get-TppEngineFolder [-ID] [-VenafiSession ] [] +``` + +### All +``` +Get-TppEngineFolder [-All] [-VenafiSession ] [] +``` + +## DESCRIPTION +When the input is a policy folder, retrieves an array of assigned TPP processing engines. +When the input is a TPP engine, retrieves an array of assigned policy folders. +If there are no matching assignments, nothing will be returned. + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-TppEngineFolder -Path '\VED\Engines\MYVENSERVER' +``` + +Get an array of policy folders assigned to the TPP processing engine 'MYVENSERVER'. + +### EXAMPLE 2 +``` +Get-TppEngineFolder -Path '\VED\Policy\Certificates\Web Team' +``` + +Get an array of TPP processing engines assigned to the policy folder '\VED\Policy\Certificates\Web Team'. + +### EXAMPLE 3 +``` +[guid]'866e1d59-d5d2-482a-b9e6-7bb657e0f416' | Get-TppEngineFolder +``` + +When the GUID is assigned to a TPP processing engine, returns an array of assigned policy folders. +When the GUID is assigned to a policy folder, returns an array of assigned TPP processing engines. +Otherwise nothing will be returned. + +## PARAMETERS + +### -ID +The full DN path or Guid to a TPP processing engine or policy folder. + +```yaml +Type: String +Parameter Sets: ID +Aliases: EngineGuid, Guid, EnginePath, Path + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -All +Get all engine/folder assignments + +```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 TPP token can also provided, but this requires an environment variable TPP_SERVER to be set. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $script:VenafiSession +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 + +### PSCustomObject +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Get-TppEngineFolder/](http://VenafiPS.readthedocs.io/en/latest/functions/Get-TppEngineFolder/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-TppEngineFolder.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-TppEngineFolder.ps1) + +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-GET-ProcessingEngines-Engine-eguid.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-GET-ProcessingEngines-Engine-eguid.php) + +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-GET-ProcessingEngines-Folder-fguid.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-GET-ProcessingEngines-Folder-fguid.php) + diff --git a/docs/functions/Get-TppObject.md b/docs/functions/Get-TppObject.md index e87a39c2..733859aa 100644 --- a/docs/functions/Get-TppObject.md +++ b/docs/functions/Get-TppObject.md @@ -38,7 +38,8 @@ Get an object by guid ## PARAMETERS ### -Path -The full path to the object +The full path to the object. +\ved\policy will be automatically applied if a full path isn't provided. ```yaml Type: String[] diff --git a/docs/functions/Get-VaasConnector.md b/docs/functions/Get-VaasConnector.md new file mode 100644 index 00000000..1e438d53 --- /dev/null +++ b/docs/functions/Get-VaasConnector.md @@ -0,0 +1,106 @@ +# Get-VaasConnector + +## SYNOPSIS +Get VaaS connectors + +## SYNTAX + +### ID (Default) +``` +Get-VaasConnector -ID [-VenafiSession ] [] +``` + +### All +``` +Get-VaasConnector [-All] [-VenafiSession ] [] +``` + +## DESCRIPTION +Get 1 or all VaaS connectors + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-VaasConnector -ID $my_guid +``` + +Get info for a specific connector + +### EXAMPLE 2 +``` +Get-VaasConnector -All +``` + +Get info for all connectors + +## PARAMETERS + +### -ID +Guid for the specific connector to retrieve + +```yaml +Type: Guid +Parameter Sets: ID +Aliases: connectorId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All +Get all connectors + +```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 VaaS key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $script:VenafiSession +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 + +### PSCustomObject +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Get-VaasConnector/](http://VenafiPS.readthedocs.io/en/latest/functions/Get-VaasConnector/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-VaasConnector.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Get-VaasConnector.ps1) + +[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_getAll](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_getAll) + +[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_getById](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_getById) + diff --git a/docs/functions/Get-VenafiCertificate.md b/docs/functions/Get-VenafiCertificate.md index b9ad76d2..ba91d0e7 100644 --- a/docs/functions/Get-VenafiCertificate.md +++ b/docs/functions/Get-VenafiCertificate.md @@ -5,20 +5,31 @@ Get certificate information ## SYNTAX -### All (Default) +### Id (Default) ``` -Get-VenafiCertificate [-VenafiSession ] [] +Get-VenafiCertificate -CertificateId [-VenafiSession ] [] ``` -### OldVersions +### TppOldVersions ``` -Get-VenafiCertificate -CertificateId [-IncludePreviousVersions] [-ExcludeExpired] [-ExcludeRevoked] +Get-VenafiCertificate -CertificateId [-IncludeTppPreviousVersions] [-ExcludeExpired] [-ExcludeRevoked] [-VenafiSession ] [] ``` -### Id +### VaasId ``` -Get-VenafiCertificate -CertificateId [-VenafiSession ] [] +Get-VenafiCertificate -CertificateId [-IncludeVaasOwner] [-VenafiSession ] + [] +``` + +### TppAll +``` +Get-VenafiCertificate [-IncludeTppPreviousVersions] [-All] [-VenafiSession ] [] +``` + +### VaasAll +``` +Get-VenafiCertificate [-IncludeVaasOwner] [-All] [-VenafiSession ] [] ``` ## DESCRIPTION @@ -28,51 +39,58 @@ Get certificate information, either all available to the api key provided or by ### EXAMPLE 1 ``` -Get-VenafiCertificate -Get certificate info for all certs +Get-VenafiCertificate -CertificateId 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' ``` +Get certificate info for a specific cert on Venafi as a Serivce + ### EXAMPLE 2 ``` -Get-VenafiCertificate -CertificateId 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -Get certificate info for a specific cert on Venafi as a Serivce +Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' ``` +Get certificate info for a specific cert on TPP + ### EXAMPLE 3 ``` -Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -Get certificate info for a specific cert on TPP +Get-VenafiCertificate -All ``` +Get certificate info for all certs in either TPP or VaaS + ### EXAMPLE 4 ``` -Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -IncludePreviousVersions -Get certificate info for a specific cert on TPP, including historical versions of the certificate. +Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -IncludeTppPreviousVersions ``` +Get certificate info for a specific cert on TPP, including historical versions of the certificate. + ### EXAMPLE 5 ``` -Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -IncludePreviousVersions -ExcludeRevoked -ExcludeExpired -Get certificate info for a specific cert on TPP, including historical versions of the certificate that are not revoked or expired. +Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -IncludeTppPreviousVersions -ExcludeRevoked -ExcludeExpired ``` +Get certificate info for a specific cert on TPP, including historical versions of the certificate that are not revoked or expired. + ### EXAMPLE 6 ``` -Find-TppCertificate | Get-VenafiCertificate -Get certificate info for all certs in TPP +Get-VenafiCertificate -CertificateId 'ca7ff555-88d2-4bfc-9efa-2630ac44c1f2' -IncludeVaasOwner ``` +In addition to certificate info, get user and team owner info as well + ## PARAMETERS ### -CertificateId -Certificate identifier. -For Venafi as a Service, this is the unique guid. -For TPP, use the full path. +Certificate identifier. +For Venafi as a Service, this is the unique guid. +For TPP, use the path or guid. +\ved\policy will be automatically applied if a full path isn't provided. ```yaml Type: String -Parameter Sets: OldVersions, Id -Aliases: Path +Parameter Sets: Id, TppOldVersions, VaasId +Aliases: Guid, Path Required: True Position: Named @@ -81,14 +99,14 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` -### -IncludePreviousVersions +### -IncludeTppPreviousVersions Returns details about previous (historical) versions of a certificate (only from TPP). This option will add a property named PreviousVersions to the returned object. ```yaml Type: SwitchParameter -Parameter Sets: OldVersions -Aliases: +Parameter Sets: TppOldVersions +Aliases: IncludePreviousVersions Required: True Position: Named @@ -97,13 +115,25 @@ Accept pipeline input: False Accept wildcard characters: False ``` +```yaml +Type: SwitchParameter +Parameter Sets: TppAll +Aliases: IncludePreviousVersions + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ExcludeExpired Omits expired versions of the previous (historical) versions of a certificate (only from TPP). Can only be used with the IncludePreviousVersions parameter. ```yaml Type: SwitchParameter -Parameter Sets: OldVersions +Parameter Sets: TppOldVersions Aliases: Required: False @@ -119,7 +149,23 @@ Can only be used with the IncludePreviousVersions parameter. ```yaml Type: SwitchParameter -Parameter Sets: OldVersions +Parameter Sets: TppOldVersions +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeVaasOwner +Retrieve detailed user/team owner info, only for VaaS. +This will cause additional api calls to be made and take longer. + +```yaml +Type: SwitchParameter +Parameter Sets: VaasId, VaasAll Aliases: Required: False @@ -129,6 +175,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -All +Retrieve all certificates + +```yaml +Type: SwitchParameter +Parameter Sets: TppAll, VaasAll +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. @@ -152,7 +213,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### CertificateId/Path from TppObject +### CertificateId ## OUTPUTS ### PSCustomObject diff --git a/docs/functions/Invoke-VenafiCertificateAction.md b/docs/functions/Invoke-VenafiCertificateAction.md index fdb8170f..c08faf4d 100644 --- a/docs/functions/Invoke-VenafiCertificateAction.md +++ b/docs/functions/Invoke-VenafiCertificateAction.md @@ -7,61 +7,84 @@ Perform an action against a certificate on TPP or VaaS ### Retire ``` -Invoke-VenafiCertificateAction -CertificateId [-Retire] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Retire] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ### Reset ``` -Invoke-VenafiCertificateAction -CertificateId [-Reset] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Reset] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ### Renew ``` -Invoke-VenafiCertificateAction -CertificateId [-Renew] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Renew] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ### Push ``` -Invoke-VenafiCertificateAction -CertificateId [-Push] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Push] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ### Validate ``` -Invoke-VenafiCertificateAction -CertificateId [-Validate] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Validate] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ### Revoke ``` -Invoke-VenafiCertificateAction -CertificateId [-Revoke] [-AdditionalParameters ] +Invoke-VenafiCertificateAction -CertificateID [-Revoke] [-AdditionalParameters ] + [-VenafiSession ] [-WhatIf] [-Confirm] [] +``` + +### Delete +``` +Invoke-VenafiCertificateAction -CertificateID [-Delete] [-AdditionalParameters ] [-VenafiSession ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION One stop shop for basic certificate actions against either TPP or VaaS. -When supported by the platform, you can Retire, Reset, Renew, Push, Validate, or Revoke. +When supported by the platform, you can Retire, Reset, Renew, Push, Validate, Revoke, or Delete. ## EXAMPLES ### EXAMPLE 1 ``` -Invoke-VenafiCertificateAction -CertificateId '\VED\Policy\My folder\app.mycompany.com' -Revoke -Perform an action +Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Revoke ``` +Perform an action + ### EXAMPLE 2 ``` -Invoke-VenafiCertificateAction -CertificateId '\VED\Policy\My folder\app.mycompany.com' -Revoke -AdditionalParameters @{'Comments'='Key compromised'} -Perform an action sending additional parameters. +Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Delete -Confirm:$false +``` + +Perform an action bypassing the confirmation prompt. +Only applicable to revoke and delete. + +### EXAMPLE 3 +``` +Invoke-VenafiCertificateAction -CertificateID 'b7f1ab29-34a0-49ba-b801-cc9cd855fd24' -Revoke -Confirm:$false | Invoke-VenafiCertificateAction -Delete -Confirm:$false +``` + +Chain multiple actions together + +### EXAMPLE 4 +``` +Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Revoke -AdditionalParameters @{'Comments'='Key compromised'} ``` +Perform an action sending additional parameters. + ## PARAMETERS -### -CertificateId +### -CertificateID Certificate identifier. For Venafi as a Service, this is the unique guid. For TPP, use the full path. @@ -172,6 +195,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Delete +Delete a certificate. + +```yaml +Type: SwitchParameter +Parameter Sets: Delete +Aliases: + +Required: True +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. @@ -242,11 +280,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### CertificateId +### CertificateID ## OUTPUTS ### PSCustomObject with the following properties: -### CertificateId - Certificate path (TPP) or Guid (VaaS) +### CertificateID - Certificate path (TPP) or Guid (VaaS) ### Success - A value of true indicates that the action was successful ### Error - Indicates any errors that occurred. Not returned when Success is true ## NOTES @@ -269,3 +307,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [https://api.venafi.cloud/webjars/swagger-ui/index.html?configUrl=%2Fv3%2Fapi-docs%2Fswagger-config&urls.primaryName=outagedetection-service](https://api.venafi.cloud/webjars/swagger-ui/index.html?configUrl=%2Fv3%2Fapi-docs%2Fswagger-config&urls.primaryName=outagedetection-service) +[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=outagedetection-service#/Certificates/certificateretirement_deleteCertificates](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=outagedetection-service#/Certificates/certificateretirement_deleteCertificates) + diff --git a/docs/functions/New-VaasConnector.md b/docs/functions/New-VaasConnector.md new file mode 100644 index 00000000..8c69d8ab --- /dev/null +++ b/docs/functions/New-VaasConnector.md @@ -0,0 +1,190 @@ +# New-VaasConnector + +## SYNOPSIS +Create a new connector + +## SYNTAX + +``` +New-VaasConnector [-Name] [-Url] [-EventType] [[-Token] ] + [-PassThru] [[-VenafiSession] ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a new connector + +## EXAMPLES + +### EXAMPLE 1 +``` +New-VaasConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' +``` + +Create a new connector + +### EXAMPLE 2 +``` +New-VaasConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication', 'Certificates', 'Applications' +``` + +Create a new connector with multiple event types + +### EXAMPLE 3 +``` +New-VaasConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' -Token $myTokenCred +``` + +Create a new connector with optional token + +### EXAMPLE 4 +``` +New-VaasConnector -Name 'MyConnector' -Url 'https://my.com/endpoint' -EventType 'Authentication' -PassThru +``` + +Create a new connector returning the newly created object + +## PARAMETERS + +### -Name +Connector name + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Url +Endpoint to be called when the event type is triggered + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +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: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Token +Token/secret to pass to Url for authentication. +Set the token as the password on a pscredential. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Return newly created connector 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 VaaS key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: $script:VenafiSession +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 +``` + +### 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 + +[http://VenafiPS.readthedocs.io/en/latest/functions/New-VaasConnector/](http://VenafiPS.readthedocs.io/en/latest/functions/New-VaasConnector/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-VaasConnector.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/New-VaasConnector.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) + diff --git a/docs/functions/Remove-TppEngineFolder.md b/docs/functions/Remove-TppEngineFolder.md new file mode 100644 index 00000000..ff5af8dc --- /dev/null +++ b/docs/functions/Remove-TppEngineFolder.md @@ -0,0 +1,157 @@ +# Remove-TppEngineFolder + +## SYNOPSIS +Remove TPP processing engine assignment(s) from policy folder(s) + +## SYNTAX + +### Matrix +``` +Remove-TppEngineFolder -FolderPath -EnginePath [-VenafiSession ] [-WhatIf] + [-Confirm] [] +``` + +### AllEngines +``` +Remove-TppEngineFolder -FolderPath [-VenafiSession ] [-WhatIf] [-Confirm] + [] +``` + +### AllFolders +``` +Remove-TppEngineFolder -EnginePath [-VenafiSession ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Remove TPP processing engine assignment(s) from policy folder(s). + +If you do not supply a list of TPP processing engines, then all processing engines will be removed from the supplied list of policy folders. + +If you do not supply a list of policy folders, then all policy folder assignments will be removed from the supplied list of processing engines. + +Supplying both a list of policy folders and processing engines will result in the removal of the specified engines from the list of policy folders. + +Errors due to a policy engine not being assigned to the listed policy folder are ignored. + +## EXAMPLES + +### EXAMPLE 1 +``` +Remove-TppEngineFolder -FolderPath '\VED\Policy\Certificates\Web Team' -EnginePath @('\VED\Engines\MYVENAFI01','\VED\Engines\MYVENAFI02') +Remove policy folder '\VED\Policy\Certificates\Web Team' from the processing engines MYVENAFI01 and MYVENAFI02. +``` + +### EXAMPLE 2 +``` +Remove-TppEngineFolder -FolderPath @('\VED\Policy\Certificates\Web Team','\VED\Policy\Certificates\Database Team') +Remove all processing engine assignments for the policy folders '\VED\Policy\Certificates\Web Team' and '\VED\Policy\Certificates\Database Team'. +``` + +### EXAMPLE 3 +``` +Remove-TppEngineFolder -EnginePath @('\VED\Engines\MYVENAFI01','\VED\Engines\MYVENAFI02') -Confirm:$false +Removed all policy folder assignments from the processing engines MYVENAFI01 and MYVENAFI02. Suppress the confirmation prompt. +``` + +## PARAMETERS + +### -FolderPath +The full DN path to one or more policy folders (string array). + +```yaml +Type: String[] +Parameter Sets: Matrix, AllEngines +Aliases: FolderDN, Folder + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnginePath +The full DN path to one or more TPP processing engines (string array). + +```yaml +Type: String[] +Parameter Sets: Matrix, AllFolders +Aliases: EngineDN, Engine + +Required: True +Position: Named +Default value: None +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 TPP token can also provided, but this requires an environment variable TPP_SERVER to be set. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $script:VenafiSession +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 +``` + +### 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 + +### FolderPath[], EnginePath[] +## OUTPUTS + +### None +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Remove-TppEngineFolder/](http://VenafiPS.readthedocs.io/en/latest/functions/Remove-TppEngineFolder/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Remove-TppEngineFolder.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Remove-TppEngineFolder.ps1) + +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-DELETE-ProcessingEngines-Folder-fguid.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-DELETE-ProcessingEngines-Folder-fguid.php) + +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-DELETE-ProcessingEngines-Folder-fguid-eguid.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-DELETE-ProcessingEngines-Folder-fguid-eguid.php) + diff --git a/docs/functions/Remove-VaasConnector.md b/docs/functions/Remove-VaasConnector.md new file mode 100644 index 00000000..9182169f --- /dev/null +++ b/docs/functions/Remove-VaasConnector.md @@ -0,0 +1,107 @@ +# Remove-VaasConnector + +## SYNOPSIS +Remove a VaaS connector + +## SYNTAX + +``` +Remove-VaasConnector [-ID] [[-VenafiSession] ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Remove a VaaS connector + +## EXAMPLES + +### EXAMPLE 1 +``` +Remove-VaasConnector -ID $my_guid +``` + +Remove a connector + +## PARAMETERS + +### -ID +Guid of the connector + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: connectorId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -VenafiSession +Authentication for the function. +The value defaults to the script session object $VenafiSession created by New-VenafiSession. +A VaaS key can also provided. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: $script:VenafiSession +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 +``` + +### 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 + +### None +## NOTES + +## RELATED LINKS + +[http://VenafiPS.readthedocs.io/en/latest/functions/Remove-VaasConnector/](http://VenafiPS.readthedocs.io/en/latest/functions/Remove-VaasConnector/) + +[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Remove-VaasConnector.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Remove-VaasConnector.ps1) + +[https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_delete](https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=connectors-service#/Connectors/connectors_delete) + diff --git a/mkdocs.yml b/mkdocs.yml index e575c769..bbc2d829 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -28,6 +28,7 @@ nav: - Changelog: changelog.md - Functions: - Add-TppCertificateAssociation: functions/Add-TppCertificateAssociation.md + - Add-TppEngineFolder: functions/Add-TppEngineFolder.md - Add-VenafiTeamMember: functions/Add-VenafiTeamMember.md - Add-VenafiTeamOwner: functions/Add-VenafiTeamOwner.md - Convert-TppObject: functions/Convert-TppObject.md @@ -38,6 +39,7 @@ nav: - Find-TppCodeSignEnvironment: functions/Find-TppCodeSignEnvironment.md - Find-TppCodeSignProject: functions/Find-TppCodeSignProject.md - Find-TppCodeSignTemplate: functions/Find-TppCodeSignTemplate.md + - Find-TppEngine: functions/Find-TppEngine.md - Find-TppIdentity: functions/Find-TppIdentity.md - Find-TppObject: functions/Find-TppObject.md - Find-TppVaultId: functions/Find-TppVaultId.md @@ -49,6 +51,7 @@ nav: - Get-TppCodeSignProject: functions/Get-TppCodeSignProject.md - Get-TppCredential: functions/Get-TppCredential.md - Get-TppCustomField: functions/Get-TppCustomField.md + - Get-TppEngineFolder: functions/Get-TppEngineFolder.md - Get-TppIdentityAttribute: functions/Get-TppIdentityAttribute.md - Get-TppObject: functions/Get-TppObject.md - Get-TppPermission: functions/Get-TppPermission.md @@ -56,6 +59,7 @@ nav: - Get-TppVersion: functions/Get-TppVersion.md - Get-TppWorkflowTicket: functions/Get-TppWorkflowTicket.md - Get-VaasApplication: functions/Get-VaasApplication.md + - Get-VaasConnector: functions/Get-VaasConnector.md - Get-VaasIssuingTemplate: functions/Get-VaasIssuingTemplate.md - Get-VenafiCertificate: functions/Get-VenafiCertificate.md - Get-VenafiIdentity: functions/Get-VenafiIdentity.md @@ -76,6 +80,7 @@ nav: - New-TppPolicy: functions/New-TppPolicy.md - New-TppToken: functions/New-TppToken.md - New-VaasApplication: functions/New-VaasApplication.md + - New-VaasConnector: functions/New-VaasConnector.md - New-VenafiSession: functions/New-VenafiSession.md - New-VenafiTeam: functions/New-VenafiTeam.md - Read-VenafiLog: functions/Read-VenafiLog.md @@ -84,7 +89,9 @@ nav: - Remove-TppClient: functions/Remove-TppClient.md - Remove-TppCodeSignEnvironment: functions/Remove-TppCodeSignEnvironment.md - Remove-TppCodeSignProject: functions/Remove-TppCodeSignProject.md + - Remove-TppEngineFolder: functions/Remove-TppEngineFolder.md - Remove-TppPermission: functions/Remove-TppPermission.md + - Remove-VaasConnector: functions/Remove-VaasConnector.md - Remove-VenafiTeam: functions/Remove-VenafiTeam.md - Remove-VenafiTeamMember: functions/Remove-VenafiTeamMember.md - Remove-VenafiTeamOwner: functions/Remove-VenafiTeamOwner.md