From c7d101d98529425e2f1c3c039c49e99457c73510 Mon Sep 17 00:00:00 2001 From: Greg Brownstein Date: Fri, 17 Sep 2021 19:59:22 +0000 Subject: [PATCH] Update manifest and docs to 3.1.7 ***NO_CI*** --- VenafiPS/VenafiPS.psd1 | 4 ++-- docs/changelog.md | 3 +++ docs/functions/Invoke-VenafiRestMethod.md | 26 ++++++++++++++++---- docs/functions/New-TppToken.md | 3 ++- docs/functions/New-VenafiSession.md | 29 ++++++++++++++--------- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/VenafiPS/VenafiPS.psd1 b/VenafiPS/VenafiPS.psd1 index cced5197..6dfcde61 100644 --- a/VenafiPS/VenafiPS.psd1 +++ b/VenafiPS/VenafiPS.psd1 @@ -3,7 +3,7 @@ # # Generated by: Greg Brownstein # -# Generated on: 9/8/2021 +# Generated on: 9/17/2021 # @{ @@ -12,7 +12,7 @@ RootModule = 'VenafiPS.psm1' # Version number of this module. -ModuleVersion = '3.1.6' +ModuleVersion = '3.1.7' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/docs/changelog.md b/docs/changelog.md index 8eabdee8..2b73748d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,6 @@ +## 3.1.7 +- Fix/finalize certificate-based oauth token support, [#29](https://github.com/gdbarron/VenafiPS/issues/29) + ## 3.1.6 - Thanks to @harrisonmeister for this contribution! - Add support to `Export-VenafiCertificate` for `-IncludeChain` and `-IncludePrivateKey` when using JKS format, [#24](https://github.com/gdbarron/VenafiPS/issues/24) and [#26](https://github.com/gdbarron/VenafiPS/issues/26) diff --git a/docs/functions/Invoke-VenafiRestMethod.md b/docs/functions/Invoke-VenafiRestMethod.md index a9a42545..6eebc82f 100644 --- a/docs/functions/Invoke-VenafiRestMethod.md +++ b/docs/functions/Invoke-VenafiRestMethod.md @@ -13,8 +13,9 @@ Invoke-VenafiRestMethod -VenafiSession [-Method ] [-UriR ### URL ``` -Invoke-VenafiRestMethod -ServerUrl [-UseDefaultCredentials] [-Method ] [-UriRoot ] - -UriLeaf [-Header ] [-Body ] [-FullResponse] [] +Invoke-VenafiRestMethod -ServerUrl [-UseDefaultCredential] [-Certificate ] + [-Method ] [-UriRoot ] -UriLeaf [-Header ] [-Body ] + [-FullResponse] [] ``` ## DESCRIPTION @@ -61,13 +62,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -UseDefaultCredentials -{{ Fill UseDefaultCredentials Description }} +### -UseDefaultCredential +{{ Fill UseDefaultCredential Description }} ```yaml Type: SwitchParameter Parameter Sets: URL -Aliases: +Aliases: UseDefaultCredentials Required: False Position: Named @@ -76,6 +77,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Certificate +{{ Fill Certificate Description }} + +```yaml +Type: X509Certificate +Parameter Sets: URL +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Method API method, either get, post, patch, put or delete. diff --git a/docs/functions/New-TppToken.md b/docs/functions/New-TppToken.md index 7e539e28..54d84851 100644 --- a/docs/functions/New-TppToken.md +++ b/docs/functions/New-TppToken.md @@ -133,7 +133,8 @@ Accept wildcard characters: False ``` ### -Certificate -Certificate used to request API token +Certificate used to request API token. +Certificate authentication must be configured for remote web sdk clients, https://docs.venafi.com/Docs/21.1SDK/TopNav/Content/CA/t-CA-ConfiguringInTPPandIIS-tpp.php. ```yaml Type: X509Certificate diff --git a/docs/functions/New-VenafiSession.md b/docs/functions/New-VenafiSession.md index 72556175..b4e8df09 100644 --- a/docs/functions/New-VenafiSession.md +++ b/docs/functions/New-VenafiSession.md @@ -18,8 +18,8 @@ New-VenafiSession -Server -AccessToken [-PassThru] [-Wha ### TokenCertificate ``` -New-VenafiSession -Server -Certificate [-PassThru] [-WhatIf] [-Confirm] - [] +New-VenafiSession -Server -ClientId -Scope -Certificate + [-AuthServer ] [-PassThru] [-WhatIf] [-Confirm] [] ``` ### TokenIntegrated @@ -75,26 +75,33 @@ Create token-based session using Windows Integrated authentication with a certai ### EXAMPLE 4 ``` +New-VenafiSession -Server venafitpp.mycompany.com -Certificate $myCert -ClientId MyApp -Scope @{'certificate'='manage'} +``` + +Create token-based session using a client certificate + +### EXAMPLE 5 +``` New-VenafiSession -Server venafitpp.mycompany.com -AuthServer tppauth.mycompany.com -ClientId MyApp -Credential $cred ``` Create token-based session using oauth authentication where the vedauth and vedsdk are hosted on different servers -### EXAMPLE 5 +### EXAMPLE 6 ``` $sess = New-VenafiSession -Server venafitpp.mycompany.com -Credential $cred -PassThru ``` Create session and return the session object instead of setting to script scope variable -### EXAMPLE 6 +### EXAMPLE 7 ``` New-VenafiSession -Server venafitpp.mycompany.com -AccessToken $cred ``` Create session using an access token obtained outside this module -### EXAMPLE 7 +### EXAMPLE 8 ``` New-VenafiSession -VaasKey $cred ``` @@ -141,7 +148,7 @@ Applcation Id configured in Venafi for token-based authentication ```yaml Type: String -Parameter Sets: TokenIntegrated, TokenOAuth +Parameter Sets: TokenCertificate, TokenIntegrated, TokenOAuth Aliases: Required: True @@ -160,7 +167,7 @@ For a scope to privilege mapping, see https://docs.venafi.com/Docs/20.4SDK/TopNa ```yaml Type: Hashtable -Parameter Sets: TokenIntegrated, TokenOAuth +Parameter Sets: TokenCertificate, TokenIntegrated, TokenOAuth Aliases: Required: True @@ -223,7 +230,7 @@ If just the server name is provided, https:// will be appended. ```yaml Type: String -Parameter Sets: TokenIntegrated, TokenOAuth +Parameter Sets: TokenCertificate, TokenIntegrated, TokenOAuth Aliases: Required: False @@ -316,9 +323,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [https://docs.venafi.com/Docs/19.4/TopNav/Content/SDK/WebSDK/API_Reference/r-SDK-GET-Authorize-Integrated.php?tocpath=Topics%20by%20Guide%7CDeveloper%27s%20Guide%7CWeb%20SDK%20reference%7CAuthentication%20programming%20interfaces%7C_____3](https://docs.venafi.com/Docs/19.4/TopNav/Content/SDK/WebSDK/API_Reference/r-SDK-GET-Authorize-Integrated.php?tocpath=Topics%20by%20Guide%7CDeveloper%27s%20Guide%7CWeb%20SDK%20reference%7CAuthentication%20programming%20interfaces%7C_____3) -[https://docs.venafi.com/Docs/20.1SDK/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-Authorize-Integrated.php?tocpath=Auth%20SDK%20reference%20for%20token%20management%7C_____10](https://docs.venafi.com/Docs/20.1SDK/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-Authorize-Integrated.php?tocpath=Auth%20SDK%20reference%20for%20token%20management%7C_____10) +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-Authorize-Integrated.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____10](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-Authorize-Integrated.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____10) -[https://docs.venafi.com/Docs/20.1SDK/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeOAuth.php?tocpath=Auth%20SDK%20reference%20for%20token%20management%7C_____11](https://docs.venafi.com/Docs/20.1SDK/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeOAuth.php?tocpath=Auth%20SDK%20reference%20for%20token%20management%7C_____11) +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeOAuth.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____11](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeOAuth.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____11) -[https://docs.venafi.com/Docs/20.1/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeCertificate.php?tocpath=Topics%20by%20Guide%7CDeveloper%27s%20Guide%7CAuth%20SDK%20reference%20for%20token%20management%7C_____9](https://docs.venafi.com/Docs/20.1/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeCertificate.php?tocpath=Topics%20by%20Guide%7CDeveloper%27s%20Guide%7CAuth%20SDK%20reference%20for%20token%20management%7C_____9) +[https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeCertificate.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____9](https://docs.venafi.com/Docs/current/TopNav/Content/SDK/AuthSDK/r-SDKa-POST-AuthorizeCertificate.php?tocpath=Platform%20SDK%7CAuth%20REST%20for%20token%20management%7C_____9)