-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
703 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Add-TppAdaptableHash | ||
|
||
## SYNOPSIS | ||
Adds or updates the hash value for an adaptable script | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Add-TppAdaptableHash [-Path] <String> [[-Keyname] <String>] [-FilePath] <String> [[-VenafiSession] <PSObject>] | ||
[-WhatIf] [-Confirm] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
TPP stores a base64 encoded hash of the file contents of an adaptable script in the Secret Store. | ||
This is referenced by | ||
the Attribute 'PowerShell Script Hash Vault Id' on the DN of the adaptable script. | ||
This script retrieves the hash (if | ||
present) from the Secret Store and compares it to the hash of the file in one of the scripts directories. | ||
It then adds | ||
a new or updated hash if required. | ||
When updating an existing hash, it removes the old one from the Secret Store. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
Add-TppAdaptableHash -Path $Path -FilePath 'C:\Program Files\Venafi\Scripts\AdaptableApp\AppDriver.ps1' | ||
``` | ||
|
||
Update the hash on an adaptable app object. | ||
|
||
Note: For an adaptable app or an onboard discovery, 'Path' must always be a policy folder as this is where | ||
the hash is saved. | ||
|
||
### EXAMPLE 2 | ||
``` | ||
Add-TppAdaptableHash -Path $Path -FilePath 'C:\Program Files\Venafi\Scripts\AdaptableLog\Generic-LogDriver.ps1' | ||
``` | ||
|
||
Update the hash on an adaptable log object. | ||
|
||
## PARAMETERS | ||
|
||
### -Path | ||
Required. | ||
Path to the object to add or update the hash. | ||
Note: For an adaptable app or an onboard discovery, 'Path' must always be a policy folder as this is where | ||
the hash is saved. | ||
|
||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: DN | ||
|
||
Required: True | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Keyname | ||
The name of the Secret Encryption Key (SEK) to used when encrypting this item. | ||
Default is "Software:Default" | ||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 2 | ||
Default value: Software:Default | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -FilePath | ||
Required. | ||
The full path to the adaptable script file. | ||
This should normally be in a | ||
'\<drive\>:\Program Files\Venafi\Scripts\\\<subdir\>' directory for TPP to recognize the script. | ||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: File | ||
|
||
Required: True | ||
Position: 3 | ||
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 or VaaS key can also provided. | ||
If providing a TPP token, an environment variable named TPP_SERVER must also be set. | ||
```yaml | ||
Type: PSObject | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 4 | ||
Default value: $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 | ||
### None | ||
## OUTPUTS | ||
### None | ||
## NOTES | ||
## RELATED LINKS | ||
[http://VenafiPS.readthedocs.io/en/latest/functions/Add-TppAdaptableHash/](http://VenafiPS.readthedocs.io/en/latest/functions/Add-TppAdaptableHash/) | ||
[https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Add-TppAdaptableHash.ps1](https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Add-TppAdaptableHash.ps1) | ||
[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-add.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-add.php) | ||
[https://docs.venafi.com/Docs/currentSDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-ownerdelete.php](https://docs.venafi.com/Docs/currentSDK/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-ownerdelete.php) | ||
[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-retrieve.php](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Secretstore-retrieve.php) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.