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
<wsdl:definitions | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" | |
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" | |
xmlns:wsp="http://www.w3.org/ns/ws-policy" | |
xmlns:wsp200409="http://schemas.xmlsoap.org/ws/2004/09/policy" | |
xmlns:wsp200607="http://www.w3.org/2006/07/ws-policy" | |
xmlns:ns0="http://default_package/" targetNamespace="http://default_package/"> |
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
// createKeyPair.js | |
// ------------------------------------------------------------------ | |
// | |
// created: Thu Feb 28 15:49:15 2019 | |
// last saved: <2023-March-29 14:19:28> | |
/* jshint esversion:9, node: true */ | |
/* global process, console, Buffer, require */ | |
const crypto = require('crypto'); |
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
function computeHttpSignature(config, headerHash) { | |
var template = 'keyId="${keyId}",algorithm="${algorithm}",headers="${headers}",signature="${signature}"', | |
sig = template; | |
// compute sig here | |
var signingBase = ''; | |
config.headers.forEach(function(h){ | |
if (signingBase !== '') { signingBase += '\n'; } | |
signingBase += h.toLowerCase() + ": " + headerHash[h]; | |
}); |
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
<TargetEndpoint name="target-1"> | |
<PreFlow name="PreFlow"> | |
<Request> | |
<Step> | |
<Name>AM-Query</Name> | |
</Step> | |
</Request> | |
<Response> | |
<Step> | |
<Name>AM-Clean-Response-Headers</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
// GenerateGcpAccessTokenForServiceAccount.java | |
// ------------------------------------------------------------------ | |
// | |
// Requires Java 11 or later | |
// | |
// compile: javac -cp | |
// lib/nimbus-jose-jwt-8.22.jar:lib/json-smart-1.3.2.jar:lib/bcprov-jdk15on-1.64.jar:lib/bcpkix-jdk15on-1.64.jar %f | |
// | |
// run: java -classpath | |
// lib/nimbus-jose-jwt-8.22.jar:lib/json-smart-1.3.2.jar:lib/bcprov-jdk15on-1.64.jar:lib/bcpkix-jdk15on-1.64.jar %n |
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
// weightedRandomSelector.js | |
// | |
// This is a simple weighted random selector, works in Rhino, can use within an | |
// Apigee JavaScript step. | |
// | |
// last saved: <2021-December-02 13:11:16> | |
// | |
// -------------------------------------------------------- | |
(function (){ |
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
/* jshint esversion:6, node:false, strict:implied */ | |
/* global print, context */ | |
function createPartialCopy(obj, partialPropertyList) { | |
// create new "partial copy" with only a subset of properties | |
return partialPropertyList.reduce(function(a, prop) { | |
a[prop] = obj[prop]; | |
return a; | |
}, {}); | |
} |
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
#!/bin/bash | |
# uncomment to debug | |
# set -x | |
usage() { | |
printf "%s: display subject and issuer of certificates in the chain that a host presents\n" $0 | |
printf "usage:\n" | |
printf " %s HOSTNAME\n" $0 | |
printf " show cert subject and issuer\n\n" |
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
<Javascript name='JS-ShredJSON' timeLimit='200' > | |
<Properties> | |
<Property name='output-prefix'>private</Property> | |
<Property name='source'>ContextVariableContainingJSON</Property> | |
</Properties> | |
<ResourceURL>jsc://extractJsonToContextVars.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
// getTokenWithServiceAccount.js | |
// ------------------------------------------------------------------ | |
// uses only builtin modules, no external dependencies. | |
/* jshint esversion:9, node:true, strict:implied */ | |
/* global process, console, Buffer */ | |
const crypto = require('crypto'), | |
util = require('util'), |