Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect documentation page for find vdcobject function #303

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="images/full_venafi_logo.png" alt="Venafi"/>
<img src="images/full-venafi-logo.png" alt="Venafi"/>
</p>

# VenafiPS - Automate your Venafi TLS Protect Datacenter and Cloud platforms!
Expand All @@ -10,7 +10,7 @@
[![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/VenafiPS?style=plastic)](https://www.powershellgallery.com/packages/VenafiPS)
![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VenafiPS?style=plastic)

Welcome to VenafiPS. Here you will find a PowerShell module to automate Venafi TLS Protect Datacenter (TLSPDC), formerly known as Trust Protection Platform, and TLS Protect Cloud (TLSPC). Please let us know how you are using this module and what we can do to make it better! Ask questions or feel free to [submit an issue/enhancement](https://github.com/Venafi/VenafiPS/issues).
Welcome to VenafiPS (where the PS stands for PowerShell, not Professional Services :smiley:). Here you will find a PowerShell module to automate Venafi TLS Protect Datacenter (TLSPDC), formerly known as Trust Protection Platform, and TLS Protect Cloud (TLSPC). Please let us know how you are using this module and what we can do to make it better! Ask questions or feel free to [submit an issue/enhancement](https://github.com/Venafi/VenafiPS/issues).

## Documentation

Expand Down
10 changes: 3 additions & 7 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
- Merge all functions into 1 psm1 module. This yields much better performance, especially when running multithreaded.
- Add multithreading support on PS v5 with the Microsoft.PowerShell.ThreadJob module (installed separately). If the module isn't installed, multithreading will be disabled. Set `-ThrottleLimit` to 1 on the functions that support it to disable multithreading on PS v5 and v7.
- Module now available in the GitHub release. This is helpful for those without access to PowerShell Gallery, although that is the preferred option.
- PSSodium, needed for several TLSPC functions for encryption, is no longer directly included in the module. Install it from the Gallery.
- The VenafiSession class has been deprecated and replaced with a PSCustomObject equivalent
- Key based authentication on TLSPDC has been deprecated
- Default `Invoke-VdcCertificateAction -Push` to push to all applications and added an example to override and push to specific applications
- Fix Find-VdcObject documentation page not building, [#302](https://github.com/Venafi/VenafiPS/issues/302)
- Rebranding post CyberArk acquisition
- Add specific exception types when working with invalid paths or access issues on VDC objects
3 changes: 1 addition & 2 deletions Tests/ModuleExports.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ BeforeAll {
}
Describe 'ExportedFunctions' {
BeforeAll {
$ps1FileNames = Get-ChildItem -Path "$($moduleInfo | Where-Object{$_.name -eq 'venafips'} | Select-Object -exp modulebase)\Public\*.ps1" -Exclude *tests.ps1, *profile.ps1 |
Select-Object -ExpandProperty BaseName
$ps1FileNames = Get-ChildItem -Path "$($moduleInfo | Where-Object{$_.name -eq 'venafips'} | Select-Object -exp modulebase)\Public\*.ps1" -Exclude *tests.ps1, *profile.ps1 | Select-Object -ExpandProperty BaseName

$exportedFunctions = Get-Command -Module $moduleInfo.Name -CommandType Function | Select-Object -ExpandProperty Name
}
Expand Down
41 changes: 28 additions & 13 deletions VenafiPS/Public/ConvertTo-VdcGuid.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function ConvertTo-VdcGuid {
[ValidateScript( {
if ( $_ | Test-TppDnPath ) {
$true
} else {
}
else {
throw "'$_' is not a valid DN path"
}
})]
Expand All @@ -54,9 +55,9 @@ function ConvertTo-VdcGuid {
Test-VenafiSession -VenafiSession $VenafiSession -Platform 'VDC'

$params = @{
Method = 'Post'
UriLeaf = 'config/DnToGuid'
Body = @{
Method = 'Post'
UriLeaf = 'config/DnToGuid'
Body = @{
ObjectDN = ''
}
}
Expand All @@ -68,17 +69,31 @@ function ConvertTo-VdcGuid {

$response = Invoke-VenafiRestMethod @params

if ( $response.Result -eq 1 ) {
if ( $IncludeType ) {
[PSCustomObject] @{
Guid = [Guid] $response.Guid
TypeName = $response.ClassName
switch ($response.Result) {
1 {
# success
if ( $IncludeType ) {
[PSCustomObject] @{
Guid = [Guid] $response.Guid
TypeName = $response.ClassName
}
}
else {
[Guid] $response.Guid
}
} else {
[Guid] $response.Guid
}
} else {
throw $response.Error

7 {
throw [System.UnauthorizedAccessException]::new($response.Error)
}

400 {
throw [System.Management.Automation.ItemNotFoundException]::new($response.Error)
}

Default {
throw $response.Error
}
}
}
}
2 changes: 1 addition & 1 deletion VenafiPS/Public/Find-VdcObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Find-VdcObject {
If the Attribute parameter is provided, this will filter against an object's attribute/custom field values instead of the path.

Follow the below rules:
- To list DNs that include an asterisk (*) or question mark (?), prepend two backslashes (\\). For example, \\*.MyCompany.net treats the asterisk as a literal character and returns only certificates with DNs that match *.MyCompany.net.
- To list DNs that include an asterisk or question mark, prepend the character with two backslashes.
- To list DNs with a wildcard character, append a question mark (?). For example, "test_?.mycompany.net" counts test_1.MyCompany.net and test_2.MyCompany.net but not test12.MyCompany.net.
- To list DNs with similar names, prepend an asterisk. For example, *est.MyCompany.net, counts Test.MyCompany.net and West.MyCompany.net.
You can also use both literals and wildcards in a pattern.
Expand Down
2 changes: 1 addition & 1 deletion VenafiPS/VenafiPS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ PowerShellVersion = '5.1'
# NestedModules = @()

# Functions 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 functions to export.
FunctionsToExport = '*'
FunctionsToExport = @('Add-VcCertificateAssociation','Add-VcTeamMember','Add-VcTeamOwner','Add-VdcAdaptableHash','Add-VdcCertificateAssociation','Add-VdcEngineFolder','Add-VdcTeamMember','Add-VdcTeamOwner','Convert-VdcObject','ConvertTo-VdcGuid','ConvertTo-VdcPath','Export-VcCertificate','Export-VdcCertificate','Export-VdcVaultObject','Find-VcCertificate','Find-VcCertificateInstance','Find-VcCertificateRequest','Find-VcLog','Find-VcMachine','Find-VcMachineIdentity','Find-VdcCertificate','Find-VdcClient','Find-VdcEngine','Find-VdcIdentity','Find-VdcObject','Find-VdcVaultId','Get-VcApplication','Get-VcCertificate','Get-VcConnector','Get-VcIssuingTemplate','Get-VcMachine','Get-VcMachineIdentity','Get-VcSatellite','Get-VcTag','Get-VcTeam','Get-VcUser','Get-VcWebhook','Get-VdcAttribute','Get-VdcCertificate','Get-VdcClassAttribute','Get-VdcCredential','Get-VdcCustomField','Get-VdcEngineFolder','Get-VdcIdentity','Get-VdcIdentityAttribute','Get-VdcObject','Get-VdcPermission','Get-VdcSystemStatus','Get-VdcTeam','Get-VdcVersion','Get-VdcWorkflowTicket','Import-VcCertificate','Import-VdcCertificate','Invoke-VcCertificateAction','Invoke-VcWorkflow','Invoke-VdcCertificateAction','Invoke-VenafiRestMethod','Move-VdcObject','New-VcApplication','New-VcCertificate','New-VcConnector','New-VcMachine','New-VcMachineCommonKeystore','New-VcMachineIis','New-VcTeam','New-VcWebhook','New-VdcCapiApplication','New-VdcCertificate','New-VdcCustomField','New-VdcDevice','New-VdcObject','New-VdcPolicy','New-VdcTeam','New-VdcToken','New-VenafiSession','Read-VdcLog','Remove-VcApplication','Remove-VcCertificate','Remove-VcConnector','Remove-VcIssuingTemplate','Remove-VcMachine','Remove-VcMachineIdentity','Remove-VcTag','Remove-VcTeam','Remove-VcTeamMember','Remove-VcTeamOwner','Remove-VcWebhook','Remove-VdcCertificate','Remove-VdcCertificateAssociation','Remove-VdcClient','Remove-VdcEngineFolder','Remove-VdcObject','Remove-VdcPermission','Remove-VdcTeam','Remove-VdcTeamMember','Remove-VdcTeamOwner','Rename-VdcObject','Revoke-VdcGrant','Revoke-VdcToken','Search-VdcHistory','Set-VcApplication','Set-VcConnector','Set-VcTeam','Set-VdcAttribute','Set-VdcCredential','Set-VdcPermission','Set-VdcWorkflowTicketStatus','Test-VdcIdentity','Test-VdcObject','Test-VdcToken','Write-VdcLog')

# 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 = @()
Expand Down
Binary file added docs/images/full-venafi-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="images/full_venafi_logo.png" alt="Venafi"/>
<img src="images/full-venafi-logo.png" alt="Venafi"/>
</p>

# VenafiPS - Automate your Venafi TLS Protect Datacenter and Cloud platforms!
Expand All @@ -10,7 +10,7 @@
[![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/VenafiPS?style=plastic)](https://www.powershellgallery.com/packages/VenafiPS)
![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/VenafiPS?style=plastic)

Welcome to VenafiPS. Here you will find a PowerShell module to automate Venafi TLS Protect Datacenter (TLSPDC), formerly known as Trust Protection Platform, and TLS Protect Cloud (TLSPC). Please let us know how you are using this module and what we can do to make it better! Ask questions or feel free to [submit an issue/enhancement](https://github.com/Venafi/VenafiPS/issues).
Welcome to VenafiPS (where the PS stands for PowerShell, not Professional Services :smiley:). Here you will find a PowerShell module to automate Venafi TLS Protect Datacenter (TLSPDC), formerly known as Trust Protection Platform, and TLS Protect Cloud (TLSPC). Please let us know how you are using this module and what we can do to make it better! Ask questions or feel free to [submit an issue/enhancement](https://github.com/Venafi/VenafiPS/issues).

## Documentation

Expand Down
Binary file added images/full-venafi-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/full_venafi_logo.png
Binary file not shown.