Skip to content

Commit

Permalink
Update manifest and docs to 3.4.0 ***NO_CI***
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbarron committed Nov 27, 2021
1 parent 7a97a22 commit 07b229b
Show file tree
Hide file tree
Showing 9 changed files with 532 additions and 138 deletions.
48 changes: 24 additions & 24 deletions VenafiPS/VenafiPS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Greg Brownstein
#
# Generated on: 11/9/2021
# Generated on: 11/27/2021
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'VenafiPS.psm1'

# Version number of this module.
ModuleVersion = '3.4'
ModuleVersion = '3.4.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -69,28 +69,28 @@ 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 = 'Add-TppCertificateAssociation', 'ConvertTo-TppGuid',
'ConvertTo-TppPath', 'Export-VenafiCertificate',
'Find-TppCertificate', 'Find-TppCodeSignEnvironment',
'Find-TppCodeSignProject', 'Find-TppCodeSignTemplate',
'Find-TppIdentity', 'Find-TppObject', 'Get-TppAttribute',
'Get-TppClassAttribute', 'Get-TppCodeSignConfig',
'Get-TppCodeSignEnvironment', 'Get-TppCodeSignProject',
'Get-TppCustomField', 'Get-TppIdentity', 'Get-TppIdentityAttribute',
'Get-TppObject', 'Get-TppPermission', 'Get-TppSystemStatus',
'Get-TppVersion', 'Get-TppWorkflowTicket', 'Get-VaasApplication',
'Get-VaasOrgUnit', 'Get-VenafiCertificate', 'Import-TppCertificate',
'Invoke-TppCertificatePush', 'Invoke-TppCertificateRenewal',
'Invoke-VenafiRestMethod', 'Move-TppObject', 'New-TppCapiApplication',
'New-TppCertificate', 'New-TppCodeSignProject', 'New-TppDevice',
'New-TppObject', 'New-TppPolicy', 'New-TppToken', 'New-VenafiSession',
'Read-TppLog', 'Remove-TppCertificate',
'Remove-TppCertificateAssociation', 'Remove-TppCodeSignEnvironment',
'Remove-TppCodeSignProject', 'Remove-TppPermission',
'Rename-TppObject', 'Revoke-TppCertificate', 'Revoke-TppToken',
'Set-TppAttribute', 'Set-TppCodeSignProjectStatus',
'Set-TppPermission', 'Set-TppWorkflowTicketStatus', 'Test-ModuleHash',
'Test-TppIdentity', 'Test-TppObject', 'Test-TppToken', 'Write-TppLog', 'Invoke-VenafiCertificateAction'
FunctionsToExport = 'Add-TppCertificateAssociation', 'ConvertTo-TppGuid',
'ConvertTo-TppPath', 'Export-VenafiCertificate',
'Find-TppCertificate', 'Find-TppCodeSignEnvironment',
'Find-TppCodeSignProject', 'Find-TppCodeSignTemplate',
'Find-TppIdentity', 'Find-TppObject', 'Get-TppAttribute',
'Get-TppClassAttribute', 'Get-TppCodeSignConfig',
'Get-TppCodeSignEnvironment', 'Get-TppCodeSignProject',
'Get-TppCustomField', 'Get-TppIdentity', 'Get-TppIdentityAttribute',
'Get-TppObject', 'Get-TppPermission', 'Get-TppSystemStatus',
'Get-TppVersion', 'Get-TppWorkflowTicket', 'Get-VaasApplication',
'Get-VaasOrgUnit', 'Get-VenafiCertificate', 'Import-TppCertificate',
'Invoke-TppCertificatePush', 'Invoke-TppCertificateRenewal',
'Invoke-VenafiCertificateAction', 'Invoke-VenafiRestMethod',
'Move-TppObject', 'New-TppCapiApplication', 'New-TppCertificate',
'New-TppCodeSignProject', 'New-TppDevice', 'New-TppObject',
'New-TppPolicy', 'New-TppToken', 'New-VenafiSession', 'Read-TppLog',
'Remove-TppCertificate', 'Remove-TppCertificateAssociation',
'Remove-TppCodeSignEnvironment', 'Remove-TppCodeSignProject',
'Remove-TppPermission', 'Rename-TppObject', 'Revoke-TppCertificate',
'Revoke-TppToken', 'Set-TppAttribute', 'Set-TppCodeSignProjectStatus',
'Set-TppPermission', 'Set-TppWorkflowTicketStatus', 'Test-ModuleHash',
'Test-TppIdentity', 'Test-TppObject', 'Test-TppToken', 'Write-TppLog'

# 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
8 changes: 8 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 3.4.0
- Add `-All` option to `Get-TppAttribute` to get ALL effective attribute values for an object. This will provide the values as well as the path where the policy was applied
- Add getting policies (policy attributes) with `Get-TppAttribute`
- Add setting policies (policy attributes) with `Set-TppAttribute`
- Add `Invoke-VenafiCertificateAction`. This is your one stop shop for certificate actions on TPP or VaaS. You can Retire, Reset, Renew, Push, Validate, or Revoke.
- Cleanup output and verbose logging with `Remove-TppCertificate`
- Fix parameter set issue in `New-VenafiSession`, ensure version and custom field info retrieval doesn't occur when creating a VaaS session

## 3.3.1
- Remove validation/limitation from `Get-TppCustomField` to only retrieve classes of type X509 Certificate and Device
- Retrieve Application Base custom fields during `New-VenafiSession`
Expand Down
139 changes: 115 additions & 24 deletions docs/functions/Get-TppAttribute.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@
# Get-TppAttribute

## SYNOPSIS
Get attributes for a given object
Get object attributes as well as policies (policy attributes)

## SYNTAX

### ByPath (Default)
```
Get-TppAttribute -Path <String[]> [-Attribute <String[]>] [-VenafiSession <VenafiSession>] [<CommonParameters>]
Get-TppAttribute -Path <String> [-Attribute <String[]>] [-VenafiSession <VenafiSession>] [<CommonParameters>]
```

### AllByPath
### PolicyPath
```
Get-TppAttribute -Path <String[]> [-VenafiSession <VenafiSession>] [<CommonParameters>]
Get-TppAttribute -Path <String> -Attribute <String[]> [-Policy] -ClassName <String>
[-VenafiSession <VenafiSession>] [<CommonParameters>]
```

### AllEffectivePath
```
Get-TppAttribute -Path <String> [-All] [-VenafiSession <VenafiSession>] [<CommonParameters>]
```

### EffectiveByPath
```
Get-TppAttribute -Path <String[]> -Attribute <String[]> [-Effective] [-VenafiSession <VenafiSession>]
Get-TppAttribute -Path <String> -Attribute <String[]> [-Effective] [-VenafiSession <VenafiSession>]
[<CommonParameters>]
```

### ByGuid
```
Get-TppAttribute -Guid <Guid[]> [-Attribute <String[]>] [-VenafiSession <VenafiSession>] [<CommonParameters>]
Get-TppAttribute -Guid <Guid> [-Attribute <String[]>] [-VenafiSession <VenafiSession>] [<CommonParameters>]
```

### EffectiveByGuid
```
Get-TppAttribute -Guid <Guid[]> -Attribute <String[]> [-Effective] [-VenafiSession <VenafiSession>]
Get-TppAttribute -Guid <Guid> -Attribute <String[]> [-Effective] [-VenafiSession <VenafiSession>]
[<CommonParameters>]
```

## DESCRIPTION
Retrieves object attributes.
Retrieves object attributes as well as policies (aka 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
EffectivePolicy switch.
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.

## EXAMPLES

Expand All @@ -45,21 +53,35 @@ EffectivePolicy switch.
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com'
```

Retrieve all configurations for a certificate
Retrieve all values for an object, excluding values assigned by policy

### EXAMPLE 2
```
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com' -EffectivePolicy
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com' -AttributeName 'driver name'
```

Retrieve all effective configurations for a certificate
Retrieve the value for a specific attribute

### EXAMPLE 3
```
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com' -AttributeName 'driver name'
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com' -AttributeName 'Contact' -Effective
```

Retrieve all the value for attribute driver name from certificate myapp.company.com
Retrieve the effective value for a specific attribute

### EXAMPLE 4
```
Get-TppAttribute -Path '\VED\Policy\My Folder\myapp.company.com' -All
```

Retrieve all effective values for an object

### EXAMPLE 5
```
Get-TppAttribute -Path '\VED\Policy\My Folder' -Policy -Class 'X509 Certificate' -AttributeName 'Contact'
```

Retrieve the policy attribute value for the specified policy folder

## PARAMETERS

Expand All @@ -68,8 +90,20 @@ Path to the object to retrieve configuration attributes.
Just providing DN will return all attributes.

```yaml
Type: String[]
Parameter Sets: ByPath, AllByPath, EffectiveByPath
Type: String
Parameter Sets: ByPath, EffectiveByPath
Aliases: DN

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
```yaml
Type: String
Parameter Sets: PolicyPath, AllEffectivePath
Aliases: DN

Required: True
Expand All @@ -80,11 +114,12 @@ Accept wildcard characters: False
```
### -Guid
To be deprecated; use -Path instead.
Object Guid.
Just providing Guid will return all attributes.
```yaml
Type: Guid[]
Type: Guid
Parameter Sets: ByGuid, EffectiveByGuid
Aliases:

Expand Down Expand Up @@ -112,7 +147,7 @@ Accept wildcard characters: False
```yaml
Type: String[]
Parameter Sets: EffectiveByPath, EffectiveByGuid
Parameter Sets: PolicyPath, EffectiveByPath, EffectiveByGuid
Aliases:

Required: True
Expand All @@ -123,7 +158,8 @@ Accept wildcard characters: False
```
### -Effective
Get the effective values of the attribute
Get the objects attribute value, once policies have been applied.
This is not applicable to policies, only objects.
```yaml
Type: SwitchParameter
Expand All @@ -137,6 +173,56 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -All
Get all effective object attribute values.
This will perform 3 steps, get the object type, enumerate the attributes for the object type, and get all the effective values.
The output will contain the path where the policy was applied from.
Note, expect this to take longer than usual given the number of api calls.
```yaml
Type: SwitchParameter
Parameter Sets: AllEffectivePath
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Policy
Get policies (aka policy attributes) instead of object attributes
```yaml
Type: SwitchParameter
Parameter Sets: PolicyPath
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ClassName
Required when getting policy 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.
```yaml
Type: String
Parameter Sets: PolicyPath
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -VenafiSession
Session object created from New-VenafiSession method.
The value defaults to the script session object $VenafiSession.
Expand All @@ -158,10 +244,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS
### Path, Guid
### Path
## OUTPUTS
### PSCustomObject with properties Name, Value, IsCustomField, and CustomName
### PSCustomObject with properties:
### - Name
### - Value
### - PolicyPath (only applicable with -All)
### - IsCustomField (not applicable to policies)
### - CustomName (not applicable to policies)
## NOTES
## RELATED LINKS
Expand All @@ -170,9 +261,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[https://github.com/gdbarron/VenafiPS/blob/main/VenafiPS/Public/Get-TppAttribute.ps1](https://github.com/gdbarron/VenafiPS/blob/main/VenafiPS/Public/Get-TppAttribute.ps1)
[https://docs.venafi.com/Docs/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-read.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____27](https://docs.venafi.com/Docs/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-read.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____27)
[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/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readall.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____28](https://docs.venafi.com/Docs/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readall.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____28)
[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/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readeffectivepolicy.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____31](https://docs.venafi.com/Docs/20.4SDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Config-readeffectivepolicy.php?tocpath=Web%20SDK%7CConfig%20programming%20interface%7C_____31)
[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)
7 changes: 7 additions & 0 deletions docs/functions/Get-VenafiCertificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ Get-VenafiCertificate -CertificateId '\ved\policy\mycert.com' -IncludePreviousVe

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

## PARAMETERS

### -CertificateId
Expand Down
Loading

0 comments on commit 07b229b

Please sign in to comment.