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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<Javascript async="false" continueOnError="false" enabled="true" timeLimit="200" name="merge-query-string-api-key"> | |
<DisplayName>Merge Query String API Key</DisplayName> | |
<Properties/> | |
<ResourceURL>jsc://Merge-Query-String-API-Key.js</ResourceURL> | |
</Javascript> |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<VerifyAPIKey async="false" continueOnError="false" enabled="true" name="verify-api-key"> | |
<DisplayName>Verify API Key</DisplayName> | |
<Properties/> | |
<APIKey ref="request.header.api-key"/> | |
</VerifyAPIKey> |
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
/* | |
* Attempts to "merge" (aka. use) the query string parameter 'api-key' | |
* into the header variable api-key if the header variable is missing. | |
* if the header variable exists, then the header variable is always used | |
* and the query string parameter is ignored. | |
*/ | |
var hApiKey = context.getVariable("request.header.api-key") | |
//print("header: " + hApiKey); |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<AssignMessage async="false" continueOnError="false" enabled="true" name="Assign-API-Key-To-Header"> | |
<DisplayName>Assign API Key To Header</DisplayName> | |
<AssignTo createNew="false" transport="http" type="request"/> | |
<Properties/> | |
<Add> | |
<Headers> | |
<Header name="api-key">{request.queryparam.api-key}</Header> | |
</Headers> | |
</Add> |
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 shouldn't be run on it's own. It should be loaded using the Apigee Module. | |
<# | |
.SYNOPSIS | |
Implementation of the Time-based One-time Password Algorithm used by Google Authenticator. | |
.DESCRIPTION |
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 shouldn't be run on it's own. It should be loaded using the Apigee Module. | |
<# | |
.SYNOPSIS | |
Makes a call to the Apigee OAuth login endpoint and gets access tokens to use. | |
This should be used internally by the Apigee module. But, it shouldn't be needed by | |
the developer. |
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
if($global:Apigee -eq $null) { | |
$global:Apigee = @{} | |
$global:Apigee.ApiUrl = "https://api.enterprise.apigee.com/v1/organizations/" | |
# Use OAuth for access credentials. All public info here: | |
# https://docs.apigee.com/api-platform/system-administration/using-oauth2-security-apigee-edge-management-api | |
$global:Apigee.OAuthLogin = @{} | |
# get username / password for management API |
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
<# | |
.SYNOPSIS | |
Enforces the formatting standards for application pool names. | |
This should be used to figure out the application pool name before creating an | |
new one. The name is also used to create unique ARR rule names. | |
.PARAMETER Url | |
The url to parse and convert to our standardized app pool name. |
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
<# | |
.SYNOPSIS | |
Checks if the given ComputerName is for the local computer | |
.PARAMETER ComputerName | |
The name of a computer to check. | |
.EXAMPLE | |
$session = New-PSSession . | |
$computerName = $session.ComputerName |