From f772f5ef8858b5c6fdb2df036842ec56ba6fd674 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 03:46:07 +0400 Subject: [PATCH 01/26] chore: update --- .prettierignore | 5 + .prettierrc.json | 1 + .travis.yml | 10 +- @types/xml-encryption.d.ts | 27 +- README.md | 14 +- index.ts | 26 +- package.json | 35 +- src/api.ts | 12 +- src/binding-post.ts | 306 ++++++--- src/binding-redirect.ts | 235 ++++--- src/entity-idp.ts | 104 +-- src/entity-sp.ts | 108 +-- src/entity.ts | 230 ++++--- src/extractor.ts | 249 ++++--- src/flow.ts | 144 ++-- src/libsaml.ts | 652 +++++++++++------- src/metadata-idp.ts | 120 ++-- src/metadata-sp.ts | 150 ++-- src/metadata.ts | 172 ++--- src/types.ts | 22 +- src/urn.ts | 304 +++++---- src/utility.ts | 224 +++--- src/validator.ts | 12 +- test/README.md | 83 ++- test/extractor.ts | 176 ++--- test/flow.ts | 1325 ++++++++++++++++++++++++------------ test/index.ts | 838 +++++++++++++++-------- test/issues.ts | 230 ++++--- test/key/idp/README.md | 4 +- tsconfig.json | 21 +- tslint.json | 69 +- types.d.ts | 4 +- yarn.lock | 327 +++++---- 33 files changed, 3813 insertions(+), 2426 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.json diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..a2123ba5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +build +.nyc_output +node_modules +types +docs diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/.travis.yml b/.travis.yml index 9463056c..5b5261dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,9 @@ script: branches: only: - - master - - /^.*-alpha$/ - - /^.*-rc.*$/ - - /^feature\/.*$/ + - master + - /^.*-alpha$/ + - /^.*-rc.*$/ + - /^feature\/.*$/ -after_success: npm run coverage \ No newline at end of file +after_success: npm run coverage diff --git a/@types/xml-encryption.d.ts b/@types/xml-encryption.d.ts index af8876c0..44380b6f 100644 --- a/@types/xml-encryption.d.ts +++ b/@types/xml-encryption.d.ts @@ -10,12 +10,27 @@ declare module "xml-encryption" { key: string | Buffer; } export interface Callback { - (err:Error, result): void; + (err: Error, result): void; } - export function encrypt(content: string, options: EncryptOptions, callback: Callback): string; - export function encryptKeyInfo(symmetricKey: string, options: EncryptOptions, callback: Callback): string; - export function decrypt(xml: string | Document, options: DecryptOptions, callback: Callback): string; - export function decryptKeyInfo(doc: string | Document, options: DecryptOptions): string; - const _default: { decrypt, encrypt, decryptKeyInfo, encryptKeyInfo }; + export function encrypt( + content: string, + options: EncryptOptions, + callback: Callback + ): string; + export function encryptKeyInfo( + symmetricKey: string, + options: EncryptOptions, + callback: Callback + ): string; + export function decrypt( + xml: string | Document, + options: DecryptOptions, + callback: Callback + ): string; + export function decryptKeyInfo( + doc: string | Document, + options: DecryptOptions + ): string; + const _default: { decrypt; encrypt; decryptKeyInfo; encryptKeyInfo }; export default _default; } diff --git a/README.md b/README.md index cdf18005..43f98074 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ To install the stable version Starting from v2.6, multiple schema validators are now supported. You can simply set the validator via the following global method. We have four validator modules right now, and you can write your own. The `setSchemaValidator` is required since v2.6, it will throw error if you don't set at the beginning. ```js -import * as samlify from 'samlify'; -import * as validator from '@authenio/samlify-xsd-schema-validator'; +import * as samlify from "samlify"; +import * as validator from "@authenio/samlify-xsd-schema-validator"; // import * as validator from '@authenio/samlify-validate-with-xmllint'; // import * as validator from '@authenio/samlify-node-xmllint'; // import * as validator from '@authenio/samlify-libxml-xsd'; // only support for version of nodejs <= 8 @@ -42,10 +42,10 @@ Now you can create your own schema validator and even suppress it but you have t ```typescript samlify.setSchemaValidator({ - validate: (response: string) => { - /* implment your own or always returns a resolved promise to skip */ - return Promise.resolve('skipped'); - } + validate: (response: string) => { + /* implment your own or always returns a resolved promise to skip */ + return Promise.resolve("skipped"); + }, }); ``` @@ -67,7 +67,7 @@ yarn ### Get Started ```javascript -const saml = require('samlify'); +const saml = require("samlify"); ``` See full documentation [here](https://samlify.js.org/) diff --git a/index.ts b/index.ts index edda52b2..6ccca8ef 100644 --- a/index.ts +++ b/index.ts @@ -1,18 +1,22 @@ // version <= 1.25 -import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from './src/entity-idp'; -import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from './src/entity-sp'; +import IdentityProvider, { + IdentityProvider as IdentityProviderInstance, +} from "./src/entity-idp"; +import ServiceProvider, { + ServiceProvider as ServiceProviderInstance, +} from "./src/entity-sp"; -export { default as IdPMetadata } from './src/metadata-idp'; -export { default as SPMetadata } from './src/metadata-sp'; -export { default as Utility } from './src/utility'; -export { default as SamlLib } from './src/libsaml'; +export { default as IdPMetadata } from "./src/metadata-idp"; +export { default as SPMetadata } from "./src/metadata-sp"; +export { default as Utility } from "./src/utility"; +export { default as SamlLib } from "./src/libsaml"; // roadmap // new name convention in version >= 3.0 -import * as Constants from './src/urn'; -import * as Extractor from './src/extractor'; +import * as Constants from "./src/urn"; +import * as Extractor from "./src/extractor"; // exposed methods for customising samlify -import { setSchemaValidator } from './src/api'; +import { setSchemaValidator } from "./src/api"; export { Constants, @@ -23,5 +27,5 @@ export { ServiceProvider, ServiceProviderInstance, // set context - setSchemaValidator -}; \ No newline at end of file + setSchemaValidator, +}; diff --git a/package.json b/package.json index 2ff0c8cb..e9bd1d72 100644 --- a/package.json +++ b/package.json @@ -31,31 +31,36 @@ }, "license": "MIT", "dependencies": { - "camelcase": "^5.3.1", - "node-forge": "^0.8.5", - "node-rsa": "^1.0.5", - "pako": "^1.0.10", - "uuid": "^3.3.2", + "@authenio/samlify-xsd-schema-validator": "^1.0.3", + "camelcase": "^6.0.0", + "node-forge": "^0.9.1", + "node-rsa": "^1.0.8", + "pako": "^1.0.11", + "uuid": "^8.2.0", "xml": "^1.0.1", "xml-crypto": "^1.5.3", - "xml-encryption": "^1.1.1", - "xmldom": "^0.1.27", + "xml-encryption": "^1.2.0", + "xmldom": "^0.3.0", "xpath": "^0.0.27" }, "devDependencies": { "@ava/typescript": "^1.1.1", - "@types/node": "^11.11.3", - "@types/node-forge": "^0.7.4", + "@types/node": "^14.0.23", + "@types/node-forge": "^0.9.4", + "@types/node-rsa": "^1.0.0", "@types/pako": "^1.0.1", - "@types/uuid": "3.0.0", - "@types/xmldom": "^0.1.28", - "ava": "^3.8.2", + "@types/uuid": "8.0.0", + "@types/xml": "^1.0.5", + "@types/xml-crypto": "^1.4.1", + "@types/xmldom": "^0.1.30", + "ava": "^3.10.1", "coveralls": "^3.1.0", - "nyc": "^15.0.1", + "nyc": "^15.1.0", + "prettier": "^2.0.5", "timekeeper": "^2.2.0", - "ts-node": "^8.3.0", + "ts-node": "^8.10.2", "tslint": "^6.1.2", - "typescript": "^3.8.3" + "typescript": "^3.9.6" }, "ava": { "extensions": [ diff --git a/src/api.ts b/src/api.ts index b74ab6c2..e21ff1b5 100644 --- a/src/api.ts +++ b/src/api.ts @@ -6,7 +6,7 @@ interface ValidatorContext { } const context: Context = { - validate: undefined + validate: undefined, }; export function getContext() { @@ -14,12 +14,12 @@ export function getContext() { } export function setSchemaValidator(params: ValidatorContext) { - - if (typeof params.validate !== 'function') { - throw new Error('validate must be a callback function having one arguemnt as xml input'); + if (typeof params.validate !== "function") { + throw new Error( + "validate must be a callback function having one arguemnt as xml input" + ); } // assign the validate function to the context context.validate = params.validate; - -} \ No newline at end of file +} diff --git a/src/binding-post.ts b/src/binding-post.ts index 9777a2af..cfc8e0d7 100644 --- a/src/binding-post.ts +++ b/src/binding-post.ts @@ -1,52 +1,67 @@ /** -* @file binding-post.ts -* @author tngan -* @desc Binding-level API, declare the functions using POST binding -*/ + * @file binding-post.ts + * @author tngan + * @desc Binding-level API, declare the functions using POST binding + */ -import { wording, namespace, StatusCode } from './urn'; -import { BindingContext } from './entity'; -import libsaml from './libsaml'; -import utility, { get } from './utility'; -import { LogoutResponseTemplate } from './libsaml'; +import { StatusCode, wording } from "./urn"; +import { BindingContext } from "./entity"; +import libsaml from "./libsaml"; +import utility, { get } from "./utility"; const binding = wording.binding; /** -* @desc Generate a base64 encoded login request -* @param {string} referenceTagXPath reference uri -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -*/ -function base64LoginRequest(referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext { + * @desc Generate a base64 encoded login request + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +function base64LoginRequest( + referenceTagXPath: string, + entity: any, + customTagReplacement?: (template: string) => BindingContext +): BindingContext { const metadata = { idp: entity.idp.entityMeta, sp: entity.sp.entityMeta }; const spSetting = entity.sp.entitySetting; - let id: string = ''; + let id: string = ""; if (metadata && metadata.idp && metadata.sp) { const base = metadata.idp.getSingleSignOnService(binding.post); let rawSamlRequest: string; if (spSetting.loginRequestTemplate && customTagReplacement) { const info = customTagReplacement(spSetting.loginRequestTemplate.context); - id = get(info, 'id', null); - rawSamlRequest = get(info, 'context', null); + id = get(info, "id", null); + rawSamlRequest = get(info, "context", null); } else { const nameIDFormat = spSetting.nameIDFormat; - const selectedNameIDFormat = Array.isArray(nameIDFormat) ? nameIDFormat[0] : nameIDFormat; + const selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; id = spSetting.generateID(); - rawSamlRequest = libsaml.replaceTagsByValue(libsaml.defaultLoginRequestTemplate.context, { - ID: id, - Destination: base, - Issuer: metadata.sp.getEntityID(), - IssueInstant: new Date().toISOString(), - AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService(binding.post), - EntityID: metadata.sp.getEntityID(), - AllowCreate: spSetting.allowCreate, - NameIDFormat: selectedNameIDFormat - } as any); + rawSamlRequest = libsaml.replaceTagsByValue( + libsaml.defaultLoginRequestTemplate.context, + { + ID: id, + Destination: base, + Issuer: metadata.sp.getEntityID(), + IssueInstant: new Date().toISOString(), + AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService( + binding.post + ), + EntityID: metadata.sp.getEntityID(), + AllowCreate: spSetting.allowCreate, + NameIDFormat: selectedNameIDFormat, + } as any + ); } if (metadata.idp.isWantAuthnRequestsSigned()) { - const { privateKey, privateKeyPass, requestSignatureAlgorithm: signatureAlgorithm, transformationAlgorithms } = spSetting; + const { + privateKey, + privateKeyPass, + requestSignatureAlgorithm: signatureAlgorithm, + transformationAlgorithms, + } = spSetting; return { id, context: libsaml.constructSAMLSignature({ @@ -56,11 +71,15 @@ function base64LoginRequest(referenceTagXPath: string, entity: any, customTagRep signatureAlgorithm, transformationAlgorithms, rawSamlMessage: rawSamlRequest, - signingCert: metadata.sp.getX509Certificate('signing'), + signingCert: metadata.sp.getX509Certificate("signing"), signatureConfig: spSetting.signatureConfig || { - prefix: 'ds', - location: { reference: "/*[local-name(.)='AuthnRequest']/*[local-name(.)='Issuer']", action: 'after' }, - } + prefix: "ds", + location: { + reference: + "/*[local-name(.)='AuthnRequest']/*[local-name(.)='Issuer']", + action: "after", + }, + }, }), }; } @@ -70,17 +89,24 @@ function base64LoginRequest(referenceTagXPath: string, entity: any, customTagRep context: utility.base64Encode(rawSamlRequest), }; } - throw new Error('ERR_GENERATE_POST_LOGIN_REQUEST_MISSING_METADATA'); + throw new Error("ERR_GENERATE_POST_LOGIN_REQUEST_MISSING_METADATA"); } + /** -* @desc Generate a base64 encoded login response -* @param {object} requestInfo corresponding request, used to obtain the id -* @param {object} entity object includes both idp and sp -* @param {object} user current logged user (e.g. req.user) -* @param {function} customTagReplacement used when developers have their own login response template -* @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt -*/ -async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any = {}, customTagReplacement?: (template: string) => BindingContext, encryptThenSign: boolean = false): Promise { + * @desc Generate a base64 encoded login response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {object} user current logged user (e.g. req.user) + * @param {function} customTagReplacement used when developers have their own login response template + * @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt + */ +async function base64LoginResponse( + requestInfo: any = {}, + entity: any, + user: any = {}, + customTagReplacement?: (template: string) => BindingContext, + encryptThenSign: boolean = false +): Promise { const idpSetting = entity.idp.entitySetting; const spSetting = entity.sp.entitySetting; const id = idpSetting.generateID(); @@ -89,7 +115,9 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any sp: entity.sp.entityMeta, }; const nameIDFormat = idpSetting.nameIDFormat; - const selectedNameIDFormat = Array.isArray(nameIDFormat) ? nameIDFormat[0] : nameIDFormat; + const selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; if (metadata && metadata.idp && metadata.sp) { const base = metadata.sp.getAssertionConsumerService(binding.post); let rawSamlResponse: string; @@ -116,26 +144,35 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any ConditionsNotOnOrAfter: fiveMinutesLater, SubjectConfirmationDataNotOnOrAfter: fiveMinutesLater, NameIDFormat: selectedNameIDFormat, - NameID: user.email || '', - InResponseTo: get(requestInfo, 'extract.request.id', ''), - AuthnStatement: '', - AttributeStatement: '', + NameID: user.email || "", + InResponseTo: get(requestInfo, "extract.request.id", ""), + AuthnStatement: "", + AttributeStatement: "", }; if (idpSetting.loginResponseTemplate && customTagReplacement) { - const template = customTagReplacement(idpSetting.loginResponseTemplate.context); - rawSamlResponse = get(template, 'context', null); + const template = customTagReplacement( + idpSetting.loginResponseTemplate.context + ); + rawSamlResponse = get(template, "context", null); } else { if (requestInfo !== null) { tvalue.InResponseTo = requestInfo.extract.request.id; } - rawSamlResponse = libsaml.replaceTagsByValue(libsaml.defaultLoginResponseTemplate.context, tvalue); + rawSamlResponse = libsaml.replaceTagsByValue( + libsaml.defaultLoginResponseTemplate.context, + tvalue + ); } - const { privateKey, privateKeyPass, requestSignatureAlgorithm: signatureAlgorithm } = idpSetting; + const { + privateKey, + privateKeyPass, + requestSignatureAlgorithm: signatureAlgorithm, + } = idpSetting; const config = { privateKey, privateKeyPass, signatureAlgorithm, - signingCert: metadata.idp.getX509Certificate('signing'), + signingCert: metadata.idp.getX509Certificate("signing"), isBase64Output: false, }; // step: sign assertion ? -> encrypted ? -> sign message ? @@ -145,10 +182,15 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any ...config, rawSamlMessage: rawSamlResponse, transformationAlgorithms: spSetting.transformationAlgorithms, - referenceTagXPath: "/*[local-name(.)='Response']/*[local-name(.)='Assertion']", + referenceTagXPath: + "/*[local-name(.)='Response']/*[local-name(.)='Assertion']", signatureConfig: { - prefix: 'ds', - location: { reference: "/*[local-name(.)='Response']/*[local-name(.)='Assertion']/*[local-name(.)='Issuer']", action: 'after' }, + prefix: "ds", + location: { + reference: + "/*[local-name(.)='Response']/*[local-name(.)='Assertion']/*[local-name(.)='Issuer']", + action: "after", + }, }, }); } @@ -156,7 +198,10 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any // console.debug('after assertion signed', rawSamlResponse); // SAML response must be signed sign message first, then encrypt - if (!encryptThenSign && (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned())) { + if ( + !encryptThenSign && + (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned()) + ) { // console.debug('sign then encrypt and sign entire message'); rawSamlResponse = libsaml.constructSAMLSignature({ ...config, @@ -164,8 +209,11 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any isMessageSigned: true, transformationAlgorithms: spSetting.transformationAlgorithms, signatureConfig: spSetting.signatureConfig || { - prefix: 'ds', - location: { reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", action: 'after' }, + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, }, }); } @@ -174,7 +222,11 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any if (idpSetting.isAssertionEncrypted) { // console.debug('idp is configured to do encryption'); - const context = await libsaml.encryptAssertion(entity.idp, entity.sp, rawSamlResponse); + const context = await libsaml.encryptAssertion( + entity.idp, + entity.sp, + rawSamlResponse + ); if (encryptThenSign) { //need to decode it rawSamlResponse = utility.base64Decode(context) as string; @@ -184,15 +236,21 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any } //sign after encrypting - if (encryptThenSign && (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned())) { + if ( + encryptThenSign && + (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned()) + ) { rawSamlResponse = libsaml.constructSAMLSignature({ ...config, rawSamlMessage: rawSamlResponse, isMessageSigned: true, transformationAlgorithms: spSetting.transformationAlgorithms, signatureConfig: spSetting.signatureConfig || { - prefix: 'ds', - location: { reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", action: 'after' }, + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, }, }); } @@ -201,29 +259,42 @@ async function base64LoginResponse(requestInfo: any = {}, entity: any, user: any id, context: utility.base64Encode(rawSamlResponse), }); - } - throw new Error('ERR_GENERATE_POST_LOGIN_RESPONSE_MISSING_METADATA'); + throw new Error("ERR_GENERATE_POST_LOGIN_RESPONSE_MISSING_METADATA"); } + /** -* @desc Generate a base64 encoded logout request -* @param {object} user current logged user (e.g. req.user) -* @param {string} referenceTagXPath reference uri -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -* @return {string} base64 encoded request -*/ -function base64LogoutRequest(user, referenceTagXPath, entity, customTagReplacement?: (template: string) => BindingContext): BindingContext { - const metadata = { init: entity.init.entityMeta, target: entity.target.entityMeta }; + * @desc Generate a base64 encoded logout request + * @param {object} user current logged user (e.g. req.user) + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} base64 encoded request + */ +function base64LogoutRequest( + user, + referenceTagXPath, + entity, + customTagReplacement?: (template: string) => BindingContext +): BindingContext { + const metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; const initSetting = entity.init.entitySetting; const nameIDFormat = initSetting.nameIDFormat; - const selectedNameIDFormat = Array.isArray(nameIDFormat) ? nameIDFormat[0] : nameIDFormat; let id: string = ''; + const selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + let id: string = ""; if (metadata && metadata.init && metadata.target) { let rawSamlRequest: string; if (initSetting.logoutRequestTemplate && customTagReplacement) { - const template = customTagReplacement(initSetting.logoutRequestTemplate.context); - id = get(template, 'id', null); - rawSamlRequest = get(template, 'context', null); + const template = customTagReplacement( + initSetting.logoutRequestTemplate.context + ); + id = get(template, "id", null); + rawSamlRequest = get(template, "context", null); } else { id = initSetting.generateID(); const tvalue: any = { @@ -235,11 +306,19 @@ function base64LogoutRequest(user, referenceTagXPath, entity, customTagReplaceme NameIDFormat: selectedNameIDFormat, NameID: user.logoutNameID, }; - rawSamlRequest = libsaml.replaceTagsByValue(libsaml.defaultLogoutRequestTemplate.context, tvalue); + rawSamlRequest = libsaml.replaceTagsByValue( + libsaml.defaultLogoutRequestTemplate.context, + tvalue + ); } if (entity.target.entitySetting.wantLogoutRequestSigned) { // Need to embeded XML signature - const { privateKey, privateKeyPass, requestSignatureAlgorithm: signatureAlgorithm, transformationAlgorithms } = initSetting; + const { + privateKey, + privateKeyPass, + requestSignatureAlgorithm: signatureAlgorithm, + transformationAlgorithms, + } = initSetting; return { id, context: libsaml.constructSAMLSignature({ @@ -249,11 +328,15 @@ function base64LogoutRequest(user, referenceTagXPath, entity, customTagReplaceme signatureAlgorithm, transformationAlgorithms, rawSamlMessage: rawSamlRequest, - signingCert: metadata.init.getX509Certificate('signing'), + signingCert: metadata.init.getX509Certificate("signing"), signatureConfig: initSetting.signatureConfig || { - prefix: 'ds', - location: { reference: "/*[local-name(.)='LogoutRequest']/*[local-name(.)='Issuer']", action: 'after' }, - } + prefix: "ds", + location: { + reference: + "/*[local-name(.)='LogoutRequest']/*[local-name(.)='Issuer']", + action: "after", + }, + }, }), }; } @@ -262,26 +345,32 @@ function base64LogoutRequest(user, referenceTagXPath, entity, customTagReplaceme context: utility.base64Encode(rawSamlRequest), }; } - throw new Error('ERR_GENERATE_POST_LOGOUT_REQUEST_MISSING_METADATA'); + throw new Error("ERR_GENERATE_POST_LOGOUT_REQUEST_MISSING_METADATA"); } + /** -* @desc Generate a base64 encoded logout response -* @param {object} requestInfo corresponding request, used to obtain the id -* @param {string} referenceTagXPath reference uri -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -*/ -function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacement: (template: string) => BindingContext): BindingContext { + * @desc Generate a base64 encoded logout response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +function base64LogoutResponse( + requestInfo: any, + entity: any, + customTagReplacement: (template: string) => BindingContext +): BindingContext { const metadata = { init: entity.init.entityMeta, target: entity.target.entityMeta, }; - let id: string = ''; + let id: string = ""; const initSetting = entity.init.entitySetting; if (metadata && metadata.init && metadata.target) { let rawSamlResponse; if (initSetting.logoutResponseTemplate) { - const template = customTagReplacement(initSetting.logoutResponseTemplate.context); + const template = customTagReplacement( + initSetting.logoutResponseTemplate.context + ); id = template.id; rawSamlResponse = template.context; } else { @@ -293,12 +382,20 @@ function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacemen Issuer: metadata.init.getEntityID(), IssueInstant: new Date().toISOString(), StatusCode: StatusCode.Success, - InResponseTo: get(requestInfo, 'extract.request.id', null) + InResponseTo: get(requestInfo, "extract.request.id", null), }; - rawSamlResponse = libsaml.replaceTagsByValue(libsaml.defaultLogoutResponseTemplate.context, tvalue); + rawSamlResponse = libsaml.replaceTagsByValue( + libsaml.defaultLogoutResponseTemplate.context, + tvalue + ); } if (entity.target.entitySetting.wantLogoutResponseSigned) { - const { privateKey, privateKeyPass, requestSignatureAlgorithm: signatureAlgorithm, transformationAlgorithms } = initSetting; + const { + privateKey, + privateKeyPass, + requestSignatureAlgorithm: signatureAlgorithm, + transformationAlgorithms, + } = initSetting; return { id, context: libsaml.constructSAMLSignature({ @@ -308,14 +405,15 @@ function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacemen privateKeyPass, signatureAlgorithm, rawSamlMessage: rawSamlResponse, - signingCert: metadata.init.getX509Certificate('signing'), + signingCert: metadata.init.getX509Certificate("signing"), signatureConfig: { - prefix: 'ds', + prefix: "ds", location: { - reference: "/*[local-name(.)='LogoutResponse']/*[local-name(.)='Issuer']", - action: 'after' - } - } + reference: + "/*[local-name(.)='LogoutResponse']/*[local-name(.)='Issuer']", + action: "after", + }, + }, }), }; } @@ -324,7 +422,7 @@ function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacemen context: utility.base64Encode(rawSamlResponse), }; } - throw new Error('ERR_GENERATE_POST_LOGOUT_RESPONSE_MISSING_METADATA'); + throw new Error("ERR_GENERATE_POST_LOGOUT_RESPONSE_MISSING_METADATA"); } const postBinding = { diff --git a/src/binding-redirect.ts b/src/binding-redirect.ts index 1ac37ac0..05cf4ab6 100644 --- a/src/binding-redirect.ts +++ b/src/binding-redirect.ts @@ -1,15 +1,15 @@ /** -* @file binding-redirect.ts -* @author tngan -* @desc Binding-level API, declare the functions using Redirect binding -*/ -import utility, { get } from './utility'; -import libsaml from './libsaml'; -import { BindingContext } from './entity'; -import { IdentityProvider as Idp } from './entity-idp'; -import { ServiceProvider as Sp } from './entity-sp'; -import * as url from 'url'; -import { wording, namespace } from './urn'; + * @file binding-redirect.ts + * @author tngan + * @desc Binding-level API, declare the functions using Redirect binding + */ +import utility, { get } from "./utility"; +import libsaml from "./libsaml"; +import { BindingContext } from "./entity"; +import { IdentityProvider as Idp } from "./entity-idp"; +import { ServiceProvider as Sp } from "./entity-sp"; +import * as url from "url"; +import { namespace, wording } from "./urn"; const binding = wording.binding; const urlParams = wording.urlParams; @@ -24,81 +24,106 @@ export interface BuildRedirectConfig { } /** -* @private -* @desc Helper of generating URL param/value pair -* @param {string} param key -* @param {string} value value of key -* @param {boolean} first determine whether the param is the starting one in order to add query header '?' -* @return {string} -*/ + * @private + * @desc Helper of generating URL param/value pair + * @param {string} param key + * @param {string} value value of key + * @param {boolean} first determine whether the param is the starting one in order to add query header '?' + * @return {string} + */ function pvPair(param: string, value: string, first?: boolean): string { - return (first === true ? '?' : '&') + param + '=' + value; + return (first === true ? "?" : "&") + param + "=" + value; } + /** -* @private -* @desc Refractored part of URL generation for login/logout request -* @param {string} type -* @param {boolean} isSigned -* @param {string} rawSamlRequest -* @param {object} entitySetting -* @return {string} -*/ + * @private + * @desc Refractored part of URL generation for login/logout request + * @return {string} + * @param opts type, isSigned, rawSamlRequest, entitySetting + */ function buildRedirectURL(opts: BuildRedirectConfig) { - const { - baseUrl, - type, - isSigned, - context, - entitySetting, - } = opts; - let { relayState = '' } = opts; + const { baseUrl, type, isSigned, context, entitySetting } = opts; + let { relayState = "" } = opts; const noParams = (url.parse(baseUrl).query || []).length === 0; const queryParam = libsaml.getQueryParamByType(type); // In general, this xmlstring is required to do deflate -> base64 -> urlencode - const samlRequest = encodeURIComponent(utility.base64Encode(utility.deflateString(context))); - if (relayState !== '') { + const samlRequest = encodeURIComponent( + utility.base64Encode(utility.deflateString(context)) + ); + if (relayState !== "") { relayState = pvPair(urlParams.relayState, encodeURIComponent(relayState)); } if (isSigned) { - const sigAlg = pvPair(urlParams.sigAlg, encodeURIComponent(entitySetting.requestSignatureAlgorithm)); + const sigAlg = pvPair( + urlParams.sigAlg, + encodeURIComponent(entitySetting.requestSignatureAlgorithm) + ); const octetString = samlRequest + relayState + sigAlg; - return baseUrl + pvPair(queryParam, octetString, noParams) + pvPair(urlParams.signature, encodeURIComponent(libsaml.constructMessageSignature(queryParam + '=' + octetString, entitySetting.privateKey, entitySetting.privateKeyPass, undefined, entitySetting.requestSignatureAlgorithm))); + return ( + baseUrl + + pvPair(queryParam, octetString, noParams) + + pvPair( + urlParams.signature, + encodeURIComponent( + libsaml.constructMessageSignature( + queryParam + "=" + octetString, + entitySetting.privateKey, + entitySetting.privateKeyPass, + undefined, + entitySetting.requestSignatureAlgorithm + ) + ) + ) + ); } return baseUrl + pvPair(queryParam, samlRequest + relayState, noParams); } -/** -* @desc Redirect URL for login request -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -* @return {string} redirect URL -*/ -function loginRequestRedirectURL(entity: { idp: Idp, sp: Sp }, customTagReplacement?: (template: string) => BindingContext): BindingContext { - const metadata: any = { idp: entity.idp.entityMeta, sp: entity.sp.entityMeta }; +/** + * @desc Redirect URL for login request + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +function loginRequestRedirectURL( + entity: { idp: Idp; sp: Sp }, + customTagReplacement?: (template: string) => BindingContext +): BindingContext { + const metadata: any = { + idp: entity.idp.entityMeta, + sp: entity.sp.entityMeta, + }; const spSetting: any = entity.sp.entitySetting; - let id: string = ''; + let id: string = ""; if (metadata && metadata.idp && metadata.sp) { const base = metadata.idp.getSingleSignOnService(binding.redirect); let rawSamlRequest: string; if (spSetting.loginRequestTemplate && customTagReplacement) { const info = customTagReplacement(spSetting.loginRequestTemplate); - id = get(info, 'id', null); - rawSamlRequest = get(info, 'context', null); + id = get(info, "id", null); + rawSamlRequest = get(info, "context", null); } else { const nameIDFormat = spSetting.nameIDFormat; - const selectedNameIDFormat = Array.isArray(nameIDFormat) ? nameIDFormat[0] : nameIDFormat; + const selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; id = spSetting.generateID(); - rawSamlRequest = libsaml.replaceTagsByValue(libsaml.defaultLoginRequestTemplate.context, { - ID: id, - Destination: base, - Issuer: metadata.sp.getEntityID(), - IssueInstant: new Date().toISOString(), - NameIDFormat: selectedNameIDFormat, - AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService(binding.post), - EntityID: metadata.sp.getEntityID(), - AllowCreate: spSetting.allowCreate, - } as any); + rawSamlRequest = libsaml.replaceTagsByValue( + libsaml.defaultLoginRequestTemplate.context, + { + ID: id, + Destination: base, + Issuer: metadata.sp.getEntityID(), + IssueInstant: new Date().toISOString(), + NameIDFormat: selectedNameIDFormat, + AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService( + binding.post + ), + EntityID: metadata.sp.getEntityID(), + AllowCreate: spSetting.allowCreate, + } as any + ); } return { id, @@ -112,25 +137,37 @@ function loginRequestRedirectURL(entity: { idp: Idp, sp: Sp }, customTagReplacem }), }; } - throw new Error('ERR_GENERATE_REDIRECT_LOGIN_REQUEST_MISSING_METADATA'); + throw new Error("ERR_GENERATE_REDIRECT_LOGIN_REQUEST_MISSING_METADATA"); } + /** -* @desc Redirect URL for logout request -* @param {object} user current logged user (e.g. req.user) -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -* @return {string} redirect URL -*/ -function logoutRequestRedirectURL(user, entity, relayState?: string, customTagReplacement?: (template: string, tags: object) => BindingContext): BindingContext { - const metadata = { init: entity.init.entityMeta, target: entity.target.entityMeta }; + * @desc Redirect URL for logout request + * @param {object} user current logged user (e.g. req.user) + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +function logoutRequestRedirectURL( + user, + entity, + relayState?: string, + customTagReplacement?: (template: string, tags: object) => BindingContext +): BindingContext { + const metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; const initSetting = entity.init.entitySetting; let id: string = initSetting.generateID(); const nameIDFormat = initSetting.nameIDFormat; - const selectedNameIDFormat = Array.isArray(nameIDFormat) ? nameIDFormat[0] : nameIDFormat; - + const selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + if (metadata && metadata.init && metadata.target) { const base = metadata.target.getSingleLogoutService(binding.redirect); - let rawSamlRequest: string = ''; + let rawSamlRequest: string; const requiredTags = { ID: id, Destination: base, @@ -142,11 +179,17 @@ function logoutRequestRedirectURL(user, entity, relayState?: string, customTagRe SessionIndex: user.sessionIndex, }; if (initSetting.logoutRequestTemplate && customTagReplacement) { - const info = customTagReplacement(initSetting.logoutRequestTemplate, requiredTags); - id = get(info, 'id', null); - rawSamlRequest = get(info, 'context', null); + const info = customTagReplacement( + initSetting.logoutRequestTemplate, + requiredTags + ); + id = get(info, "id", null); + rawSamlRequest = get(info, "context", null); } else { - rawSamlRequest = libsaml.replaceTagsByValue(libsaml.defaultLogoutRequestTemplate.context, requiredTags as any); + rawSamlRequest = libsaml.replaceTagsByValue( + libsaml.defaultLogoutRequestTemplate.context, + requiredTags as any + ); } return { id, @@ -160,15 +203,22 @@ function logoutRequestRedirectURL(user, entity, relayState?: string, customTagRe }), }; } - throw new Error('ERR_GENERATE_REDIRECT_LOGOUT_REQUEST_MISSING_METADATA'); + throw new Error("ERR_GENERATE_REDIRECT_LOGOUT_REQUEST_MISSING_METADATA"); } + /** -* @desc Redirect URL for logout response -* @param {object} requescorresponding request, used to obtain the id -* @param {object} entity object includes both idp and sp -* @param {function} customTagReplacement used when developers have their own login response template -*/ -function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext { + * @desc Redirect URL for logout response + * @param requestInfo + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + */ +function logoutResponseRedirectURL( + requestInfo: any, + entity: any, + relayState?: string, + customTagReplacement?: (template: string) => BindingContext +): BindingContext { const metadata = { init: entity.init.entityMeta, target: entity.target.entityMeta, @@ -180,8 +230,8 @@ function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: s let rawSamlResponse: string; if (initSetting.logoutResponseTemplate && customTagReplacement) { const template = customTagReplacement(initSetting.logoutResponseTemplate); - id = get(template, 'id', null); - rawSamlResponse = get(template, 'context', null); + id = get(template, "id", null); + rawSamlResponse = get(template, "context", null); } else { const tvalue: any = { ID: id, @@ -191,10 +241,17 @@ function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: s IssueInstant: new Date().toISOString(), StatusCode: namespace.statusCode.success, }; - if (requestInfo && requestInfo.extract && requestInfo.extract.logoutRequest) { + if ( + requestInfo && + requestInfo.extract && + requestInfo.extract.logoutRequest + ) { tvalue.InResponseTo = requestInfo.extract.logoutRequest.id; } - rawSamlResponse = libsaml.replaceTagsByValue(libsaml.defaultLogoutResponseTemplate.context, tvalue); + rawSamlResponse = libsaml.replaceTagsByValue( + libsaml.defaultLogoutResponseTemplate.context, + tvalue + ); } return { id, @@ -208,7 +265,7 @@ function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: s }), }; } - throw new Error('ERR_GENERATE_REDIRECT_LOGOUT_RESPONSE_MISSING_METADATA'); + throw new Error("ERR_GENERATE_REDIRECT_LOGOUT_RESPONSE_MISSING_METADATA"); } const redirectBinding = { diff --git a/src/entity-idp.ts b/src/entity-idp.ts index 01634caf..33204648 100644 --- a/src/entity-idp.ts +++ b/src/entity-idp.ts @@ -1,26 +1,25 @@ /** -* @file entity-idp.ts -* @author tngan -* @desc Declares the actions taken by identity provider -*/ -import Entity, { ESamlHttpRequest } from './entity'; + * @file entity-idp.ts + * @author tngan + * @desc Declares the actions taken by identity provider + */ +import Entity, { BindingContext, ESamlHttpRequest } from "./entity"; import { - ServiceProviderConstructor as ServiceProvider, - ServiceProviderMetadata, IdentityProviderMetadata, IdentityProviderSettings, -} from './types'; -import libsaml from './libsaml'; -import { namespace } from './urn'; -import postBinding from './binding-post'; -import { flow, FlowResult } from './flow'; -import { isString } from './utility'; -import { BindingContext } from './entity'; + ServiceProviderConstructor as ServiceProvider, + ServiceProviderMetadata, +} from "./types"; +import libsaml from "./libsaml"; +import { namespace } from "./urn"; +import postBinding from "./binding-post"; +import { flow } from "./flow"; +import { isString } from "./utility"; /** * Identity prvider can be configured using either metadata importing or idpSetting */ -export default function(props: IdentityProviderSettings) { +export default function (props: IdentityProviderSettings) { return new IdentityProvider(props); } @@ -28,65 +27,80 @@ export default function(props: IdentityProviderSettings) { * Identity prvider can be configured using either metadata importing or idpSetting */ export class IdentityProvider extends Entity { - entityMeta: IdentityProviderMetadata; constructor(idpSetting: IdentityProviderSettings) { const defaultIdpEntitySetting = { wantAuthnRequestsSigned: false, tagPrefix: { - encryptedAssertion: 'saml', + encryptedAssertion: "saml", }, }; const entitySetting = Object.assign(defaultIdpEntitySetting, idpSetting); // build attribute part if (idpSetting.loginResponseTemplate) { - if (isString(idpSetting.loginResponseTemplate.context) && Array.isArray(idpSetting.loginResponseTemplate.attributes)) { + if ( + isString(idpSetting.loginResponseTemplate.context) && + Array.isArray(idpSetting.loginResponseTemplate.attributes) + ) { const replacement = { - AttributeStatement: libsaml.attributeStatementBuilder(idpSetting.loginResponseTemplate.attributes), + AttributeStatement: libsaml.attributeStatementBuilder( + idpSetting.loginResponseTemplate.attributes + ), }; entitySetting.loginResponseTemplate = { ...entitySetting.loginResponseTemplate, - context: libsaml.replaceTagsByValue(entitySetting.loginResponseTemplate!.context, replacement), + context: libsaml.replaceTagsByValue( + entitySetting.loginResponseTemplate!.context, + replacement + ), }; } else { - console.warn('Invalid login response template'); + console.warn("Invalid login response template"); } } - super(entitySetting, 'idp'); + super(entitySetting, "idp"); } /** - * @desc Generates the login response for developers to design their own method - * @param sp object of service provider - * @param requestInfo corresponding request, used to obtain the id - * @param binding protocol binding - * @param user current logged user (e.g. req.user) - * @param customTagReplacement used when developers have their own login response template - * @param encryptThenSign whether or not to encrypt then sign first (if signing) - */ + * @desc Generates the login response for developers to design their own method + * @param sp object of service provider + * @param requestInfo corresponding request, used to obtain the id + * @param binding protocol binding + * @param user current logged user (e.g. req.user) + * @param customTagReplacement used when developers have their own login response template + * @param encryptThenSign whether or not to encrypt then sign first (if signing) + */ public async createLoginResponse( sp: ServiceProvider, requestInfo: { [key: string]: any }, binding: string, user: { [key: string]: any }, customTagReplacement?: (template: string) => BindingContext, - encryptThenSign?: boolean, + encryptThenSign?: boolean ) { const protocol = namespace.binding[binding]; // can only support post binding for login response if (protocol === namespace.binding.post) { - const context = await postBinding.base64LoginResponse(requestInfo, { - idp: this, - sp, - }, user, customTagReplacement, encryptThenSign); - return { + const context = await postBinding.base64LoginResponse( + requestInfo, + { + idp: this, + sp, + }, + user, + customTagReplacement, + encryptThenSign + ); + return { ...context, - entityEndpoint: (sp.entityMeta as ServiceProviderMetadata).getAssertionConsumerService(binding), - type: 'SAMLResponse' + entityEndpoint: (sp.entityMeta as ServiceProviderMetadata).getAssertionConsumerService( + binding + ), + type: "SAMLResponse", }; } - throw new Error('ERR_CREATE_RESPONSE_UNDEFINED_BINDING'); + throw new Error("ERR_CREATE_RESPONSE_UNDEFINED_BINDING"); } /** @@ -95,16 +109,20 @@ export class IdentityProvider extends Entity { * @param binding Protocol binding * @param req RequesmessageSigningOrderst */ - parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest) { + parseLoginRequest( + sp: ServiceProvider, + binding: string, + req: ESamlHttpRequest + ) { const self = this; return flow({ from: sp, self: self, checkSignature: self.entityMeta.isWantAuthnRequestsSigned(), - parserType: 'SAMLRequest', - type: 'login', + parserType: "SAMLRequest", + type: "login", binding: binding, - request: req + request: req, }); } } diff --git a/src/entity-sp.ts b/src/entity-sp.ts index c89e33bc..e2e1b585 100644 --- a/src/entity-sp.ts +++ b/src/entity-sp.ts @@ -1,102 +1,116 @@ /** -* @file entity-sp.ts -* @author tngan -* @desc Declares the actions taken by service provider -*/ + * @file entity-sp.ts + * @author tngan + * @desc Declares the actions taken by service provider + */ import Entity, { BindingContext, - PostBindingContext, ESamlHttpRequest, -} from './entity'; + PostBindingContext, +} from "./entity"; import { IdentityProviderConstructor as IdentityProvider, ServiceProviderMetadata, ServiceProviderSettings, -} from './types'; -import { namespace } from './urn'; -import redirectBinding from './binding-redirect'; -import postBinding from './binding-post'; -import { flow, FlowResult } from './flow'; +} from "./types"; +import { namespace } from "./urn"; +import redirectBinding from "./binding-redirect"; +import postBinding from "./binding-post"; +import { flow } from "./flow"; /* * @desc interface function */ -export default function(props: ServiceProviderSettings) { +export default function (props: ServiceProviderSettings) { return new ServiceProvider(props); } /** -* @desc Service provider can be configured using either metadata importing or spSetting -* @param {object} spSettingimport { FlowResult } from '../types/src/flow.d'; + * @desc Service provider can be configured using either metadata importing or spSetting + * @param {object} spSettingimport { FlowResult } from '../types/src/flow.d'; -*/ + */ export class ServiceProvider extends Entity { entityMeta: ServiceProviderMetadata; /** - * @desc Inherited from Entity - * @param {object} spSetting setting of service provider - */ + * @desc Inherited from Entity + * @param {object} spSetting setting of service provider + */ constructor(spSetting: ServiceProviderSettings) { - const entitySetting = Object.assign({ - authnRequestsSigned: false, - wantAssertionsSigned: false, - wantMessageSigned: false, - }, spSetting); - super(entitySetting, 'sp'); + const entitySetting = Object.assign( + { + authnRequestsSigned: false, + wantAssertionsSigned: false, + wantMessageSigned: false, + }, + spSetting + ); + super(entitySetting, "sp"); } /** - * @desc Generates the login request for developers to design their own method - * @param {IdentityProvider} idp object of identity provider - * @param {string} binding protocol binding - * @param {function} customTagReplacement used when developers have their own login response template - */ + * @desc Generates the login request for developers to design their own method + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ public createLoginRequest( idp: IdentityProvider, - binding = 'redirect', - customTagReplacement?: (template: string) => BindingContext, + binding = "redirect", + customTagReplacement?: (template: string) => BindingContext ): BindingContext | PostBindingContext { const nsBinding = namespace.binding; const protocol = nsBinding[binding]; - if (this.entityMeta.isAuthnRequestSigned() !== idp.entityMeta.isWantAuthnRequestsSigned()) { - throw new Error('ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG'); + if ( + this.entityMeta.isAuthnRequestSigned() !== + idp.entityMeta.isWantAuthnRequestsSigned() + ) { + throw new Error("ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG"); } if (protocol === nsBinding.redirect) { - return redirectBinding.loginRequestRedirectURL({ idp, sp: this }, customTagReplacement); + return redirectBinding.loginRequestRedirectURL( + { idp, sp: this }, + customTagReplacement + ); } if (protocol === nsBinding.post) { - const context = postBinding.base64LoginRequest("/*[local-name(.)='AuthnRequest']", { idp, sp: this }, customTagReplacement); + const context = postBinding.base64LoginRequest( + "/*[local-name(.)='AuthnRequest']", + { idp, sp: this }, + customTagReplacement + ); return { ...context, relayState: this.entitySetting.relayState, - entityEndpoint: idp.entityMeta.getSingleSignOnService(binding) as string, - type: 'SAMLRequest', + entityEndpoint: idp.entityMeta.getSingleSignOnService( + binding + ) as string, + type: "SAMLRequest", }; } // Will support artifact in the next release - throw new Error('ERR_SP_LOGIN_REQUEST_UNDEFINED_BINDING'); + throw new Error("ERR_SP_LOGIN_REQUEST_UNDEFINED_BINDING"); } /** - * @desc Validation of the parsed the URL parameters - * @param {IdentityProvider} idp object of identity provider - * @param {string} binding protocol binding - * @param {request} req request - */ + * @desc Validation of the parsed the URL parameters + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param request + */ public parseLoginResponse(idp, binding, request: ESamlHttpRequest) { const self = this; return flow({ from: idp, self: self, checkSignature: true, // saml response must have signature - parserType: 'SAMLResponse', - type: 'login', + parserType: "SAMLResponse", + type: "login", binding: binding, - request: request + request: request, }); } - } diff --git a/src/entity.ts b/src/entity.ts index 28da535f..a7602b3f 100644 --- a/src/entity.ts +++ b/src/entity.ts @@ -1,17 +1,23 @@ /** -* @file entity.ts -* @author tngan -* @desc An abstraction for identity provider and service provider. -*/ -import { isString, isNonEmptyArray } from './utility'; -import { namespace, wording, algorithms, messageConfigurations } from './urn'; -import * as uuid from 'uuid'; -import IdpMetadata, { IdpMetadata as IdpMetadataConstructor } from './metadata-idp'; -import SpMetadata, { SpMetadata as SpMetadataConstructor } from './metadata-sp'; -import redirectBinding from './binding-redirect'; -import postBinding from './binding-post'; -import { MetadataIdpConstructor, MetadataSpConstructor, EntitySetting } from './types'; -import { flow, FlowResult } from './flow'; + * @file entity.ts + * @author tngan + * @desc An abstraction for identity provider and service provider. + */ +import { isNonEmptyArray, isString } from "./utility"; +import { algorithms, messageConfigurations, namespace, wording } from "./urn"; +import { v4 as uuidv4 } from "uuid"; +import IdpMetadata, { + IdpMetadata as IdpMetadataConstructor, +} from "./metadata-idp"; +import SpMetadata, { SpMetadata as SpMetadataConstructor } from "./metadata-sp"; +import redirectBinding from "./binding-redirect"; +import postBinding from "./binding-post"; +import { + EntitySetting, + MetadataIdpConstructor, + MetadataSpConstructor, +} from "./types"; +import { flow } from "./flow"; const dataEncryptionAlgorithm = algorithms.encryption.data; const keyEncryptionAlgorithm = algorithms.encryption.key; @@ -27,8 +33,8 @@ const defaultEntitySetting = { requestSignatureAlgorithm: signatureAlgorithms.RSA_SHA256, dataEncryptionAlgorithm: dataEncryptionAlgorithm.AES_256, keyEncryptionAlgorithm: keyEncryptionAlgorithm.RSA_1_5, - generateID: (): string => ('_' + uuid.v4()), - relayState: '', + generateID: (): string => "_" + uuidv4(), + relayState: "", }; export interface ESamlHttpRequest { @@ -54,8 +60,10 @@ export interface ParseResult { sigAlg: string; } -export type EntityConstructor = (MetadataIdpConstructor | MetadataSpConstructor) - & { metadata?: string | Buffer }; +export type EntityConstructor = ( + | MetadataIdpConstructor + | MetadataSpConstructor +) & { metadata?: string | Buffer }; export default class Entity { entitySetting: EntitySetting; @@ -63,66 +71,69 @@ export default class Entity { entityMeta: IdpMetadataConstructor | SpMetadataConstructor; /** - * @param entitySetting - * @param entityMeta is the entity metadata, deprecated after 2.0 - */ - constructor(entitySetting: EntityConstructor, entityType: 'idp' | 'sp') { + * @param entitySetting + * @param entityMeta is the entity metadata, deprecated after 2.0 + */ + constructor(entitySetting: EntityConstructor, entityType: "idp" | "sp") { this.entitySetting = Object.assign({}, defaultEntitySetting, entitySetting); const metadata = entitySetting.metadata || entitySetting; switch (entityType) { - case 'idp': + case "idp": this.entityMeta = IdpMetadata(metadata); - // setting with metadata has higher precedence + // setting with metadata has higher precedence this.entitySetting.wantAuthnRequestsSigned = this.entityMeta.isWantAuthnRequestsSigned(); - this.entitySetting.nameIDFormat = this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; + this.entitySetting.nameIDFormat = + this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; break; - case 'sp': + case "sp": this.entityMeta = SpMetadata(metadata); - // setting with metadata has higher precedence + // setting with metadata has higher precedence this.entitySetting.authnRequestsSigned = this.entityMeta.isAuthnRequestSigned(); this.entitySetting.wantAssertionsSigned = this.entityMeta.isWantAssertionsSigned(); - this.entitySetting.nameIDFormat = this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; + this.entitySetting.nameIDFormat = + this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; break; default: - throw new Error('ERR_UNDEFINED_ENTITY_TYPE'); + throw new Error("ERR_UNDEFINED_ENTITY_TYPE"); } } /** - * @desc Returns the setting of entity - * @return {object} - */ + * @desc Returns the setting of entity + * @return {object} + */ getEntitySetting() { return this.entitySetting; } + /** - * @desc Returns the xml string of entity metadata - * @return {string} - */ + * @desc Returns the xml string of entity metadata + * @return {string} + */ getMetadata(): string { return this.entityMeta.getMetadata(); } /** - * @desc Exports the entity metadata into specified folder - * @param {string} exportFile indicates the file name - */ + * @desc Exports the entity metadata into specified folder + * @param {string} exportFile indicates the file name + */ exportMetadata(exportFile: string) { return this.entityMeta.exportMetadata(exportFile); } /** * @desc Verify fields with the one specified in metadata - * @param {string/[string]} field is a string or an array of string indicating the field value in SAML message - * @param {string} metaField is a string indicating the same field specified in metadata - * @return {boolean} True/False - */ + * @param {string/[string]} field is a string or an array of string indicating the field value in SAML message + * @param {string} metaField is a string indicating the same field specified in metadata + * @return {boolean} True/False + */ verifyFields(field: string | string[], metaField: string): boolean { if (isString(field)) { return field === metaField; } if (isNonEmptyArray(field)) { let res = true; - (field as string[]).forEach(f => { + (field as string[]).forEach((f) => { if (f !== metaField) { res = false; return; @@ -132,101 +143,136 @@ export default class Entity { } return false; } + /** @desc Generates the logout request for developers to design their own method - * @param {ServiceProvider} sp object of service provider - * @param {string} binding protocol binding - * @param {object} user current logged user (e.g. user) - * @param {string} relayState the URL to which to redirect the user when logout is complete - * @param {function} customTagReplacement used when developers have their own login response template - */ - createLogoutRequest(targetEntity, binding, user, relayState = '', customTagReplacement?): BindingContext | PostBindingContext { + * @param {ServiceProvider} sp object of service provider + * @param {string} binding protocol binding + * @param {object} user current logged user (e.g. user) + * @param {string} relayState the URL to which to redirect the user when logout is complete + * @param {function} customTagReplacement used when developers have their own login response template + */ + createLogoutRequest( + targetEntity, + binding, + user, + relayState = "", + customTagReplacement? + ): BindingContext | PostBindingContext { if (binding === wording.binding.redirect) { - return redirectBinding.logoutRequestRedirectURL(user, { - init: this, - target: targetEntity, - }, relayState, customTagReplacement); + return redirectBinding.logoutRequestRedirectURL( + user, + { + init: this, + target: targetEntity, + }, + relayState, + customTagReplacement + ); } if (binding === wording.binding.post) { - const entityEndpoint = targetEntity.entityMeta.getSingleLogoutService(binding); - const context = postBinding.base64LogoutRequest(user, "/*[local-name(.)='LogoutRequest']", { init: this, target: targetEntity }, customTagReplacement); + const entityEndpoint = targetEntity.entityMeta.getSingleLogoutService( + binding + ); + const context = postBinding.base64LogoutRequest( + user, + "/*[local-name(.)='LogoutRequest']", + { init: this, target: targetEntity }, + customTagReplacement + ); return { ...context, relayState, entityEndpoint, - type: 'SAMLRequest', + type: "SAMLRequest", }; } // Will support artifact in the next release - throw new Error('ERR_UNDEFINED_BINDING'); + throw new Error("ERR_UNDEFINED_BINDING"); } /** - * @desc Generates the logout response for developers to design their own method - * @param {IdentityProvider} idp object of identity provider - * @param {object} requestInfo corresponding request, used to obtain the id - * @param {string} relayState the URL to which to redirect the user when logout is complete. - * @param {string} binding protocol binding - * @param {function} customTagReplacement used when developers have their own login response template - */ - createLogoutResponse(target, requestInfo, binding, relayState = '', customTagReplacement?): BindingContext | PostBindingContext { + * @desc Generates the logout response for developers to design their own method + * @param {IdentityProvider} idp object of identity provider + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {string} relayState the URL to which to redirect the user when logout is complete. + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ + createLogoutResponse( + target, + requestInfo, + binding, + relayState = "", + customTagReplacement? + ): BindingContext | PostBindingContext { const protocol = namespace.binding[binding]; if (protocol === namespace.binding.redirect) { - return redirectBinding.logoutResponseRedirectURL(requestInfo, { - init: this, - target, - }, relayState, customTagReplacement); + return redirectBinding.logoutResponseRedirectURL( + requestInfo, + { + init: this, + target, + }, + relayState, + customTagReplacement + ); } if (protocol === namespace.binding.post) { - const context = postBinding.base64LogoutResponse(requestInfo, { - init: this, - target, - }, customTagReplacement); + const context = postBinding.base64LogoutResponse( + requestInfo, + { + init: this, + target, + }, + customTagReplacement + ); return { ...context, relayState, entityEndpoint: target.entityMeta.getSingleLogoutService(binding), - type: 'SAMLResponse', + type: "SAMLResponse", }; } - throw new Error('ERR_CREATE_LOGOUT_RESPONSE_UNDEFINED_BINDING'); + throw new Error("ERR_CREATE_LOGOUT_RESPONSE_UNDEFINED_BINDING"); } /** - * @desc Validation of the parsed the URL parameters - * @param {IdentityProvider} idp object of identity provider - * @param {string} binding protocol binding - * @param {request} req request - * @return {Promise} - */ + * @desc Validation of the parsed the URL parameters + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param {request} req request + * @return {Promise} + */ parseLogoutRequest(from, binding, request: ESamlHttpRequest) { const self = this; return flow({ from: from, self: self, - type: 'logout', - parserType: 'LogoutRequest', + type: "logout", + parserType: "LogoutRequest", checkSignature: this.entitySetting.wantLogoutRequestSigned, binding: binding, request: request, }); } + /** - * @desc Validation of the parsed the URL parameters - * @param {object} config config for the parser - * @param {string} binding protocol binding - * @param {request} req request - * @return {Promise} - */ + * @desc Validation of the parsed the URL parameters + * @param {object} config config for the parser + * @param {string} binding protocol binding + * @param {request} req request + * @return {Promise} + */ parseLogoutResponse(from, binding, request: ESamlHttpRequest) { const self = this; return flow({ from: from, self: self, - type: 'logout', - parserType: 'LogoutResponse', + type: "logout", + parserType: "LogoutResponse", checkSignature: self.entitySetting.wantLogoutResponseSigned, binding: binding, - request: request + request: request, }); } } diff --git a/src/extractor.ts b/src/extractor.ts index f128f4e5..e2572825 100644 --- a/src/extractor.ts +++ b/src/extractor.ts @@ -1,7 +1,8 @@ -import { DOMParser } from 'xmldom'; -import { select, SelectedValue } from 'xpath'; -import { uniq, last, zipObject, notEmpty } from './utility'; -import camelCase from 'camelcase'; +import {DOMParser} from "xmldom"; +import {select, SelectedValue} from "xpath"; +import {last, notEmpty, uniq, zipObject} from "./utility"; +import camelCase from "camelcase"; + const dom = DOMParser; interface ExtractorField { @@ -18,103 +19,112 @@ export type ExtractorFields = ExtractorField[]; function buildAbsoluteXPath(paths) { return paths.reduce((currentPath, name) => { let appendedPath = currentPath; - const isWildcard = name.startsWith('~'); + const isWildcard = name.startsWith("~"); if (isWildcard) { - const pathName = name.replace('~', ''); + const pathName = name.replace("~", ""); appendedPath = currentPath + `/*[contains(local-name(), '${pathName}')]`; } if (!isWildcard) { appendedPath = currentPath + `/*[local-name(.)='${name}']`; } return appendedPath; - }, ''); + }, ""); } function buildAttributeXPath(attributes) { if (attributes.length === 0) { - return '/text()'; + return "/text()"; } if (attributes.length === 1) { return `/@${attributes[0]}`; } - const filters = attributes.map(attribute => `name()='${attribute}'`).join(' or '); + const filters = attributes + .map((attribute:string) => `name()='${attribute}'`) + .join(" or "); return `/@*[${filters}]`; } export const loginRequestFields: ExtractorFields = [ { - key: 'request', - localPath: ['AuthnRequest'], - attributes: ['ID', 'IssueInstant', 'Destination', 'AssertionConsumerServiceURL'] + key: "request", + localPath: ["AuthnRequest"], + attributes: [ + "ID", + "IssueInstant", + "Destination", + "AssertionConsumerServiceURL", + ], }, { - key: 'issuer', - localPath: ['AuthnRequest', 'Issuer'], - attributes: [] + key: "issuer", + localPath: ["AuthnRequest", "Issuer"], + attributes: [], }, { - key: 'nameIDPolicy', - localPath: ['AuthnRequest', 'NameIDPolicy'], - attributes: ['Format', 'AllowCreate'] + key: "nameIDPolicy", + localPath: ["AuthnRequest", "NameIDPolicy"], + attributes: ["Format", "AllowCreate"], }, { - key: 'authnContextClassRef', - localPath: ['AuthnRequest', 'AuthnContextClassRef'], - attributes: [] + key: "authnContextClassRef", + localPath: ["AuthnRequest", "AuthnContextClassRef"], + attributes: [], }, { - key: 'signature', - localPath: ['AuthnRequest', 'Signature'], + key: "signature", + localPath: ["AuthnRequest", "Signature"], attributes: [], - context: true - } + context: true, + }, ]; // support two-tiers status code export const loginResponseStatusFields = [ { - key: 'top', - localPath: ['Response', 'Status', 'StatusCode'], - attributes: ['Value'], + key: "top", + localPath: ["Response", "Status", "StatusCode"], + attributes: ["Value"], }, { - key: 'second', - localPath: ['Response', 'Status', 'StatusCode', 'StatusCode'], - attributes: ['Value'], - } + key: "second", + localPath: ["Response", "Status", "StatusCode", "StatusCode"], + attributes: ["Value"], + }, ]; // support two-tiers status code export const logoutResponseStatusFields = [ { - key: 'top', - localPath: ['LogoutResponse', 'Status', 'StatusCode'], - attributes: ['Value'] + key: "top", + localPath: ["LogoutResponse", "Status", "StatusCode"], + attributes: ["Value"], }, { - key: 'second', - localPath: ['LogoutResponse', 'Status', 'StatusCode', 'StatusCode'], - attributes: ['Value'], - } + key: "second", + localPath: ["LogoutResponse", "Status", "StatusCode", "StatusCode"], + attributes: ["Value"], + }, ]; -export const loginResponseFields: ((assertion: any) => ExtractorFields) = assertion => [ +export const loginResponseFields: (assertion: any) => ExtractorFields = ( + assertion:string +) => [ { - key: 'conditions', - localPath: ['Assertion', 'Conditions'], - attributes: ['NotBefore', 'NotOnOrAfter'], - shortcut: assertion + key: "conditions", + localPath: ["Assertion", "Conditions"], + attributes: ["NotBefore", "NotOnOrAfter"], + shortcut: assertion, }, { - key: 'response', - localPath: ['Response'], - attributes: ['ID', 'IssueInstant', 'Destination', 'InResponseTo'], + key: "response", + localPath: ["Response"], + attributes: ["ID", "IssueInstant", "Destination", "InResponseTo"], }, { - key: 'audience', - localPath: ['Assertion', 'Conditions', 'AudienceRestriction', 'Audience'], + key: "audience", + localPath: ["Assertion", "Conditions", "AudienceRestriction", "Audience"], attributes: [], - shortcut: assertion + shortcut: assertion, }, // { // key: 'issuer', @@ -122,78 +132,77 @@ export const loginResponseFields: ((assertion: any) => ExtractorFields) = assert // attributes: [] // }, { - key: 'issuer', - localPath: ['Assertion', 'Issuer'], + key: "issuer", + localPath: ["Assertion", "Issuer"], attributes: [], - shortcut: assertion + shortcut: assertion, }, { - key: 'nameID', - localPath: ['Assertion', 'Subject', 'NameID'], + key: "nameID", + localPath: ["Assertion", "Subject", "NameID"], attributes: [], - shortcut: assertion + shortcut: assertion, }, { - key: 'sessionIndex', - localPath: ['Assertion', 'AuthnStatement'], - attributes: ['AuthnInstant', 'SessionNotOnOrAfter', 'SessionIndex'], - shortcut: assertion + key: "sessionIndex", + localPath: ["Assertion", "AuthnStatement"], + attributes: ["AuthnInstant", "SessionNotOnOrAfter", "SessionIndex"], + shortcut: assertion, }, { - key: 'attributes', - localPath: ['Assertion', 'AttributeStatement', 'Attribute'], - index: ['Name'], - attributePath: ['AttributeValue'], + key: "attributes", + localPath: ["Assertion", "AttributeStatement", "Attribute"], + index: ["Name"], + attributePath: ["AttributeValue"], attributes: [], - shortcut: assertion - } + shortcut: assertion, + }, ]; export const logoutRequestFields: ExtractorFields = [ { - key: 'request', - localPath: ['LogoutRequest'], - attributes: ['ID', 'IssueInstant', 'Destination'] + key: "request", + localPath: ["LogoutRequest"], + attributes: ["ID", "IssueInstant", "Destination"], }, { - key: 'issuer', - localPath: ['LogoutRequest', 'Issuer'], - attributes: [] + key: "issuer", + localPath: ["LogoutRequest", "Issuer"], + attributes: [], }, { - key: 'nameID', - localPath: ['LogoutRequest', 'NameID'], - attributes: [] + key: "nameID", + localPath: ["LogoutRequest", "NameID"], + attributes: [], }, { - key: 'signature', - localPath: ['LogoutRequest', 'Signature'], + key: "signature", + localPath: ["LogoutRequest", "Signature"], attributes: [], - context: true - } + context: true, + }, ]; export const logoutResponseFields: ExtractorFields = [ { - key: 'response', - localPath: ['LogoutResponse'], - attributes: ['ID', 'Destination', 'InResponseTo'] + key: "response", + localPath: ["LogoutResponse"], + attributes: ["ID", "Destination", "InResponseTo"], }, { - key: 'issuer', - localPath: ['LogoutResponse', 'Issuer'], - attributes: [] + key: "issuer", + localPath: ["LogoutResponse", "Issuer"], + attributes: [], }, { - key: 'signature', - localPath: ['LogoutResponse', 'Signature'], + key: "signature", + localPath: ["LogoutResponse", "Signature"], attributes: [], - context: true - } + context: true, + }, ]; export function extract(context: string, fields) { - const rootDoc = new dom().parseFromString(context); return fields.reduce((result: any, field) => { @@ -227,17 +236,21 @@ export function extract(context: string, fields) { attributes: [] } */ - if (localPath.every(path => Array.isArray(path))) { + if (localPath.every((path:string) => Array.isArray(path))) { const multiXPaths = localPath - .map(path => { + .map((path:string) => { // not support attribute yet, so ignore it return `${buildAbsoluteXPath(path)}/text()`; }) - .join(' | '); + .join(" | "); return { ...result, - [key]: uniq(select(multiXPaths, targetDoc).map((n: Node) => n.nodeValue).filter(notEmpty)) + [key]: uniq( + select(multiXPaths, targetDoc) + .map((n: Node) => n.nodeValue) + .filter(notEmpty) + ), }; } // eo special case: multiple path @@ -253,7 +266,7 @@ export function extract(context: string, fields) { index: ['Name'], attributePath: ['AttributeValue'], attributes: [] - } + } */ if (index && attributePath) { // find the index in localpath @@ -261,23 +274,31 @@ export function extract(context: string, fields) { const fullLocalXPath = `${baseXPath}${indexPath}`; const parentNodes = select(baseXPath, targetDoc); // [uid, mail, edupersonaffiliation], ready for aggregate - const parentAttributes = select(fullLocalXPath, targetDoc).map((n: Attr) => n.value); + const parentAttributes = select(fullLocalXPath, targetDoc).map( + (n: Attr) => n.value + ); // [attribute, attributevalue] - const childXPath = buildAbsoluteXPath([last(localPath)].concat(attributePath)); + const childXPath = buildAbsoluteXPath( + [last(localPath)].concat(attributePath) + ); const childAttributeXPath = buildAttributeXPath(attributes); const fullChildXPath = `${childXPath}${childAttributeXPath}`; // [ 'test', 'test@example.com', [ 'users', 'examplerole1' ] ] - const childAttributes = parentNodes.map(node => { + const childAttributes = parentNodes.map((node:SelectedValue) => { const nodeDoc = new dom().parseFromString(node.toString()); if (attributes.length === 0) { - const childValues = select(fullChildXPath, nodeDoc).map((n: Node) => n.nodeValue); + const childValues = select(fullChildXPath, nodeDoc).map( + (n: Node) => n.nodeValue + ); if (childValues.length === 1) { return childValues[0]; } return childValues; } if (attributes.length > 0) { - const childValues = select(fullChildXPath, nodeDoc).map((n: Attr) => n.value); + const childValues = select(fullChildXPath, nodeDoc).map( + (n: Attr) => n.value + ); if (childValues.length === 1) { return childValues[0]; } @@ -289,9 +310,8 @@ export function extract(context: string, fields) { const obj = zipObject(parentAttributes, childAttributes, false); return { ...result, - [key]: obj + [key]: obj, }; - } // case: fetch entire content, only allow one existence /* @@ -309,11 +329,11 @@ export function extract(context: string, fields) { value = node[0].toString(); } if (node.length > 1) { - value = node.map(n => n.toString()); + value = node.map((n:SelectedValue) => n.toString()); } return { ...result, - [key]: value + [key]: value, }; } @@ -326,19 +346,21 @@ export function extract(context: string, fields) { } */ if (attributes.length > 1) { - const baseNode = select(baseXPath, targetDoc).map(n => n.toString()); - const childXPath = `${buildAbsoluteXPath([last(localPath)])}${attributeXPath}`; + const baseNode = select(baseXPath, targetDoc).map((n:SelectedValue) => n.toString()); + const childXPath = `${buildAbsoluteXPath([ + last(localPath), + ])}${attributeXPath}`; const attributeValues = baseNode.map((node: string) => { const nodeDoc = new dom().parseFromString(node); - const values = select(childXPath, nodeDoc).reduce((r: any, n: Attr) => { + return select(childXPath, nodeDoc).reduce((r: any, n: Attr) => { r[camelCase(n.name)] = n.value; return r; }, {}); - return values; }); return { ...result, - [key]: attributeValues.length === 1 ? attributeValues[0] : attributeValues + [key]: + attributeValues.length === 1 ? attributeValues[0] : attributeValues, }; } // case: single attribute @@ -351,10 +373,12 @@ export function extract(context: string, fields) { */ if (attributes.length === 1) { const fullPath = `${baseXPath}${attributeXPath}`; - const attributeValues = select(fullPath, targetDoc).map((n: Attr) => n.value); + const attributeValues = select(fullPath, targetDoc).map( + (n: Attr) => n.value + ); return { ...result, - [key]: attributeValues[0] + [key]: attributeValues[0], }; } // case: zero attribute @@ -377,11 +401,10 @@ export function extract(context: string, fields) { } return { ...result, - [key]: attributeValue + [key]: attributeValue, }; } return result; }, {}); - } diff --git a/src/flow.ts b/src/flow.ts index 7750563b..6e77f271 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -1,24 +1,24 @@ -import { inflateString, base64Decode } from './utility'; -import { verifyTime } from './validator'; -import libsaml from './libsaml'; +import { base64Decode, inflateString } from "./utility"; +import { verifyTime } from "./validator"; +import libsaml from "./libsaml"; import { extract, + ExtractorFields, loginRequestFields, loginResponseFields, + loginResponseStatusFields, logoutRequestFields, logoutResponseFields, - ExtractorFields, logoutResponseStatusFields, - loginResponseStatusFields -} from './extractor'; +} from "./extractor"; import { BindingNamespace, + MessageSignatureOrder, ParserType, + StatusCode, wording, - MessageSignatureOrder, - StatusCode -} from './urn'; +} from "./urn"; const bindDict = wording.binding; const urlParams = wording.urlParams; @@ -29,14 +29,17 @@ export interface FlowResult { } // get the default extractor fields based on the parserType -function getDefaultExtractorFields(parserType: ParserType, assertion?: any): ExtractorFields { +function getDefaultExtractorFields( + parserType: ParserType, + assertion?: any +): ExtractorFields { switch (parserType) { case ParserType.SAMLRequest: return loginRequestFields; case ParserType.SAMLResponse: if (!assertion) { // unexpected hit - throw new Error('ERR_EMPTY_ASSERTION'); + throw new Error("ERR_EMPTY_ASSERTION"); } return loginResponseFields(assertion); case ParserType.LogoutRequest: @@ -44,13 +47,12 @@ function getDefaultExtractorFields(parserType: ParserType, assertion?: any): Ext case ParserType.LogoutResponse: return logoutResponseFields; default: - throw new Error('ERR_UNDEFINED_PARSERTYPE'); + throw new Error("ERR_UNDEFINED_PARSERTYPE"); } } // proceed the redirect binding flow async function redirectFlow(options) { - const { request, parserType, checkSignature = true, from } = options; const { query, octetString } = request; const { SigAlg: sigAlg, Signature: signature } = query; @@ -63,7 +65,7 @@ async function redirectFlow(options) { // query must contain the saml content if (content === undefined) { - return Promise.reject('ERR_REDIRECT_FLOW_BAD_ARGS'); + return Promise.reject("ERR_REDIRECT_FLOW_BAD_ARGS"); } const xmlString = inflateString(decodeURIComponent(content)); @@ -77,13 +79,17 @@ async function redirectFlow(options) { try { await libsaml.isValidXml(xmlString); } catch (e) { - return Promise.reject('ERR_INVALID_XML'); + return Promise.reject("ERR_INVALID_XML"); } } const extractorFields = getDefaultExtractorFields(parserType); - const parseResult: { samlContent: string, extract: any, sigAlg: (string | null) } = { + const parseResult: { + samlContent: string; + extract: any; + sigAlg: string | null; + } = { samlContent: xmlString, sigAlg: null, extract: extract(xmlString, extractorFields), @@ -96,18 +102,26 @@ async function redirectFlow(options) { // only verify message signature is enough if (checkSignature) { if (!signature || !sigAlg) { - return Promise.reject('ERR_MISSING_SIG_ALG'); + return Promise.reject("ERR_MISSING_SIG_ALG"); } // put the below two assignemnts into verifyMessageSignature function - const base64Signature = Buffer.from(decodeURIComponent(signature), 'base64'); + const base64Signature = Buffer.from( + decodeURIComponent(signature), + "base64" + ); const decodeSigAlg = decodeURIComponent(sigAlg); - const verified = libsaml.verifyMessageSignature(targetEntityMetadata, octetString, base64Signature, sigAlg); + const verified = libsaml.verifyMessageSignature( + targetEntityMetadata, + octetString, + base64Signature, + sigAlg + ); if (!verified) { // Fail to verify message signature - return Promise.reject('ERR_FAILED_MESSAGE_SIGNATURE_VERIFICATION'); + return Promise.reject("ERR_FAILED_MESSAGE_SIGNATURE_VERIFICATION"); } parseResult.sigAlg = decodeSigAlg; @@ -118,14 +132,7 @@ async function redirectFlow(options) { // proceed the post flow async function postFlow(options): Promise { - - const { - request, - from, - self, - parserType, - checkSignature = true - } = options; + const { request, from, self, parserType, checkSignature = true } = options; const { body } = request; @@ -149,7 +156,7 @@ async function postFlow(options): Promise { if (parserType !== urlParams.samlResponse) { extractorFields = getDefaultExtractorFields(parserType, null); } - + // check status based on different scenarios await checkStatus(samlContent, parserType); @@ -158,16 +165,22 @@ async function postFlow(options): Promise { checkSignature && from.entitySetting.messageSigningOrder === MessageSignatureOrder.ETS ) { - const [verified, verifiedAssertionNode] = libsaml.verifySignature(samlContent, verificationOptions); + const [verified, verifiedAssertionNode] = libsaml.verifySignature( + samlContent, + verificationOptions + ); if (!verified) { - return Promise.reject('ERR_FAIL_TO_VERIFY_ETS_SIGNATURE'); + return Promise.reject("ERR_FAIL_TO_VERIFY_ETS_SIGNATURE"); } if (!decryptRequired) { - extractorFields = getDefaultExtractorFields(parserType, verifiedAssertionNode); + extractorFields = getDefaultExtractorFields( + parserType, + verifiedAssertionNode + ); } } - if (parserType === 'SAMLResponse' && decryptRequired) { + if (parserType === "SAMLResponse" && decryptRequired) { const result = await libsaml.decryptAssertion(self, samlContent); samlContent = result[0]; extractorFields = getDefaultExtractorFields(parserType, result[1]); @@ -178,11 +191,17 @@ async function postFlow(options): Promise { checkSignature && from.entitySetting.messageSigningOrder === MessageSignatureOrder.STE ) { - const [verified, verifiedAssertionNode] = libsaml.verifySignature(samlContent, verificationOptions); + const [verified, verifiedAssertionNode] = libsaml.verifySignature( + samlContent, + verificationOptions + ); if (verified) { - extractorFields = getDefaultExtractorFields(parserType, verifiedAssertionNode); + extractorFields = getDefaultExtractorFields( + parserType, + verifiedAssertionNode + ); } else { - return Promise.reject('ERR_FAIL_TO_VERIFY_STE_SIGNATURE'); + return Promise.reject("ERR_FAIL_TO_VERIFY_STE_SIGNATURE"); } } @@ -200,72 +219,76 @@ async function postFlow(options): Promise { // unmatched issuer if ( - (parserType === 'LogoutResponse' || parserType === 'SAMLResponse') - && extractedProperties - && extractedProperties.issuer !== issuer + (parserType === "LogoutResponse" || parserType === "SAMLResponse") && + extractedProperties && + extractedProperties.issuer !== issuer ) { - return Promise.reject('ERR_UNMATCH_ISSUER'); + return Promise.reject("ERR_UNMATCH_ISSUER"); } // invalid session time // only run the verifyTime when `SessionNotOnOrAfter` exists if ( - parserType === 'SAMLResponse' - && extractedProperties.sessionIndex.sessionNotOnOrAfter - && !verifyTime( + parserType === "SAMLResponse" && + extractedProperties.sessionIndex.sessionNotOnOrAfter && + !verifyTime( undefined, extractedProperties.sessionIndex.sessionNotOnOrAfter, self.entitySetting.clockDrifts ) ) { - return Promise.reject('ERR_EXPIRED_SESSION'); + return Promise.reject("ERR_EXPIRED_SESSION"); } // invalid time // 2.4.1.2 https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf if ( - parserType === 'SAMLResponse' - && extractedProperties.conditions - && !verifyTime( + parserType === "SAMLResponse" && + extractedProperties.conditions && + !verifyTime( extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts ) ) { - return Promise.reject('ERR_SUBJECT_UNCONFIRMED'); + return Promise.reject("ERR_SUBJECT_UNCONFIRMED"); } return Promise.resolve(parseResult); } function checkStatus(content: string, parserType: string): Promise { - // only check response parser - if (parserType !== urlParams.samlResponse && parserType !== urlParams.logoutResponse) { - return Promise.resolve('SKIPPED'); + if ( + parserType !== urlParams.samlResponse && + parserType !== urlParams.logoutResponse + ) { + return Promise.resolve("SKIPPED"); } - const fields = parserType === urlParams.samlResponse - ? loginResponseStatusFields - : logoutResponseStatusFields; + const fields = + parserType === urlParams.samlResponse + ? loginResponseStatusFields + : logoutResponseStatusFields; - const {top, second} = extract(content, fields); + const { top, second } = extract(content, fields); // only resolve when top-tier status code is success if (top === StatusCode.Success) { - return Promise.resolve('OK'); + return Promise.resolve("OK"); } if (!top) { - throw new Error('ERR_UNDEFINED_STATUS'); + throw new Error("ERR_UNDEFINED_STATUS"); } // returns a detailed error for two-tier error code - throw new Error(`ERR_FAILED_STATUS with top tier code: ${top}, second tier code: ${second}`); + throw new Error( + `ERR_FAILED_STATUS with top tier code: ${top}, second tier code: ${second}` + ); } export function flow(options): Promise { - const binding = options.binding; const parserType = options.parserType; @@ -283,6 +306,5 @@ export function flow(options): Promise { return redirectFlow(options); } - return Promise.reject('ERR_UNEXPECTED_FLOW'); - + return Promise.reject("ERR_UNEXPECTED_FLOW"); } diff --git a/src/libsaml.ts b/src/libsaml.ts index 7e64f48c..fa434358 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -1,20 +1,25 @@ /** -* @file SamlLib.js -* @author tngan -* @desc A simple library including some common functions -*/ - -import { DOMParser } from 'xmldom'; -import utility, { flattenDeep, isString } from './utility'; -import { algorithms, wording, namespace } from './urn'; -import { select, SelectedValue } from 'xpath'; -import { MetadataInterface } from './metadata'; -import * as nrsa from 'node-rsa'; -import { SignedXml, FileKeyInfo } from 'xml-crypto'; -import * as xmlenc from 'xml-encryption'; -import { extract } from './extractor'; -import camelCase from 'camelcase'; -import { getContext } from './api'; + * @file SamlLib.js + * @author tngan + * @desc A simple library including some common functions + */ + +import { DOMParser } from "xmldom"; +import utility, { flattenDeep, isString } from "./utility"; +import { algorithms, namespace, wording } from "./urn"; +import { select } from "xpath"; +import { MetadataInterface } from "./metadata"; +import * as Nrsa from "node-rsa"; +import { + AdvancedSigningScheme, + SigningScheme, + SigningSchemeHash, +} from "node-rsa"; +import { FileKeyInfo, SignedXml } from "xml-crypto"; +import * as xmlenc from "xml-encryption"; +import { extract } from "./extractor"; +import camelCase from "camelcase"; +import { getContext } from "./api"; const signatureAlgorithms = algorithms.signature; const digestAlgorithms = algorithms.digest; @@ -43,6 +48,7 @@ export interface SignatureVerifierOptions { export interface ExtractorResult { [key: string]: any; + signature?: string | string[]; issuer?: string | string[]; nameid?: string; @@ -65,13 +71,14 @@ export interface BaseSamlTemplate { export interface LoginResponseTemplate extends BaseSamlTemplate { attributes?: LoginResponseAttribute[]; } -export interface LoginRequestTemplate extends BaseSamlTemplate { } -export interface LogoutRequestTemplate extends BaseSamlTemplate { } +export interface LoginRequestTemplate extends BaseSamlTemplate {} + +export interface LogoutRequestTemplate extends BaseSamlTemplate {} -export interface LogoutResponseTemplate extends BaseSamlTemplate { } +export interface LogoutResponseTemplate extends BaseSamlTemplate {} -export type KeyUse = 'signing' | 'encryption'; +export type KeyUse = "signing" | "encryption"; export interface KeyComponent { [key: string]: any; @@ -85,10 +92,25 @@ export interface LibSamlInterface { constructSAMLSignature: (opts: SignatureConstructor) => string; verifySignature: (xml: string, opts) => [boolean, any]; createKeySection: (use: KeyUse, cert: string | Buffer) => {}; - constructMessageSignature: (octetString: string, key: string, passphrase?: string, isBase64?: boolean, signingAlgorithm?: string) => string; - verifyMessageSignature: (metadata, octetString: string, signature: string | Buffer, verifyAlgorithm?: string) => boolean; + constructMessageSignature: ( + octetString: string, + key: string, + passphrase?: string, + isBase64?: boolean, + signingAlgorithm?: string + ) => string; + verifyMessageSignature: ( + metadata, + octetString: string, + signature: string | Buffer, + verifyAlgorithm?: string + ) => boolean; getKeyInfo: (x509Certificate: string, signatureConfig?: any) => void; - encryptAssertion: (sourceEntity, targetEntity, entireXML: string) => Promise; + encryptAssertion: ( + sourceEntity, + targetEntity, + entireXML: string + ) => Promise; decryptAssertion: (here, entireXML: string) => Promise<[string, any]>; getSigningScheme: (sigAlg: string) => string | null; @@ -102,64 +124,73 @@ export interface LibSamlInterface { } const libSaml = () => { - /** - * @desc helper function to get back the query param for redirect binding for SLO/SSO - * @type {string} - */ + * @desc helper function to get back the query param for redirect binding for SLO/SSO + * @type {string} + */ function getQueryParamByType(type: string) { if ([urlParams.logoutRequest, urlParams.samlRequest].indexOf(type) !== -1) { - return 'SAMLRequest'; + return "SAMLRequest"; } - if ([urlParams.logoutResponse, urlParams.samlResponse].indexOf(type) !== -1) { - return 'SAMLResponse'; + if ( + [urlParams.logoutResponse, urlParams.samlResponse].indexOf(type) !== -1 + ) { + return "SAMLResponse"; } - throw new Error('ERR_UNDEFINED_QUERY_PARAMS'); + throw new Error("ERR_UNDEFINED_QUERY_PARAMS"); } + /** * */ const nrsaAliasMapping = { - 'http://www.w3.org/2000/09/xmldsig#rsa-sha1': 'sha1', - 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256': 'sha256', - 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512': 'sha512', + "http://www.w3.org/2000/09/xmldsig#rsa-sha1": "sha1", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": "sha256", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": "sha512", }; /** - * @desc Default login request template - * @type {LoginRequestTemplate} - */ + * @desc Default login request template + * @type {LoginRequestTemplate} + */ const defaultLoginRequestTemplate = { - context: '{Issuer}', + context: + '{Issuer}', }; /** - * @desc Default logout request template - * @type {LogoutRequestTemplate} - */ + * @desc Default logout request template + * @type {LogoutRequestTemplate} + */ const defaultLogoutRequestTemplate = { - context: '{Issuer}{NameID}', + context: + '{Issuer}{NameID}', }; /** - * @desc Default login response template - * @type {LoginResponseTemplate} - */ + * @desc Default login response template + * @type {LoginResponseTemplate} + */ const defaultLoginResponseTemplate = { - context: '{Issuer}{Issuer}{NameID}{Audience}{AuthnStatement}{AttributeStatement}', + context: + '{Issuer}{Issuer}{NameID}{Audience}{AuthnStatement}{AttributeStatement}', attributes: [], }; /** - * @desc Default logout response template - * @type {LogoutResponseTemplate} - */ + * @desc Default logout response template + * @type {LogoutResponseTemplate} + */ const defaultLogoutResponseTemplate = { - context: '{Issuer}', + context: + '{Issuer}', }; + /** - * @private - * @desc Get the signing scheme alias by signature algorithms, used by the node-rsa module - * @param {string} sigAlg signature algorithm - * @return {string/null} signing algorithm short-hand for the module node-rsa - */ - function getSigningScheme(sigAlg?: string): string | null { + * @private + * @desc Get the signing scheme alias by signature algorithms, used by the node-rsa module + * @param {string} sigAlg signature algorithm + * @return {string/null} signing algorithm short-hand for the module node-rsa + */ + function getSigningScheme( + sigAlg?: string + ): SigningScheme | SigningSchemeHash | AdvancedSigningScheme { if (sigAlg) { const algAlias = nrsaAliasMapping[sigAlg]; if (!(algAlias === undefined)) { @@ -168,29 +199,33 @@ const libSaml = () => { } return nrsaAliasMapping[signatureAlgorithms.RSA_SHA1]; // default value } + /** - * @private - * @desc Get the digest algorithms by signature algorithms - * @param {string} sigAlg signature algorithm - * @return {string/null} digest algorithm - */ - function getDigestMethod(sigAlg: string): string | null { + * @private + * @desc Get the digest algorithms by signature algorithms + * @param {string} sigAlg signature algorithm + * @return {string/null} digest algorithm + */ + function getDigestMethod(sigAlg: string): string | undefined { const digestAlg = digestAlgorithms[sigAlg]; if (!(digestAlg === undefined)) { return digestAlg; } - return null; // default value + return undefined; // default value } + /** - * @public - * @desc Create XPath - * @param {string/object} local parameters to create XPath - * @param {boolean} isExtractAll define whether returns whole content according to the XPath - * @return {string} xpath - */ + * @public + * @desc Create XPath + * @param {string/object} local parameters to create XPath + * @param {boolean} isExtractAll define whether returns whole content according to the XPath + * @return {string} xpath + */ function createXPath(local, isExtractAll?: boolean): string { if (isString(local)) { - return isExtractAll === true ? "//*[local-name(.)='" + local + "']/text()" : "//*[local-name(.)='" + local + "']"; + return isExtractAll === true + ? "//*[local-name(.)='" + local + "']/text()" + : "//*[local-name(.)='" + local + "']"; } return "//*[local-name(.)='" + local.name + "']/@" + local.attr; } @@ -204,11 +239,12 @@ const libSaml = () => { */ function tagging(prefix: string, content: string): string { const camelContent = camelCase(content); - return prefix + camelContent.charAt(0).toUpperCase() + camelContent.slice(1); + return ( + prefix + camelContent.charAt(0).toUpperCase() + camelContent.slice(1) + ); } return { - createXPath, getQueryParamByType, defaultLoginRequestTemplate, @@ -217,41 +253,54 @@ const libSaml = () => { defaultLogoutResponseTemplate, /** - * @desc Repalce the tag (e.g. {tag}) inside the raw XML - * @param {string} rawXML raw XML string used to do keyword replacement - * @param {array} tagValues tag values - * @return {string} - */ + * @desc Repalce the tag (e.g. {tag}) inside the raw XML + * @param {string} rawXML raw XML string used to do keyword replacement + * @param {array} tagValues tag values + * @return {string} + */ replaceTagsByValue(rawXML: string, tagValues: any): string { - Object.keys(tagValues).forEach(t => { - rawXML = rawXML.replace(new RegExp(`{${t}}`, 'g'), tagValues[t]); + Object.keys(tagValues).forEach((t: string) => { + rawXML = rawXML.replace(new RegExp(`{${t}}`, "g"), tagValues[t]); }); return rawXML; }, /** - * @desc Helper function to build the AttributeStatement tag - * @param {LoginResponseAttribute} attributes an array of attribute configuration - * @return {string} - */ + * @desc Helper function to build the AttributeStatement tag + * @param {LoginResponseAttribute} attributes an array of attribute configuration + * @return {string} + */ attributeStatementBuilder(attributes: LoginResponseAttribute[]): string { - const attr = attributes.map(({ name, nameFormat, valueTag, valueXsiType, valueXmlnsXs, valueXmlnsXsi }) => { - const defaultValueXmlnsXs = 'http://www.w3.org/2001/XMLSchema'; - const defaultValueXmlnsXsi = 'http://www.w3.org/2001/XMLSchema-instance'; - return `{${tagging('attr', valueTag)}}`; - }).join(''); + const attr = attributes + .map( + ({ + name, + nameFormat, + valueTag, + valueXsiType, + valueXmlnsXs, + valueXmlnsXsi, + }) => { + const defaultValueXmlnsXs = "http://www.w3.org/2001/XMLSchema"; + const defaultValueXmlnsXsi = + "http://www.w3.org/2001/XMLSchema-instance"; + return `{${tagging( + "attr", + valueTag + )}}`; + } + ) + .join(""); return `${attr}`; }, /** - * @desc Construct the XML signature for POST binding - * @param {string} rawSamlMessage request/response xml string - * @param {string} referenceTagXPath reference uri - * @param {string} privateKey declares the private key - * @param {string} passphrase passphrase of the private key [optional] - * @param {string|buffer} signingCert signing certificate - * @param {string} signatureAlgorithm signature algorithm - * @param {string[]} transformationAlgorithms canonicalization and transformation Algorithms - * @return {string} base64 encoded string - */ + * @desc Construct the XML signature for POST binding + * @return {string} base64 encoded string + * @param opts + */ constructSAMLSignature(opts: SignatureConstructor) { const { rawSamlMessage, @@ -260,8 +309,8 @@ const libSaml = () => { privateKeyPass, signatureAlgorithm = signatureAlgorithms.RSA_SHA256, transformationAlgorithms = [ - 'http://www.w3.org/2000/09/xmldsig#enveloped-signature', - 'http://www.w3.org/2001/10/xml-exc-c14n#', + "http://www.w3.org/2000/09/xmldsig#enveloped-signature", + "http://www.w3.org/2001/10/xml-exc-c14n#", ], signingCert, signatureConfig, @@ -280,13 +329,13 @@ const libSaml = () => { if (isMessageSigned) { sig.addReference( // reference to the root node - '/*', + "/*", transformationAlgorithms, getDigestMethod(signatureAlgorithm), - '', - '', - '', - false, + "", + "", + "", + false ); } sig.signatureAlgorithm = signatureAlgorithm; @@ -297,25 +346,28 @@ const libSaml = () => { } else { sig.computeSignature(rawSamlMessage); } - return isBase64Output !== false ? utility.base64Encode(sig.getSignedXml()) : sig.getSignedXml(); + return isBase64Output + ? utility.base64Encode(sig.getSignedXml()) + : sig.getSignedXml(); }, /** - * @desc Verify the XML signature - * @param {string} xml xml - * @param {signature} signature context of XML signature - * @param {SignatureVerifierOptions} opts cert declares the X509 certificate - * @return {boolean} verification result - */ - verifySignature(xml: string, opts: SignatureVerifierOptions) { - + * @desc Verify the XML signature + * @param {string} xml xml + * @param {SignatureVerifierOptions} opts cert declares the X509 certificate + * @return {boolean} verification result + */ + verifySignature(xml: string, opts?: SignatureVerifierOptions) { const doc = new dom().parseFromString(xml); // In order to avoid the wrapping attack, we have changed to use absolute xpath instead of naively fetching the signature element // message signature (logout response / saml response) - const messageSignatureXpath = "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Signature']"; + const messageSignatureXpath = + "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Signature']"; // assertion signature (logout response / saml response) - const assertionSignatureXpath = "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']/*[local-name(.)='Signature']"; + const assertionSignatureXpath = + "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']/*[local-name(.)='Signature']"; // check if there is a potential malicious wrapping signature - const wrappingElementsXPath = "/*[contains(local-name(), 'Response')]/*[local-name(.)='Assertion']/*[local-name(.)='Subject']/*[local-name(.)='SubjectConfirmation']/*[local-name(.)='SubjectConfirmationData']//*[local-name(.)='Assertion' or local-name(.)='Signature']"; + const wrappingElementsXPath = + "/*[contains(local-name(), 'Response')]/*[local-name(.)='Assertion']/*[local-name(.)='Subject']/*[local-name(.)='SubjectConfirmation']/*[local-name(.)='SubjectConfirmationData']//*[local-name(.)='Assertion' or local-name(.)='Signature']"; // select the signature node let selection: any = []; @@ -329,66 +381,75 @@ const libSaml = () => { // try to catch potential wrapping attack if (wrappingElementNode.length !== 0) { - throw new Error('ERR_POTENTIAL_WRAPPING_ATTACK'); + throw new Error("ERR_POTENTIAL_WRAPPING_ATTACK"); } // guarantee to have a signature in saml response if (selection.length === 0) { - throw new Error('ERR_ZERO_SIGNATURE'); + throw new Error("ERR_ZERO_SIGNATURE"); } - const sig = new SignedXml(); + const sig: SignedXml = new SignedXml(); let verified = true; // need to refactor later on - selection.forEach(signatureNode => { - - sig.signatureAlgorithm = opts.signatureAlgorithm; + selection.forEach((signatureNode: Node) => { + if (opts && opts.signatureAlgorithm) { + sig.signatureAlgorithm = opts.signatureAlgorithm; + } - if (!opts.keyFile && !opts.metadata) { - throw new Error('ERR_UNDEFINED_SIGNATURE_VERIFIER_OPTIONS'); + if (opts && !opts.keyFile && !opts.metadata) { + throw new Error("ERR_UNDEFINED_SIGNATURE_VERIFIER_OPTIONS"); } - if (opts.keyFile) { + if (opts && opts.keyFile) { sig.keyInfoProvider = new FileKeyInfo(opts.keyFile); } - if (opts.metadata) { - - const certificateNode = select(".//*[local-name(.)='X509Certificate']", signatureNode) as any; + if (opts && opts.metadata) { + const certificateNode = select( + ".//*[local-name(.)='X509Certificate']", + signatureNode + ) as any; // certificate in metadata - let metadataCert: any = opts.metadata.getX509Certificate(certUse.signing); + let metadataCert: any = opts.metadata.getX509Certificate( + certUse.signing + ); // flattens the nested array of Certificates from each KeyDescriptor if (Array.isArray(metadataCert)) { metadataCert = flattenDeep(metadataCert); - } else if (typeof metadataCert === 'string') { + } else if (typeof metadataCert === "string") { metadataCert = [metadataCert]; } // normalise the certificate string metadataCert = metadataCert.map(utility.normalizeCerString); if (certificateNode.length === 0) { - throw new Error('NO_SELECTED_CERTIFICATE'); + throw new Error("NO_SELECTED_CERTIFICATE"); } // no certificate node in response if (certificateNode.length !== 0) { const x509CertificateData = certificateNode[0].firstChild.data; - const x509Certificate = utility.normalizeCerString(x509CertificateData); + const x509Certificate = utility.normalizeCerString( + x509CertificateData + ); if ( metadataCert.length >= 1 && - !metadataCert.find(cert => cert.trim() === x509Certificate.trim()) + !metadataCert.find( + (cert: string) => cert.trim() === x509Certificate.trim() + ) ) { // keep this restriction for rolling certificate usage // to make sure the response certificate is one of those specified in metadata - throw new Error('ERROR_UNMATCH_CERTIFICATE_DECLARATION_IN_METADATA'); + throw new Error( + "ERROR_UNMATCH_CERTIFICATE_DECLARATION_IN_METADATA" + ); } sig.keyInfoProvider = new this.getKeyInfo(x509Certificate); - } - - } + } sig.loadSignature(signatureNode); @@ -398,32 +459,41 @@ const libSaml = () => { // immediately throw error when any one of the signature is failed to get verified if (!verified) { - throw new Error('ERR_FAILED_TO_VERIFY_SIGNATURE'); + throw new Error("ERR_FAILED_TO_VERIFY_SIGNATURE"); } - }); // response must be signed, either entire document or assertion // default we will take the assertion section under root if (messageSignatureNode.length === 1) { - const node = select("/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']", doc); + const node = select( + "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']", + doc + ); if (node.length === 1) { assertionNode = node[0].toString(); } } if (assertionSignatureNode.length === 1) { - const verifiedAssertionInfo = extract(assertionSignatureNode[0].toString(), [{ - key: 'refURI', - localPath: ['Signature', 'SignedInfo', 'Reference'], - attributes: ['URI'] - }]); + const verifiedAssertionInfo = extract( + assertionSignatureNode[0].toString(), + [ + { + key: "refURI", + localPath: ["Signature", "SignedInfo", "Reference"], + attributes: ["URI"], + }, + ] + ); // get the assertion supposed to be the one should be verified - const desiredAssertionInfo = extract(doc.toString(), [{ - key: 'id', - localPath: ['~Response', 'Assertion'], - attributes: ['ID'] - }]); + const desiredAssertionInfo = extract(doc.toString(), [ + { + key: "id", + localPath: ["~Response", "Assertion"], + attributes: ["ID"], + }, + ]); // 5.4.2 References // SAML assertions and protocol messages MUST supply a value for the ID attribute on the root element of // the assertion or protocol message being signed. The assertion’s or protocol message's root element may @@ -433,189 +503,256 @@ const libSaml = () => { // attribute value of the root element of the assertion or protocol message being signed. For example, if the // ID attribute value is "foo", then the URI attribute in the element MUST be "#foo". if (verifiedAssertionInfo.refURI !== `#${desiredAssertionInfo.id}`) { - throw new Error('ERR_POTENTIAL_WRAPPING_ATTACK'); + throw new Error("ERR_POTENTIAL_WRAPPING_ATTACK"); } - const verifiedDoc = extract(doc.toString(), [{ - key: 'assertion', - localPath: ['~Response', 'Assertion'], - attributes: [], - context: true - }]); + const verifiedDoc = extract(doc.toString(), [ + { + key: "assertion", + localPath: ["~Response", "Assertion"], + attributes: [], + context: true, + }, + ]); assertionNode = verifiedDoc.assertion.toString(); } return [verified, assertionNode]; }, /** - * @desc Helper function to create the key section in metadata (abstraction for signing and encrypt use) - * @param {string} use type of certificate (e.g. signing, encrypt) - * @param {string} certString declares the certificate String - * @return {object} object used in xml module - */ + * @desc Helper function to create the key section in metadata (abstraction for signing and encrypt use) + * @param {string} use type of certificate (e.g. signing, encrypt) + * @param {string} certString declares the certificate String + * @return {object} object used in xml module + */ createKeySection(use: KeyUse, certString: string | Buffer): KeyComponent { return { - ['KeyDescriptor']: [ + ["KeyDescriptor"]: [ { _attr: { use }, }, { - ['ds:KeyInfo']: [ + ["ds:KeyInfo"]: [ { _attr: { - 'xmlns:ds': 'http://www.w3.org/2000/09/xmldsig#', + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", }, }, { - ['ds:X509Data']: [{ - 'ds:X509Certificate': utility.normalizeCerString(certString), - }], + ["ds:X509Data"]: [ + { + "ds:X509Certificate": utility.normalizeCerString( + certString + ), + }, + ], }, ], - }], + }, + ], }; }, /** - * @desc Constructs SAML message - * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 - * @param {string} key declares the pem-formatted private key - * @param {string} passphrase passphrase of private key [optional] - * @param {string} signingAlgorithm signing algorithm - * @return {string} message signature - */ - constructMessageSignature(octetString: string, key: string, passphrase?: string, isBase64?: boolean, signingAlgorithm?: string) { + * @desc Constructs SAML message + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} key declares the pem-formatted private key + * @param {string} passphrase passphrase of private key [optional] + * @param isBase64 + * @param {string} signingAlgorithm signing algorithm + * @return {string} message signature + */ + constructMessageSignature( + octetString: string, + key: string, + passphrase?: string, + isBase64?: boolean, + signingAlgorithm?: string + ): string { // Default returning base64 encoded signature // Embed with node-rsa module - const decryptedKey = new nrsa(utility.readPrivateKey(key, passphrase), { - signingScheme: getSigningScheme(signingAlgorithm), - }); + const decryptedKey = new Nrsa( + utility.readPrivateKey(key, passphrase), + "private", + { + signingScheme: getSigningScheme(signingAlgorithm), + } + ); const signature = decryptedKey.sign(octetString); // Use private key to sign data - return isBase64 !== false ? signature.toString('base64') : signature; + return isBase64 !== false + ? signature.toString("base64") + : signature.toString(); }, /** - * @desc Verifies message signature - * @param {Metadata} metadata metadata object of identity provider or service provider - * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 - * @param {string} signature context of XML signature - * @param {string} verifyAlgorithm algorithm used to verify - * @return {boolean} verification result - */ - verifyMessageSignature(metadata, octetString: string, signature: string | Buffer, verifyAlgorithm?: string) { + * @desc Verifies message signature + * @param {Metadata} metadata metadata object of identity provider or service provider + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} signature context of XML signature + * @param {string} verifyAlgorithm algorithm used to verify + * @return {boolean} verification result + */ + verifyMessageSignature( + metadata, + octetString: string, + signature: string | Buffer, + verifyAlgorithm?: string + ) { const signCert = metadata.getX509Certificate(certUse.signing); const signingScheme = getSigningScheme(verifyAlgorithm); - const key = new nrsa(utility.getPublicKeyPemFromCertificate(signCert), { signingScheme }); - return key.verify(new Buffer(octetString), signature); + const key = new Nrsa( + utility.getPublicKeyPemFromCertificate(signCert), + "public", + { signingScheme } + ); + return key.verify( + new Buffer(octetString), + Buffer.from(signature.toString()) + ); }, /** - * @desc Get the public key in string format - * @param {string} x509Certificate certificate - * @return {string} public key - */ + * @desc Get the public key in string format + * @param {string} x509Certificate certificate + * @param signatureConfig + * @return {string} public key + */ getKeyInfo(x509Certificate: string, signatureConfig: any = {}) { - this.getKeyInfo = key => { - const prefix = signatureConfig.prefix ? `${signatureConfig.prefix}:` : ''; + this.getKeyInfo = () => { + const prefix = signatureConfig.prefix + ? `${signatureConfig.prefix}:` + : ""; return `<${prefix}X509Data><${prefix}X509Certificate>${x509Certificate}`; }; - this.getKey = keyInfo => { - return utility.getPublicKeyPemFromCertificate(x509Certificate).toString(); + this.getKey = (keyInfo: string) => { + return utility + .getPublicKeyPemFromCertificate(x509Certificate) + .toString(); }; }, /** - * @desc Encrypt the assertion section in Response - * @param {Entity} sourceEntity source entity - * @param {Entity} targetEntity target entity - * @param {string} xml response in xml string format - * @return {Promise} a promise to resolve the finalized xml - */ + * @desc Encrypt the assertion section in Response + * @param {Entity} sourceEntity source entity + * @param {Entity} targetEntity target entity + * @param {string} xml response in xml string format + * @return {Promise} a promise to resolve the finalized xml + */ encryptAssertion(sourceEntity, targetEntity, xml?: string) { // Implement encryption after signature if it has return new Promise((resolve, reject) => { - if (!xml) { - return reject(new Error('ERR_UNDEFINED_ASSERTION')); + return reject(new Error("ERR_UNDEFINED_ASSERTION")); } const sourceEntitySetting = sourceEntity.entitySetting; const targetEntityMetadata = targetEntity.entityMeta; const doc = new dom().parseFromString(xml); - const assertions = select("//*[local-name(.)='Assertion']", doc) as Node[]; + const assertions = select( + "//*[local-name(.)='Assertion']", + doc + ) as Node[]; if (!Array.isArray(assertions)) { - throw new Error('ERR_NO_ASSERTION'); + throw new Error("ERR_NO_ASSERTION"); } if (assertions.length !== 1) { - throw new Error('ERR_MULTIPLE_ASSERTION'); + throw new Error("ERR_MULTIPLE_ASSERTION"); } // Perform encryption depends on the setting, default is false if (sourceEntitySetting.isAssertionEncrypted) { - xmlenc.encrypt(assertions[0].toString(), { - // use xml-encryption module - rsa_pub: Buffer.from(utility.getPublicKeyPemFromCertificate(targetEntityMetadata.getX509Certificate(certUse.encrypt)).replace(/\r?\n|\r/g, '')), // public key from certificate - pem: Buffer.from('-----BEGIN CERTIFICATE-----' + targetEntityMetadata.getX509Certificate(certUse.encrypt) + '-----END CERTIFICATE-----'), - encryptionAlgorithm: sourceEntitySetting.dataEncryptionAlgorithm, - keyEncryptionAlgorithm: sourceEntitySetting.keyEncryptionAlgorithm, - }, (err, res) => { - if (err) { - console.error(err); - return reject(new Error('ERR_EXCEPTION_OF_ASSERTION_ENCRYPTION')); + xmlenc.encrypt( + assertions[0].toString(), + { + // use xml-encryption module + rsa_pub: Buffer.from( + utility + .getPublicKeyPemFromCertificate( + targetEntityMetadata.getX509Certificate(certUse.encrypt) + ) + .replace(/\r?\n|\r/g, "") + ), // public key from certificate + pem: Buffer.from( + "-----BEGIN CERTIFICATE-----" + + targetEntityMetadata.getX509Certificate(certUse.encrypt) + + "-----END CERTIFICATE-----" + ), + encryptionAlgorithm: sourceEntitySetting.dataEncryptionAlgorithm, + keyEncryptionAlgorithm: + sourceEntitySetting.keyEncryptionAlgorithm, + }, + (err, res) => { + if (err) { + console.error(err); + return reject( + new Error("ERR_EXCEPTION_OF_ASSERTION_ENCRYPTION") + ); + } + if (!res) { + return reject(new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION")); + } + const { + encryptedAssertion: encAssertionPrefix, + } = sourceEntitySetting.tagPrefix; + const encryptAssertionNode = new dom().parseFromString( + `<${encAssertionPrefix}:EncryptedAssertion xmlns:${encAssertionPrefix}="${namespace.names.assertion}">${res}` + ); + doc.replaceChild(encryptAssertionNode, assertions[0]); + return resolve(utility.base64Encode(doc.toString())); } - if (!res) { - return reject(new Error('ERR_UNDEFINED_ENCRYPTED_ASSERTION')); - } - const { encryptedAssertion: encAssertionPrefix } = sourceEntitySetting.tagPrefix; - const encryptAssertionNode = new dom().parseFromString(`<${encAssertionPrefix}:EncryptedAssertion xmlns:${encAssertionPrefix}="${namespace.names.assertion}">${res}`); - doc.replaceChild(encryptAssertionNode, assertions[0]); - return resolve(utility.base64Encode(doc.toString())); - }); + ); } else { return resolve(utility.base64Encode(xml)); // No need to do encrpytion } }); }, /** - * @desc Decrypt the assertion section in Response - * @param {string} type only accept SAMLResponse to proceed decryption - * @param {Entity} here this entity - * @param {Entity} from from the entity where the message is sent - * @param {string} entireXML response in xml string format - * @return {function} a promise to get back the entire xml with decrypted assertion - */ + * @desc Decrypt the assertion section in Response + * @param {Entity} here this entity + * @param {string} entireXML response in xml string format + * @return {function} a promise to get back the entire xml with decrypted assertion + */ decryptAssertion(here, entireXML: string) { return new Promise<[string, any]>((resolve, reject) => { // Implement decryption first then check the signature if (!entireXML) { - return reject(new Error('ERR_UNDEFINED_ASSERTION')); + return reject(new Error("ERR_UNDEFINED_ASSERTION")); } // Perform encryption depends on the setting of where the message is sent, default is false const hereSetting = here.entitySetting; const xml = new dom().parseFromString(entireXML); - const encryptedAssertions = select("/*[contains(local-name(), 'Response')]/*[local-name(.)='EncryptedAssertion']", xml) as Node[]; + const encryptedAssertions = select( + "/*[contains(local-name(), 'Response')]/*[local-name(.)='EncryptedAssertion']", + xml + ) as Node[]; if (!Array.isArray(encryptedAssertions)) { - throw new Error('ERR_UNDEFINED_ENCRYPTED_ASSERTION'); + throw new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION"); } if (encryptedAssertions.length !== 1) { - throw new Error('ERR_MULTIPLE_ASSERTION'); + throw new Error("ERR_MULTIPLE_ASSERTION"); } - return xmlenc.decrypt(encryptedAssertions[0].toString(), { - key: utility.readPrivateKey(hereSetting.encPrivateKey, hereSetting.encPrivateKeyPass), - }, (err, res) => { - if (err) { - console.error(err); - return reject(new Error('ERR_EXCEPTION_OF_ASSERTION_DECRYPTION')); - } - if (!res) { - return reject(new Error('ERR_UNDEFINED_ENCRYPTED_ASSERTION')); + return xmlenc.decrypt( + encryptedAssertions[0].toString(), + { + key: utility.readPrivateKey( + hereSetting.encPrivateKey, + hereSetting.encPrivateKeyPass + ), + }, + (err, res) => { + if (err) { + console.error(err); + return reject(new Error("ERR_EXCEPTION_OF_ASSERTION_DECRYPTION")); + } + if (!res) { + return reject(new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION")); + } + const assertionNode = new dom().parseFromString(res); + xml.replaceChild(assertionNode, encryptedAssertions[0]); + return resolve([xml.toString(), res]); } - const assertionNode = new dom().parseFromString(res); - xml.replaceChild(assertionNode, encryptedAssertions[0]); - return resolve([xml.toString(), res]); - }); + ); }); }, /** * @desc Check if the xml string is valid and bounded */ async isValidXml(input: string) { - // check if global api contains the validate function const { validate } = getContext(); @@ -626,10 +763,10 @@ const libSaml = () => { * they intend to skip the validation */ if (!validate) { - // otherwise, an error will be thrown - return Promise.reject('Your application is potentially vulnerable because no validation function found. Please read the documentation on how to setup the validator. (https://github.com/tngan/samlify#installation)'); - + return Promise.reject( + "Your application is potentially vulnerable because no validation function found. Please read the documentation on how to setup the validator. (https://github.com/tngan/samlify#installation)" + ); } try { @@ -637,7 +774,6 @@ const libSaml = () => { } catch (e) { throw e; } - }, }; }; diff --git a/src/metadata-idp.ts b/src/metadata-idp.ts index 1918d5a1..4e33958d 100644 --- a/src/metadata-idp.ts +++ b/src/metadata-idp.ts @@ -1,34 +1,30 @@ /** -* @file metadata-idp.ts -* @author tngan -* @desc Metadata of identity provider -*/ -import Metadata, { MetadataInterface } from './metadata'; -import { MetadataIdpOptions, MetadataIdpConstructor } from './types'; -import { namespace } from './urn'; -import libsaml from './libsaml'; -import { isNonEmptyArray, isString } from './utility'; -import * as xml from 'xml'; + * @file metadata-idp.ts + * @author tngan + * @desc Metadata of identity provider + */ +import Metadata, {MetadataInterface} from "./metadata"; +import {MetadataIdpConstructor, MetadataIdpOptions} from "./types"; +import {namespace} from "./urn"; +import libsaml from "./libsaml"; +import {isNonEmptyArray, isString} from "./utility"; +import * as xml from "xml"; export interface IdpMetadataInterface extends MetadataInterface { - } /* * @desc interface function */ -export default function(meta: MetadataIdpConstructor) { +export default function (meta: MetadataIdpConstructor) { return new IdpMetadata(meta); } export class IdpMetadata extends Metadata { - constructor(meta: MetadataIdpConstructor) { - const isFile = isString(meta) || meta instanceof Buffer; if (!isFile) { - const { entityID, signingCert, @@ -39,31 +35,35 @@ export class IdpMetadata extends Metadata { singleLogoutService = [], } = meta as MetadataIdpOptions; - const IDPSSODescriptor: any[] = [{ - _attr: { - WantAuthnRequestsSigned: String(wantAuthnRequestsSigned), - protocolSupportEnumeration: namespace.names.protocol, + const IDPSSODescriptor: any[] = [ + { + _attr: { + WantAuthnRequestsSigned: String(wantAuthnRequestsSigned), + protocolSupportEnumeration: namespace.names.protocol, + }, }, - }]; + ]; if (signingCert) { - IDPSSODescriptor.push(libsaml.createKeySection('signing', signingCert)); + IDPSSODescriptor.push(libsaml.createKeySection("signing", signingCert)); } else { //console.warn('Construct identity provider - missing signing certificate'); } if (encryptCert) { - IDPSSODescriptor.push(libsaml.createKeySection('encryption', encryptCert)); + IDPSSODescriptor.push( + libsaml.createKeySection("encryption", encryptCert) + ); } else { //console.warn('Construct identity provider - missing encrypt certificate'); } if (isNonEmptyArray(nameIDFormat)) { - nameIDFormat.forEach(f => IDPSSODescriptor.push({ NameIDFormat: f })); + nameIDFormat.forEach((f: any) => IDPSSODescriptor.push({NameIDFormat: f})); } if (isNonEmptyArray(singleSignOnService)) { - singleSignOnService.forEach((a, indexCount) => { + singleSignOnService.forEach((a:any) => { const attr: any = { Binding: a.Binding, Location: a.Location, @@ -71,72 +71,82 @@ export class IdpMetadata extends Metadata { if (a.isDefault) { attr.isDefault = true; } - IDPSSODescriptor.push({ SingleSignOnService: [{ _attr: attr }] }); + IDPSSODescriptor.push({SingleSignOnService: [{_attr: attr}]}); }); } else { - throw new Error('ERR_IDP_METADATA_MISSING_SINGLE_SIGN_ON_SERVICE'); + throw new Error("ERR_IDP_METADATA_MISSING_SINGLE_SIGN_ON_SERVICE"); } if (isNonEmptyArray(singleLogoutService)) { - singleLogoutService.forEach((a, indexCount) => { + singleLogoutService.forEach((a:any) => { const attr: any = {}; if (a.isDefault) { attr.isDefault = true; } attr.Binding = a.Binding; attr.Location = a.Location; - IDPSSODescriptor.push({ SingleLogoutService: [{ _attr: attr }] }); + IDPSSODescriptor.push({SingleLogoutService: [{_attr: attr}]}); }); } else { - console.warn('Construct identity provider - missing endpoint of SingleLogoutService'); + console.warn( + "Construct identity provider - missing endpoint of SingleLogoutService" + ); } // Create a new metadata by setting - meta = xml([{ - EntityDescriptor: [{ - _attr: { - 'xmlns': namespace.names.metadata, - 'xmlns:assertion': namespace.names.assertion, - 'xmlns:ds': 'http://www.w3.org/2000/09/xmldsig#', - entityID, - }, - }, { IDPSSODescriptor }], - }]); + meta = xml([ + { + EntityDescriptor: [ + { + _attr: { + xmlns: namespace.names.metadata, + "xmlns:assertion": namespace.names.assertion, + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", + entityID, + }, + }, + {IDPSSODescriptor}, + ], + }, + ]); } super(meta as string | Buffer, [ { - key: 'wantAuthnRequestsSigned', - localPath: ['EntityDescriptor', 'IDPSSODescriptor'], - attributes: ['WantAuthnRequestsSigned'], + key: "wantAuthnRequestsSigned", + localPath: ["EntityDescriptor", "IDPSSODescriptor"], + attributes: ["WantAuthnRequestsSigned"], }, { - key: 'singleSignOnService', - localPath: ['EntityDescriptor', 'IDPSSODescriptor', 'SingleSignOnService'], - index: ['Binding'], + key: "singleSignOnService", + localPath: [ + "EntityDescriptor", + "IDPSSODescriptor", + "SingleSignOnService", + ], + index: ["Binding"], attributePath: [], - attributes: ['Location'] + attributes: ["Location"], }, ]); - } /** - * @desc Get the preference whether it wants a signed request - * @return {boolean} WantAuthnRequestsSigned - */ + * @desc Get the preference whether it wants a signed request + * @return {boolean} WantAuthnRequestsSigned + */ isWantAuthnRequestsSigned(): boolean { const was = this.meta.wantAuthnRequestsSigned; if (was === undefined) { return false; } - return String(was) === 'true'; + return String(was) === "true"; } /** - * @desc Get the entity endpoint for single sign on service - * @param {string} binding protocol binding (e.g. redirect, post) - * @return {string/object} location - */ + * @desc Get the entity endpoint for single sign on service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/object} location + */ getSingleSignOnService(binding: string): string | object { if (isString(binding)) { const bindName = namespace.binding[binding]; diff --git a/src/metadata-sp.ts b/src/metadata-sp.ts index a33ecc76..60604913 100644 --- a/src/metadata-sp.ts +++ b/src/metadata-sp.ts @@ -1,18 +1,16 @@ /** -* @file metadata-sp.ts -* @author tngan -* @desc Metadata of service provider -*/ -import Metadata, { MetadataInterface } from './metadata'; -import { MetadataSpConstructor, MetadataSpOptions } from './types'; -import { namespace, elementsOrder as order } from './urn'; -import libsaml from './libsaml'; -import { isNonEmptyArray, isString } from './utility'; -import * as xml from 'xml'; - -export interface SpMetadataInterface extends MetadataInterface { + * @file metadata-sp.ts + * @author tngan + * @desc Metadata of service provider + */ +import Metadata, { MetadataInterface } from "./metadata"; +import { MetadataSpConstructor, MetadataSpOptions } from "./types"; +import { elementsOrder as order, namespace } from "./urn"; +import libsaml from "./libsaml"; +import { isNonEmptyArray, isString } from "./utility"; +import * as xml from "xml"; -} +export interface SpMetadataInterface extends MetadataInterface {} // https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf (P.16, 18) interface MetaElement { @@ -26,26 +24,23 @@ interface MetaElement { /* * @desc interface function */ -export default function(meta: MetadataSpConstructor) { +export default function (meta: MetadataSpConstructor) { return new SpMetadata(meta); } /** -* @desc SP Metadata is for creating Service Provider, provides a set of API to manage the actions in SP. -*/ + * @desc SP Metadata is for creating Service Provider, provides a set of API to manage the actions in SP. + */ export class SpMetadata extends Metadata { - /** - * @param {object/string} meta (either xml string or configuation in object) - * @return {object} prototypes including public functions - */ + * @param {object/string} meta (either xml string or configuation in object) + * @return {object} prototypes including public functions + */ constructor(meta: MetadataSpConstructor) { - const isFile = isString(meta) || meta instanceof Buffer; // use object configuation instead of importing metadata file directly if (!isFile) { - const { elementsOrder = order.default, entityID, @@ -68,39 +63,45 @@ export class SpMetadata extends Metadata { AttributeConsumingService: [], }; - const SPSSODescriptor: any[] = [{ - _attr: { - AuthnRequestsSigned: String(authnRequestsSigned), - WantAssertionsSigned: String(wantAssertionsSigned), - protocolSupportEnumeration: namespace.names.protocol, + const SPSSODescriptor: any[] = [ + { + _attr: { + AuthnRequestsSigned: String(authnRequestsSigned), + WantAssertionsSigned: String(wantAssertionsSigned), + protocolSupportEnumeration: namespace.names.protocol, + }, }, - }]; + ]; if (wantMessageSigned && signatureConfig === undefined) { - console.warn('Construct service provider - missing signatureConfig'); + console.warn("Construct service provider - missing signatureConfig"); } if (signingCert) { - descriptors.KeyDescriptor!.push(libsaml.createKeySection('signing', signingCert).KeyDescriptor); + descriptors.KeyDescriptor!.push( + libsaml.createKeySection("signing", signingCert).KeyDescriptor + ); } else { //console.warn('Construct service provider - missing signing certificate'); } if (encryptCert) { - descriptors.KeyDescriptor!.push(libsaml.createKeySection('encryption', encryptCert).KeyDescriptor); + descriptors.KeyDescriptor!.push( + libsaml.createKeySection("encryption", encryptCert).KeyDescriptor + ); } else { //console.warn('Construct service provider - missing encrypt certificate'); } if (isNonEmptyArray(nameIDFormat)) { - nameIDFormat.forEach(f => descriptors.NameIDFormat!.push(f)); + nameIDFormat.forEach((f:any) => descriptors.NameIDFormat!.push(f)); } else { // default value descriptors.NameIDFormat!.push(namespace.format.emailAddress); } if (isNonEmptyArray(singleLogoutService)) { - singleLogoutService.forEach(a => { + singleLogoutService.forEach((a:any) => { const attr: any = { Binding: a.Binding, Location: a.Location, @@ -114,7 +115,7 @@ export class SpMetadata extends Metadata { if (isNonEmptyArray(assertionConsumerService)) { let indexCount = 0; - assertionConsumerService.forEach(a => { + assertionConsumerService.forEach((a:any) => { const attr: any = { index: String(indexCount++), Binding: a.Binding, @@ -130,66 +131,77 @@ export class SpMetadata extends Metadata { } // handle element order - const existedElements = elementsOrder.filter(name => isNonEmptyArray(descriptors[name])); - existedElements.forEach(name => { - descriptors[name].forEach(e => SPSSODescriptor.push({ [name]: e })); + const existedElements = elementsOrder.filter((name:string) => + isNonEmptyArray(descriptors[name]) + ); + existedElements.forEach((name:string) => { + descriptors[name].forEach((e:string) => SPSSODescriptor.push({ [name]: e })); }); // Re-assign the meta reference as a XML string|Buffer for use with the parent constructor - meta = xml([{ - EntityDescriptor: [{ - _attr: { - entityID, - 'xmlns': namespace.names.metadata, - 'xmlns:assertion': namespace.names.assertion, - 'xmlns:ds': 'http://www.w3.org/2000/09/xmldsig#', - }, - }, { SPSSODescriptor }], - }]); - + meta = xml([ + { + EntityDescriptor: [ + { + _attr: { + entityID, + xmlns: namespace.names.metadata, + "xmlns:assertion": namespace.names.assertion, + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", + }, + }, + { SPSSODescriptor }, + ], + }, + ]); } // Use the re-assigned meta object reference here super(meta as string | Buffer, [ { - key: 'spSSODescriptor', - localPath: ['EntityDescriptor', 'SPSSODescriptor'], - attributes: ['WantAssertionsSigned', 'AuthnRequestsSigned'], + key: "spSSODescriptor", + localPath: ["EntityDescriptor", "SPSSODescriptor"], + attributes: ["WantAssertionsSigned", "AuthnRequestsSigned"], }, { - key: 'assertionConsumerService', - localPath: ['EntityDescriptor', 'SPSSODescriptor', 'AssertionConsumerService'], - attributes: ['Binding', 'Location', 'isDefault', 'index'], - } + key: "assertionConsumerService", + localPath: [ + "EntityDescriptor", + "SPSSODescriptor", + "AssertionConsumerService", + ], + attributes: ["Binding", "Location", "isDefault", "index"], + }, ]); - } /** - * @desc Get the preference whether it wants a signed assertion response - * @return {boolean} Wantassertionssigned - */ + * @desc Get the preference whether it wants a signed assertion response + * @return {boolean} Wantassertionssigned + */ public isWantAssertionsSigned(): boolean { - return this.meta.spSSODescriptor.wantAssertionsSigned === 'true'; + return this.meta.spSSODescriptor.wantAssertionsSigned === "true"; } + /** - * @desc Get the preference whether it signs request - * @return {boolean} Authnrequestssigned - */ + * @desc Get the preference whether it signs request + * @return {boolean} Authnrequestssigned + */ public isAuthnRequestSigned(): boolean { - return this.meta.spSSODescriptor.authnRequestsSigned === 'true'; + return this.meta.spSSODescriptor.authnRequestsSigned === "true"; } + /** - * @desc Get the entity endpoint for assertion consumer service - * @param {string} binding protocol binding (e.g. redirect, post) - * @return {string/[string]} URL of endpoint(s) - */ + * @desc Get the entity endpoint for assertion consumer service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/[string]} URL of endpoint(s) + */ public getAssertionConsumerService(binding: string): string | string[] { if (isString(binding)) { let location; const bindName = namespace.binding[binding]; if (isNonEmptyArray(this.meta.assertionConsumerService)) { - this.meta.assertionConsumerService.forEach(obj => { + this.meta.assertionConsumerService.forEach((obj:any) => { if (obj.binding === bindName) { location = obj.location; return; diff --git a/src/metadata.ts b/src/metadata.ts index c3db6ebc..a9b4e374 100644 --- a/src/metadata.ts +++ b/src/metadata.ts @@ -1,12 +1,12 @@ /** -* @file metadata.ts -* @author tngan -* @desc An abstraction for metadata of identity provider and service provider -*/ -import * as fs from 'fs'; -import { namespace } from './urn'; -import { extract } from './extractor'; -import { isString } from './utility'; + * @file metadata.ts + * @author tngan + * @desc An abstraction for metadata of identity provider and service provider + */ +import * as fs from "fs"; +import { namespace } from "./urn"; +import { extract } from "./extractor"; +import { isString } from "./utility"; export interface MetadataInterface { xmlString: string; @@ -20,60 +20,73 @@ export interface MetadataInterface { } export default class Metadata implements MetadataInterface { - xmlString: string; meta: any; /** - * @param {string | Buffer} metadata xml - * @param {object} extraParse for custom metadata extractor - */ + * @param xml + * @param {object} extraParse for custom metadata extractor + */ constructor(xml: string | Buffer, extraParse: any = []) { this.xmlString = xml.toString(); - this.meta = extract(this.xmlString, extraParse.concat([ - { - key: 'entityDescriptor', - localPath: ['EntityDescriptor'], - attributes: [], - context: true - }, - { - key: 'entityID', - localPath: ['EntityDescriptor'], - attributes: ['entityID'] - }, - { - // shared certificate for both encryption and signing - key: 'sharedCertificate', - localPath: ['EntityDescriptor', '~SSODescriptor', 'KeyDescriptor', 'KeyInfo', 'X509Data', 'X509Certificate'], - attributes: [] - }, - { - // explicit certificate declaration for encryption and signing - key: 'certificate', - localPath: ['EntityDescriptor', '~SSODescriptor', 'KeyDescriptor'], - index: ['use'], - attributePath: ['KeyInfo', 'X509Data', 'X509Certificate'], - attributes: [] - }, - { - key: 'singleLogoutService', - localPath: ['EntityDescriptor', '~SSODescriptor', 'SingleLogoutService'], - attributes: ['Binding', 'Location'] - }, - { - key: 'nameIDFormat', - localPath: ['EntityDescriptor', '~SSODescriptor', 'NameIDFormat'], - attributes: [], - } - ])); + this.meta = extract( + this.xmlString, + extraParse.concat([ + { + key: "entityDescriptor", + localPath: ["EntityDescriptor"], + attributes: [], + context: true, + }, + { + key: "entityID", + localPath: ["EntityDescriptor"], + attributes: ["entityID"], + }, + { + // shared certificate for both encryption and signing + key: "sharedCertificate", + localPath: [ + "EntityDescriptor", + "~SSODescriptor", + "KeyDescriptor", + "KeyInfo", + "X509Data", + "X509Certificate", + ], + attributes: [], + }, + { + // explicit certificate declaration for encryption and signing + key: "certificate", + localPath: ["EntityDescriptor", "~SSODescriptor", "KeyDescriptor"], + index: ["use"], + attributePath: ["KeyInfo", "X509Data", "X509Certificate"], + attributes: [], + }, + { + key: "singleLogoutService", + localPath: [ + "EntityDescriptor", + "~SSODescriptor", + "SingleLogoutService", + ], + attributes: ["Binding", "Location"], + }, + { + key: "nameIDFormat", + localPath: ["EntityDescriptor", "~SSODescriptor", "NameIDFormat"], + attributes: [], + }, + ]) + ); // get shared certificate const sharedCertificate = this.meta.sharedCertificate; - if (typeof sharedCertificate === 'string') { + if (typeof sharedCertificate === "string") { this.meta.certificate = { signing: sharedCertificate, - encryption: sharedCertificate + encryption: sharedCertificate, }; delete this.meta.sharedCertificate; } @@ -82,65 +95,66 @@ export default class Metadata implements MetadataInterface { Array.isArray(this.meta.entityDescriptor) && this.meta.entityDescriptor.length > 1 ) { - throw new Error('ERR_MULTIPLE_METADATA_ENTITYDESCRIPTOR'); + throw new Error("ERR_MULTIPLE_METADATA_ENTITYDESCRIPTOR"); } - } /** - * @desc Get the metadata in xml format - * @return {string} metadata in xml format - */ + * @desc Get the metadata in xml format + * @return {string} metadata in xml format + */ public getMetadata(): string { return this.xmlString; } /** - * @desc Export the metadata to specific file - * @param {string} exportFile is the output file path - */ + * @desc Export the metadata to specific file + * @param {string} exportFile is the output file path + */ public exportMetadata(exportFile: string): void { fs.writeFileSync(exportFile, this.xmlString); } /** - * @desc Get the entityID in metadata - * @return {string} entityID - */ + * @desc Get the entityID in metadata + * @return {string} entityID + */ public getEntityID(): string { return this.meta.entityID; } /** - * @desc Get the x509 certificate declared in entity metadata - * @param {string} use declares the type of certificate - * @return {string} certificate in string format - */ + * @desc Get the x509 certificate declared in entity metadata + * @param {string} use declares the type of certificate + * @return {string} certificate in string format + */ public getX509Certificate(use: string): string | string[] { return this.meta.certificate[use] || null; } /** - * @desc Get the support NameID format declared in entity metadata - * @return {array} support NameID format - */ + * @desc Get the support NameID format declared in entity metadata + * @return {array} support NameID format + */ public getNameIDFormat(): any { return this.meta.nameIDFormat; } /** - * @desc Get the entity endpoint for single logout service - * @param {string} binding e.g. redirect, post - * @return {string/object} location - */ + * @desc Get the entity endpoint for single logout service + * @param {string} binding e.g. redirect, post + * @return {string/object} location + */ public getSingleLogoutService(binding: string | undefined): string | object { if (binding && isString(binding)) { const bindType = namespace.binding[binding]; let singleLogoutService = this.meta.singleLogoutService; if (!(singleLogoutService instanceof Array)) { singleLogoutService = [singleLogoutService]; - } - const service = singleLogoutService.find(obj => obj.binding === bindType); + } + const service = singleLogoutService.find( + (obj:any) => obj.binding === bindType + ); if (service) { return service.location; } @@ -149,10 +163,10 @@ export default class Metadata implements MetadataInterface { } /** - * @desc Get the support bindings - * @param {[string]} services - * @return {[string]} support bindings - */ + * @desc Get the support bindings + * @param {[string]} services + * @return {[string]} support bindings + */ public getSupportBindings(services: string[]): string[] { let supportBindings = []; if (services) { diff --git a/src/types.ts b/src/types.ts index 92ca7ef7..09d2c64e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,10 +1,10 @@ -import { LoginResponseTemplate } from './libsaml'; +import { LoginResponseTemplate } from "./libsaml"; -export { IdentityProvider as IdentityProviderConstructor } from './entity-idp'; -export { IdpMetadata as IdentityProviderMetadata } from './metadata-idp'; +export { IdentityProvider as IdentityProviderConstructor } from "./entity-idp"; +export { IdpMetadata as IdentityProviderMetadata } from "./metadata-idp"; -export { ServiceProvider as ServiceProviderConstructor } from './entity-sp'; -export { SpMetadata as ServiceProviderMetadata } from './metadata-sp'; +export { ServiceProvider as ServiceProviderConstructor } from "./entity-sp"; +export { SpMetadata as ServiceProviderMetadata } from "./metadata-sp"; export type MetadataFile = string | Buffer; @@ -25,9 +25,7 @@ export interface MetadataIdpOptions { requestSignatureAlgorithm?: string; } -export type MetadataIdpConstructor = - | MetadataIdpOptions - | MetadataFile; +export type MetadataIdpConstructor = MetadataIdpOptions | MetadataFile; export interface MetadataSpOptions { entityID?: string; @@ -44,9 +42,7 @@ export interface MetadataSpOptions { elementsOrder?: string[]; } -export type MetadataSpConstructor = - | MetadataSpOptions - | MetadataFile; +export type MetadataSpConstructor = MetadataSpOptions | MetadataFile; export type EntitySetting = ServiceProviderSettings & IdentityProviderSettings; @@ -54,7 +50,7 @@ export interface SignatureConfig { prefix?: string; location?: { reference?: string; - action?: 'append' | 'prepend' | 'before' | 'after'; + action?: "append" | "prepend" | "before" | "after"; }; } @@ -111,7 +107,7 @@ export type IdentityProviderSettings = { privateKey?: string | Buffer; privateKeyPass?: string; signingCert?: string | Buffer; - encryptCert?: string | Buffer; /** todo */ + encryptCert?: string | Buffer /** todo */; nameIDFormat?: string[]; singleSignOnService?: SSOService[]; singleLogoutService?: SSOService[]; diff --git a/src/urn.ts b/src/urn.ts index 0e421c74..9e4484c8 100644 --- a/src/urn.ts +++ b/src/urn.ts @@ -1,206 +1,242 @@ /** -* @file urn.ts -* @author tngan -* @desc Includes all keywords need in samlify -*/ + * @file urn.ts + * @author tngan + * @desc Includes all keywords need in samlify + */ export enum BindingNamespace { - Redirect = 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Post = 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Artifact = 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact' + Redirect = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Post = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Artifact = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact", } export enum MessageSignatureOrder { - STE = 'sign-then-encrypt', - ETS = 'encrypt-then-sign' + STE = "sign-then-encrypt", + ETS = "encrypt-then-sign", } export enum StatusCode { // top-tier - Success = 'urn:oasis:names:tc:SAML:2.0:status:Success', - Requester = 'urn:oasis:names:tc:SAML:2.0:status:Requester', - Responder = 'urn:oasis:names:tc:SAML:2.0:status:Responder', - VersionMismatch = 'urn:oasis:names:tc:SAML:2.0:status:VersionMismatch', + Success = "urn:oasis:names:tc:SAML:2.0:status:Success", + Requester = "urn:oasis:names:tc:SAML:2.0:status:Requester", + Responder = "urn:oasis:names:tc:SAML:2.0:status:Responder", + VersionMismatch = "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch", // second-tier to provide more information - AuthFailed = 'urn:oasis:names:tc:SAML:2.0:status:AuthnFailed', - InvalidAttrNameOrValue = 'urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue', - InvalidNameIDPolicy = 'urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy', - NoAuthnContext = 'urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext', - NoAvailableIDP = 'urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP', - NoPassive = 'urn:oasis:names:tc:SAML:2.0:status:NoPassive', - NoSupportedIDP = 'urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP', - PartialLogout = 'urn:oasis:names:tc:SAML:2.0:status:PartialLogout', - ProxyCountExceeded = 'urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded', - RequestDenied = 'urn:oasis:names:tc:SAML:2.0:status:RequestDenied', - RequestUnsupported = 'urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported', - RequestVersionDeprecated = 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated', - RequestVersionTooHigh = 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh', - RequestVersionTooLow = 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow', - ResourceNotRecognized = 'urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized', - TooManyResponses = 'urn:oasis:names:tc:SAML:2.0:status:TooManyResponses', - UnknownAttrProfile = 'urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile', - UnknownPrincipal = 'urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal', - UnsupportedBinding = 'urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding', + AuthFailed = "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed", + InvalidAttrNameOrValue = "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue", + InvalidNameIDPolicy = "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", + NoAuthnContext = "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext", + NoAvailableIDP = "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP", + NoPassive = "urn:oasis:names:tc:SAML:2.0:status:NoPassive", + NoSupportedIDP = "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP", + PartialLogout = "urn:oasis:names:tc:SAML:2.0:status:PartialLogout", + ProxyCountExceeded = "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded", + RequestDenied = "urn:oasis:names:tc:SAML:2.0:status:RequestDenied", + RequestUnsupported = "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported", + RequestVersionDeprecated = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated", + RequestVersionTooHigh = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh", + RequestVersionTooLow = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow", + ResourceNotRecognized = "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized", + TooManyResponses = "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses", + UnknownAttrProfile = "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile", + UnknownPrincipal = "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal", + UnsupportedBinding = "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding", } const namespace = { binding: { - redirect: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - post: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - artifact: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact', + redirect: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + post: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + artifact: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact", }, names: { - protocol: 'urn:oasis:names:tc:SAML:2.0:protocol', - assertion: 'urn:oasis:names:tc:SAML:2.0:assertion', - metadata: 'urn:oasis:names:tc:SAML:2.0:metadata', - userLogout: 'urn:oasis:names:tc:SAML:2.0:logout:user', - adminLogout: 'urn:oasis:names:tc:SAML:2.0:logout:admin', + protocol: "urn:oasis:names:tc:SAML:2.0:protocol", + assertion: "urn:oasis:names:tc:SAML:2.0:assertion", + metadata: "urn:oasis:names:tc:SAML:2.0:metadata", + userLogout: "urn:oasis:names:tc:SAML:2.0:logout:user", + adminLogout: "urn:oasis:names:tc:SAML:2.0:logout:admin", }, authnContextClassRef: { - password: 'urn:oasis:names:tc:SAML:2.0:ac:classes:Password', - passwordProtectedTransport: 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport', + password: "urn:oasis:names:tc:SAML:2.0:ac:classes:Password", + passwordProtectedTransport: + "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", }, format: { - emailAddress: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', - persistent: 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', - transient: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', - entity: 'urn:oasis:names:tc:SAML:2.0:nameid-format:entity', - unspecified: 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', - kerberos: 'urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos', - windowsDomainQualifiedName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName', - x509SubjectName: 'urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName', + emailAddress: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + persistent: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + transient: "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + entity: "urn:oasis:names:tc:SAML:2.0:nameid-format:entity", + unspecified: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + kerberos: "urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos", + windowsDomainQualifiedName: + "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", + x509SubjectName: + "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", }, statusCode: { // permissible top-level status codes - success: 'urn:oasis:names:tc:SAML:2.0:status:Success', - requester: 'urn:oasis:names:tc:SAML:2.0:status:Requester', - responder: 'urn:oasis:names:tc:SAML:2.0:status:Responder', - versionMismatch: 'urn:oasis:names:tc:SAML:2.0:status:VersionMismatch', + success: "urn:oasis:names:tc:SAML:2.0:status:Success", + requester: "urn:oasis:names:tc:SAML:2.0:status:Requester", + responder: "urn:oasis:names:tc:SAML:2.0:status:Responder", + versionMismatch: "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch", // second-level status codes - authFailed: 'urn:oasis:names:tc:SAML:2.0:status:AuthnFailed', - invalidAttrNameOrValue: 'urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue', - invalidNameIDPolicy: 'urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy', - noAuthnContext: 'urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext', - noAvailableIDP: 'urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP', - noPassive: 'urn:oasis:names:tc:SAML:2.0:status:NoPassive', - noSupportedIDP: 'urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP', - partialLogout: 'urn:oasis:names:tc:SAML:2.0:status:PartialLogout', - proxyCountExceeded: 'urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded', - requestDenied: 'urn:oasis:names:tc:SAML:2.0:status:RequestDenied', - requestUnsupported: 'urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported', - requestVersionDeprecated: 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated', - requestVersionTooHigh: 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh', - requestVersionTooLow: 'urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow', - resourceNotRecognized: 'urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized', - tooManyResponses: 'urn:oasis:names:tc:SAML:2.0:status:TooManyResponses', - unknownAttrProfile: 'urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile', - unknownPrincipal: 'urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal', - unsupportedBinding: 'urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding', + authFailed: "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed", + invalidAttrNameOrValue: + "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue", + invalidNameIDPolicy: + "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", + noAuthnContext: "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext", + noAvailableIDP: "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP", + noPassive: "urn:oasis:names:tc:SAML:2.0:status:NoPassive", + noSupportedIDP: "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP", + partialLogout: "urn:oasis:names:tc:SAML:2.0:status:PartialLogout", + proxyCountExceeded: "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded", + requestDenied: "urn:oasis:names:tc:SAML:2.0:status:RequestDenied", + requestUnsupported: "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported", + requestVersionDeprecated: + "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated", + requestVersionTooHigh: + "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh", + requestVersionTooLow: + "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow", + resourceNotRecognized: + "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized", + tooManyResponses: "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses", + unknownAttrProfile: "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile", + unknownPrincipal: "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal", + unsupportedBinding: "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding", }, }; const tags = { request: { - AllowCreate: '{AllowCreate}', - AssertionConsumerServiceURL: '{AssertionConsumerServiceURL}', - AuthnContextClassRef: '{AuthnContextClassRef}', - AssertionID: '{AssertionID}', - Audience: '{Audience}', - AuthnStatement: '{AuthnStatement}', - AttributeStatement: '{AttributeStatement}', - ConditionsNotBefore: '{ConditionsNotBefore}', - ConditionsNotOnOrAfter: '{ConditionsNotOnOrAfter}', - Destination: '{Destination}', - EntityID: '{EntityID}', - ID: '{ID}', - Issuer: '{Issuer}', - IssueInstant: '{IssueInstant}', - InResponseTo: '{InResponseTo}', - NameID: '{NameID}', - NameIDFormat: '{NameIDFormat}', - ProtocolBinding: '{ProtocolBinding}', - SessionIndex: '{SessionIndex}', - SubjectRecipient: '{SubjectRecipient}', - SubjectConfirmationDataNotOnOrAfter: '{SubjectConfirmationDataNotOnOrAfter}', - StatusCode: '{StatusCode}', + AllowCreate: "{AllowCreate}", + AssertionConsumerServiceURL: "{AssertionConsumerServiceURL}", + AuthnContextClassRef: "{AuthnContextClassRef}", + AssertionID: "{AssertionID}", + Audience: "{Audience}", + AuthnStatement: "{AuthnStatement}", + AttributeStatement: "{AttributeStatement}", + ConditionsNotBefore: "{ConditionsNotBefore}", + ConditionsNotOnOrAfter: "{ConditionsNotOnOrAfter}", + Destination: "{Destination}", + EntityID: "{EntityID}", + ID: "{ID}", + Issuer: "{Issuer}", + IssueInstant: "{IssueInstant}", + InResponseTo: "{InResponseTo}", + NameID: "{NameID}", + NameIDFormat: "{NameIDFormat}", + ProtocolBinding: "{ProtocolBinding}", + SessionIndex: "{SessionIndex}", + SubjectRecipient: "{SubjectRecipient}", + SubjectConfirmationDataNotOnOrAfter: + "{SubjectConfirmationDataNotOnOrAfter}", + StatusCode: "{StatusCode}", }, xmlTag: { - loginRequest: 'AuthnRequest', - logoutRequest: 'LogoutRequest', - loginResponse: 'Response', - logoutResponse: 'LogoutResponse', + loginRequest: "AuthnRequest", + logoutRequest: "LogoutRequest", + loginResponse: "Response", + logoutResponse: "LogoutResponse", }, }; const messageConfigurations = { signingOrder: { - SIGN_THEN_ENCRYPT: 'sign-then-encrypt', - ENCRYPT_THEN_SIGN: 'encrypt-then-sign', + SIGN_THEN_ENCRYPT: "sign-then-encrypt", + ENCRYPT_THEN_SIGN: "encrypt-then-sign", }, }; const algorithms = { signature: { - RSA_SHA1: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1', - RSA_SHA256: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', - RSA_SHA512: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512', + RSA_SHA1: "http://www.w3.org/2000/09/xmldsig#rsa-sha1", + RSA_SHA256: "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", + RSA_SHA512: "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", }, encryption: { data: { - AES_128: 'http://www.w3.org/2001/04/xmlenc#aes128-cbc', - AES_256: 'http://www.w3.org/2001/04/xmlenc#aes256-cbc', - TRI_DEC: 'http://www.w3.org/2001/04/xmlenc#tripledes-cbc', + AES_128: "http://www.w3.org/2001/04/xmlenc#aes128-cbc", + AES_256: "http://www.w3.org/2001/04/xmlenc#aes256-cbc", + TRI_DEC: "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", }, key: { - RSA_OAEP_MGF1P: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p', - RSA_1_5: 'http://www.w3.org/2001/04/xmlenc#rsa-1_5', + RSA_OAEP_MGF1P: "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", + RSA_1_5: "http://www.w3.org/2001/04/xmlenc#rsa-1_5", }, }, digest: { - 'http://www.w3.org/2000/09/xmldsig#rsa-sha1': 'http://www.w3.org/2000/09/xmldsig#sha1', - 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256': 'http://www.w3.org/2001/04/xmlenc#sha256', - 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512': 'http://www.w3.org/2001/04/xmlenc#sha512', // support hashing algorithm sha512 in xml-crypto after 0.8.0 + "http://www.w3.org/2000/09/xmldsig#rsa-sha1": + "http://www.w3.org/2000/09/xmldsig#sha1", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": + "http://www.w3.org/2001/04/xmlenc#sha256", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": + "http://www.w3.org/2001/04/xmlenc#sha512", // support hashing algorithm sha512 in xml-crypto after 0.8.0 }, }; export enum ParserType { - SAMLRequest = 'SAMLRequest', - SAMLResponse = 'SAMLResponse', - LogoutRequest = 'LogoutRequest', - LogoutResponse = 'LogoutResponse' + SAMLRequest = "SAMLRequest", + SAMLResponse = "SAMLResponse", + LogoutRequest = "LogoutRequest", + LogoutResponse = "LogoutResponse", } const wording = { urlParams: { - samlRequest: 'SAMLRequest', - samlResponse: 'SAMLResponse', - logoutRequest: 'LogoutRequest', - logoutResponse: 'LogoutResponse', - sigAlg: 'SigAlg', - signature: 'Signature', - relayState: 'RelayState', + samlRequest: "SAMLRequest", + samlResponse: "SAMLResponse", + logoutRequest: "LogoutRequest", + logoutResponse: "LogoutResponse", + sigAlg: "SigAlg", + signature: "Signature", + relayState: "RelayState", }, binding: { - redirect: 'redirect', - post: 'post', - artifact: 'artifact', + redirect: "redirect", + post: "post", + artifact: "artifact", }, certUse: { - signing: 'signing', - encrypt: 'encryption', + signing: "signing", + encrypt: "encryption", }, metadata: { - sp: 'metadata-sp', - idp: 'metadata-idp', + sp: "metadata-sp", + idp: "metadata-idp", }, }; // https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForSP // some idps restrict the order of elements in entity descriptors const elementsOrder = { - default: ['KeyDescriptor', 'NameIDFormat', 'SingleLogoutService', 'AssertionConsumerService'], - onelogin: ['KeyDescriptor', 'NameIDFormat', 'SingleLogoutService', 'AssertionConsumerService'], - shibboleth: ['KeyDescriptor', 'SingleLogoutService', 'NameIDFormat', 'AssertionConsumerService', 'AttributeConsumingService'], + default: [ + "KeyDescriptor", + "NameIDFormat", + "SingleLogoutService", + "AssertionConsumerService", + ], + onelogin: [ + "KeyDescriptor", + "NameIDFormat", + "SingleLogoutService", + "AssertionConsumerService", + ], + shibboleth: [ + "KeyDescriptor", + "SingleLogoutService", + "NameIDFormat", + "AssertionConsumerService", + "AttributeConsumingService", + ], }; -export { namespace, tags, algorithms, wording, elementsOrder, messageConfigurations }; +export { + namespace, + tags, + algorithms, + wording, + elementsOrder, + messageConfigurations, +}; diff --git a/src/utility.ts b/src/utility.ts index 3efb4c74..6ea437bd 100644 --- a/src/utility.ts +++ b/src/utility.ts @@ -1,21 +1,21 @@ /** -* @file utility.ts -* @author tngan -* @desc Library for some common functions (e.g. de/inflation, en/decoding) -*/ -import { pki, util, asn1 } from 'node-forge'; -import { inflate, deflate } from 'pako'; + * @file utility.ts + * @author tngan + * @desc Library for some common functions (e.g. de/inflation, en/decoding) + */ +import { asn1, pki, util } from "node-forge"; +import { deflate, inflate } from "pako"; -const BASE64_STR = 'base64'; +const BASE64_STR = "base64"; /** * @desc Mimic lodash.zipObject * @param arr1 {string[]} * @param arr2 {[]} + * @param skipDuplicated */ export function zipObject(arr1: string[], arr2: any[], skipDuplicated = true) { return arr1.reduce((res, l, i) => { - if (skipDuplicated) { res[l] = arr2[i]; return res; @@ -30,9 +30,9 @@ export function zipObject(arr1: string[], arr2: any[], skipDuplicated = true) { res[l] = arr2[i]; return res; - }, {}); } + /** * @desc Alternative to lodash.flattenDeep * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep @@ -40,9 +40,10 @@ export function zipObject(arr1: string[], arr2: any[], skipDuplicated = true) { */ export function flattenDeep(input: any[]) { return Array.isArray(input) - ? input.reduce( (a, b) => a.concat(flattenDeep(b)) , []) - : [input]; + ? input.reduce((a, b) => a.concat(flattenDeep(b)), []) + : [input]; } + /** * @desc Alternative to lodash.last * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_last @@ -51,6 +52,7 @@ export function flattenDeep(input: any[]) { export function last(input: any[]) { return input.slice(-1)[0]; } + /** * @desc Alternative to lodash.uniq * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq @@ -58,142 +60,184 @@ export function last(input: any[]) { */ export function uniq(input: string[]) { const set = new Set(input); - return [... set]; + return [...set]; } + /** - * @desc Alternative to lodash.get + * @desc Alternative to lodash.get * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get - * @param obj - * @param path - * @param defaultValue + * @param obj + * @param path + * @param defaultValue */ export function get(obj, path, defaultValue) { - return path.split('.') - .reduce((a, c) => (a && a[c] ? a[c] : (defaultValue || null)), obj); + return path + .split(".") + .reduce((a, c) => (a && a[c] ? a[c] : defaultValue || null), obj); } + /** - * @desc Check if the input is string - * @param {any} input + * @desc Check if the input is string + * @param input */ export function isString(input: any) { - return typeof input === 'string'; + return typeof input === "string"; } + /** -* @desc Encode string with base64 format -* @param {string} message plain-text message -* @return {string} base64 encoded string -*/ + * @desc Encode string with base64 format + * @param {string} message plain-text message + * @return {string} base64 encoded string + */ function base64Encode(message: string | number[]) { return Buffer.from(message as string).toString(BASE64_STR); } + /** -* @desc Decode string from base64 format -* @param {string} base64Message encoded string -* @param {boolean} isBytes determine the return value type (True: bytes False: string) -* @return {bytes/string} decoded bytes/string depends on isBytes, default is {string} -*/ -export function base64Decode(base64Message: string, isBytes?: boolean): string | Buffer { + * @desc Decode string from base64 format + * @param {string} base64Message encoded string + * @param {boolean} isBytes determine the return value type (True: bytes False: string) + * @return {bytes/string} decoded bytes/string depends on isBytes, default is {string} + */ +export function base64Decode( + base64Message: string, + isBytes?: boolean +): string | Buffer { const bytes = Buffer.from(base64Message, BASE64_STR); return Boolean(isBytes) ? bytes : bytes.toString(); } + /** -* @desc Compress the string -* @param {string} message -* @return {string} compressed string -*/ + * @desc Compress the string + * @param {string} message + * @return {string} compressed string + */ function deflateString(message: string): number[] { - const input = Array.prototype.map.call(message, char => char.charCodeAt(0)); + const input = Array.prototype.map.call(message, (char:string) => char.charCodeAt(0)); return Array.from(deflate(input, { raw: true })); } + /** -* @desc Decompress the compressed string -* @param {string} compressedString -* @return {string} decompressed string -*/ + * @desc Decompress the compressed string + * @param {string} compressedString + * @return {string} decompressed string + */ export function inflateString(compressedString: string): string { const inputBuffer = Buffer.from(compressedString, BASE64_STR); - const input = Array.prototype.map.call(inputBuffer.toString('binary'), char => char.charCodeAt(0)); + const input = Array.prototype.map.call( + inputBuffer.toString("binary"), + (char:string) => char.charCodeAt(0) + ); return Array.from(inflate(input, { raw: true })) - .map(byte => String.fromCharCode(byte)) - .join(''); + .map((byte:number) => String.fromCharCode(byte)) + .join(""); } + /** -* @desc Abstract the normalizeCerString and normalizePemString -* @param {buffer} File stream or string -* @param {string} String for header and tail -* @return {string} A formatted certificate string -*/ + * @desc Abstract the normalizeCerString and normalizePemString + * @return {string} A formatted certificate string + * @param bin + * @param format + */ function _normalizeCerString(bin: string | Buffer, format: string) { - return bin.toString().replace(/\n/g, '').replace(/\r/g, '').replace(`-----BEGIN ${format}-----`, '').replace(`-----END ${format}-----`, '').replace(/ /g, ''); + return bin + .toString() + .replace(/\n/g, "") + .replace(/\r/g, "") + .replace(`-----BEGIN ${format}-----`, "") + .replace(`-----END ${format}-----`, "") + .replace(/ /g, ""); } + /** -* @desc Parse the .cer to string format without line break, header and footer -* @param {string} certString declares the certificate contents -* @return {string} certificiate in string format -*/ + * @desc Parse the .cer to string format without line break, header and footer + * @param {string} certString declares the certificate contents + * @return {string} certificiate in string format + */ function normalizeCerString(certString: string | Buffer) { - return _normalizeCerString(certString, 'CERTIFICATE'); + return _normalizeCerString(certString, "CERTIFICATE"); } + /** -* @desc Normalize the string in .pem format without line break, header and footer -* @param {string} pemString -* @return {string} private key in string format -*/ + * @desc Normalize the string in .pem format without line break, header and footer + * @param {string} pemString + * @return {string} private key in string format + */ function normalizePemString(pemString: string | Buffer) { - return _normalizeCerString(pemString.toString(), 'RSA PRIVATE KEY'); + return _normalizeCerString(pemString.toString(), "RSA PRIVATE KEY"); } + /** -* @desc Return the complete URL -* @param {object} req HTTP request -* @return {string} URL -*/ + * @desc Return the complete URL + * @param {object} req HTTP request + * @return {string} URL + */ function getFullURL(req) { - return `${req.protocol}://${req.get('host')}${req.originalUrl}`; + return `${req.protocol}://${req.get("host")}${req.originalUrl}`; } + /** -* @desc Parse input string, return default value if it is undefined -* @param {string/boolean} -* @return {boolean} -*/ -function parseString(str, defaultValue = '') { + * @desc Parse input string, return default value if it is undefined + * @return {boolean} + * @param str + * @param defaultValue + */ +function parseString(str, defaultValue = "") { return str || defaultValue; } + /** -* @desc Override the object by another object (rtl) -* @param {object} default object -* @param {object} object applied to the default object -* @return {object} result object -*/ + * @desc Override the object by another object (rtl) + * @return {object} result object + * @param obj1 + * @param obj2 + */ function applyDefault(obj1, obj2) { return Object.assign({}, obj1, obj2); } + /** -* @desc Get public key in pem format from the certificate included in the metadata -* @param {string} x509 certificate -* @return {string} public key fetched from the certificate -*/ + * @desc Get public key in pem format from the certificate included in the metadata + * @return {string} public key fetched from the certificate + * @param x509Certificate + */ function getPublicKeyPemFromCertificate(x509Certificate: string) { const certDerBytes = util.decode64(x509Certificate); const obj = asn1.fromDer(certDerBytes); const cert = pki.certificateFromAsn1(obj); return pki.publicKeyToPem(cert.publicKey); } + /** -* @desc Read private key from pem-formatted string -* @param {string | Buffer} keyString pem-formattted string -* @param {string} protected passphrase of the key -* @return {string} string in pem format -* If passphrase is used to protect the .pem content (recommend) -*/ -export function readPrivateKey(keyString: string | Buffer, passphrase: string | undefined, isOutputString?: boolean) { - return isString(passphrase) ? this.convertToString(pki.privateKeyToPem(pki.decryptRsaPrivateKey(String(keyString), passphrase)), isOutputString) : keyString; + * @desc Read private key from pem-formatted string + * @param {string | Buffer} keyString pem-formattted string + * @param passphrase + * @param isOutputString + * @return {string} string in pem format + * If passphrase is used to protect the .pem content (recommend) + */ +export function readPrivateKey( + keyString: string | Buffer, + passphrase: string | undefined, + isOutputString?: boolean +) { + return isString(passphrase) + ? this.convertToString( + pki.privateKeyToPem( + pki.decryptRsaPrivateKey(String(keyString), passphrase) + ), + isOutputString + ) + : keyString; } + /** -* @desc Inline syntax sugar -*/ + * @desc Inline syntax sugar + */ function convertToString(input, isOutputString) { return Boolean(isOutputString) ? String(input) : input; } + /** * @desc Check if the input is an array with non-zero size */ @@ -201,7 +245,9 @@ export function isNonEmptyArray(a) { return Array.isArray(a) && a.length > 0; } -export function notEmpty(value: TValue | null | undefined): value is TValue { +export function notEmpty( + value: TValue | null | undefined +): value is TValue { return value !== null && value !== undefined; } diff --git a/src/validator.ts b/src/validator.ts index c82f86c8..1e6c9cd4 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -6,13 +6,14 @@ function verifyTime( utcNotOnOrAfter: string | undefined, drift: DriftTolerance = [0, 0] ): boolean { - const now = new Date(); if (!utcNotBefore && !utcNotOnOrAfter) { // show warning because user intends to have time check but the document doesn't include corresponding information - console.warn('You intend to have time validation however the document doesn\'t include the valid range.'); - return true; + console.warn( + "You intend to have time validation however the document doesn't include the valid range." + ); + return true; } let notBeforeLocal: Date | null = null; @@ -36,9 +37,6 @@ function verifyTime( +notBeforeLocal + notBeforeDrift <= +now && +now < +notOnOrAfterLocal + notOnOrAfterDrift ); - } -export { - verifyTime -}; \ No newline at end of file +export { verifyTime }; diff --git a/test/README.md b/test/README.md index d848ee75..2a9ebd24 100644 --- a/test/README.md +++ b/test/README.md @@ -2,50 +2,59 @@ ```javascript // playground setup for extractor -var samlify = require('./build/index'); -var fs = require('fs'); +var samlify = require("./build/index"); +var fs = require("fs"); var idpconfig = { - privateKey: fs.readFileSync('./test/key/idp/privkey.pem'), - privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW', - isAssertionEncrypted: false, - metadata: fs.readFileSync('./test/misc/idpmeta_rollingcert.xml') + privateKey: fs.readFileSync("./test/key/idp/privkey.pem"), + privateKeyPass: "q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW", + isAssertionEncrypted: false, + metadata: fs.readFileSync("./test/misc/idpmeta_rollingcert.xml"), }; var idp = samlify.IdentityProvider(idpconfig); samlify.Extractor.extract(idp.entityMeta.xmlString, [ - { - key: 'certificate', - localPath: ['EntityDescriptor', '~SSODescriptor', 'KeyDescriptor'], - index: ['use'], - attributePath: ['KeyInfo', 'X509Data', 'X509Certificate'], - attributes: [] - } -]) + { + key: "certificate", + localPath: ["EntityDescriptor", "~SSODescriptor", "KeyDescriptor"], + index: ["use"], + attributePath: ["KeyInfo", "X509Data", "X509Certificate"], + attributes: [], + }, +]); // construct response signature const { - IdPMetadata: idpMetadata, - Utility: utility, - SamlLib: libsaml, -} = require('./'); -const fs = require('fs'); -const metadata = idpMetadata(fs.readFileSync('./test/misc/idpmeta_rollingcert.xml')); -const _idpKeyFolder = './test/key/idp/'; -const _idpPrivPem1 = String(fs.readFileSync(_idpKeyFolder + 'privkey.pem')); -const _idpPrivPem2 = String(fs.readFileSync(_idpKeyFolder + 'privkey2.pem')); + IdPMetadata: idpMetadata, + Utility: utility, + SamlLib: libsaml, +} = require("./"); +const fs = require("fs"); +const metadata = idpMetadata( + fs.readFileSync("./test/misc/idpmeta_rollingcert.xml") +); +const _idpKeyFolder = "./test/key/idp/"; +const _idpPrivPem1 = String(fs.readFileSync(_idpKeyFolder + "privkey.pem")); +const _idpPrivPem2 = String(fs.readFileSync(_idpKeyFolder + "privkey2.pem")); function writer(str) { - fs.writeFileSync('nogit.xml', str); + fs.writeFileSync("nogit.xml", str); } -writer(utility.base64Decode(libsaml.constructSAMLSignature({ - rawSamlMessage: String(fs.readFileSync('./test/misc/response.xml')), - referenceTagXPath: libsaml.createXPath('Issuer'), - signingCert: metadata.getX509Certificate('signing')[0], - privateKey: _idpPrivPem1, - privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW', - signatureAlgorithm: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256', - signatureConfig: { - prefix: 'ds', - location: { reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", action: 'after' }, - }, -}))); -``` \ No newline at end of file +writer( + utility.base64Decode( + libsaml.constructSAMLSignature({ + rawSamlMessage: String(fs.readFileSync("./test/misc/response.xml")), + referenceTagXPath: libsaml.createXPath("Issuer"), + signingCert: metadata.getX509Certificate("signing")[0], + privateKey: _idpPrivPem1, + privateKeyPass: "q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW", + signatureAlgorithm: "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", + signatureConfig: { + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, + }, + }) + ) +); +``` diff --git a/test/extractor.ts b/test/extractor.ts index 08584ffd..6c264a4b 100644 --- a/test/extractor.ts +++ b/test/extractor.ts @@ -1,130 +1,152 @@ // This test file includes all the units related to the extractor -import test from 'ava'; -import { readFileSync } from 'fs'; -import { extract } from '../src/extractor'; +import test, { ExecutionContext } from "ava"; +import { readFileSync } from "fs"; +import { extract } from "../src/extractor"; -const _decodedResponse: string = String(readFileSync('./test/misc/response_signed.xml')); -const _spmeta: string = String(readFileSync('./test/misc/spmeta.xml')); +const _decodedResponse: string = String( + readFileSync("./test/misc/response_signed.xml") +); +const _spmeta: string = String(readFileSync("./test/misc/spmeta.xml")); (() => { - - test('fetch multiple attributes', t => { + test("fetch multiple attributes", (t: ExecutionContext) => { const result = extract(_decodedResponse, [ { - key: 'response', - localPath: ['Response'], - attributes: ['ID', 'Destination'] - } + key: "response", + localPath: ["Response"], + attributes: ["ID", "Destination"], + }, ]); - t.is(result.response.id, '_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6'); - t.is(result.response.destination, 'http://sp.example.com/demo1/index.php?acs'); + t.is(result.response.id, "_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6"); + t.is( + result.response.destination, + "http://sp.example.com/demo1/index.php?acs" + ); }); - test('fetch single attributes', t => { - const result = extract(_decodedResponse, [ + test("fetch single attributes", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'statusCode', - localPath: ['Response', 'Status', 'StatusCode'], - attributes: ['Value'], - } + key: "statusCode", + localPath: ["Response", "Status", "StatusCode"], + attributes: ["Value"], + }, ]); - t.is(result.statusCode, 'urn:oasis:names:tc:SAML:2.0:status:Success'); + t.is(result.statusCode, "urn:oasis:names:tc:SAML:2.0:status:Success"); }); - test('fetch the inner context of leaf node', t => { - const result = extract(_decodedResponse, [ + test("fetch the inner context of leaf node", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'audience', - localPath: ['Response', 'Assertion', 'Conditions', 'AudienceRestriction', 'Audience'], - attributes: [] - } + key: "audience", + localPath: [ + "Response", + "Assertion", + "Conditions", + "AudienceRestriction", + "Audience", + ], + attributes: [], + }, ]); - t.is(result.audience, 'https://sp.example.com/metadata'); + t.is(result.audience, "https://sp.example.com/metadata"); }); - test('fetch the entire context of a non-existing node ', t => { - const result = extract(_decodedResponse, [ + test("fetch the entire context of a non-existing node ", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'assertionSignature', - localPath: ['Response', 'Assertion', 'Signature'], + key: "assertionSignature", + localPath: ["Response", "Assertion", "Signature"], attributes: [], - context: true - } + context: true, + }, ]); t.is(result.assertionSignature, null); }); - test('fetch the entire context of an existed node', t => { - const result = extract(_decodedResponse, [ + test("fetch the entire context of an existed node", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'messageSignature', - localPath: ['Response', 'Signature'], + key: "messageSignature", + localPath: ["Response", "Signature"], attributes: [], - context: true - } + context: true, + }, ]); t.not(result.messageSignature, null); }); - test('fetch the unique inner context of multiple nodes', t => { - const result = extract(_decodedResponse, [ + test("fetch the unique inner context of multiple nodes", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'issuer', + key: "issuer", localPath: [ - ['Response', 'Issuer'], - ['Response', 'Assertion', 'Issuer'] + ["Response", "Issuer"], + ["Response", "Assertion", "Issuer"], ], - attributes: [] - } + attributes: [], + }, ]); t.is(result.issuer.length, 1); - t.is(result.issuer.every(i => i === 'https://idp.example.com/metadata'), true); + t.is( + result.issuer.every((i) => i === "https://idp.example.com/metadata"), + true + ); }); - test('fetch the attribute with wildcard local path', t => { - const result = extract(_spmeta, [ + test("fetch the attribute with wildcard local path", (t: ExecutionContext) => { + const result = extract(_spmeta, [ { - key: 'certificate', - localPath: ['EntityDescriptor', '~SSODescriptor', 'KeyDescriptor'], - index: ['use'], - attributePath: ['KeyInfo', 'X509Data', 'X509Certificate'], - attributes: [] - } + key: "certificate", + localPath: ["EntityDescriptor", "~SSODescriptor", "KeyDescriptor"], + index: ["use"], + attributePath: ["KeyInfo", "X509Data", "X509Certificate"], + attributes: [], + }, ]); t.not(result.certificate.signing, null); t.not(result.certificate.encryption, null); }); - test('fetch the attribute with non-wildcard local path', t => { - const result = extract(_decodedResponse, [ + test("fetch the attribute with non-wildcard local path", (t: ExecutionContext) => { + const result = extract(_decodedResponse, [ { - key: 'attributes', - localPath: ['Response', 'Assertion', 'AttributeStatement', 'Attribute'], - index: ['Name'], - attributePath: ['AttributeValue'], - attributes: [] - } + key: "attributes", + localPath: ["Response", "Assertion", "AttributeStatement", "Attribute"], + index: ["Name"], + attributePath: ["AttributeValue"], + attributes: [], + }, ]); - t.is(result.attributes.uid, 'test'); - t.is(result.attributes.mail, 'test@example.com'); + t.is(result.attributes.uid, "test"); + t.is(result.attributes.mail, "test@example.com"); t.is(result.attributes.eduPersonAffiliation.length, 2); }); - test('fetch with one attribute as key, another as value', t => { - const result = extract(_spmeta, [ + test("fetch with one attribute as key, another as value", (t: ExecutionContext) => { + const result = extract(_spmeta, [ { - key: 'singleSignOnService', - localPath: ['EntityDescriptor', '~SSODescriptor', 'AssertionConsumerService'], - index: ['Binding'], + key: "singleSignOnService", + localPath: [ + "EntityDescriptor", + "~SSODescriptor", + "AssertionConsumerService", + ], + index: ["Binding"], attributePath: [], - attributes: ['Location'] - } + attributes: ["Location"], + }, ]); - const postEndpoint = result.singleSignOnService['urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']; - const artifactEndpoint = result.singleSignOnService['urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']; + const postEndpoint = + result.singleSignOnService[ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" + ]; + const artifactEndpoint = + result.singleSignOnService[ + "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" + ]; - t.is(postEndpoint, 'https://sp.example.org/sp/sso'); - t.is(artifactEndpoint, 'https://sp.example.org/sp/sso'); + t.is(postEndpoint, "https://sp.example.org/sp/sso"); + t.is(artifactEndpoint, "https://sp.example.org/sp/sso"); }); - })(); diff --git a/test/flow.ts b/test/flow.ts index 70cfc55b..7287c14a 100644 --- a/test/flow.ts +++ b/test/flow.ts @@ -1,13 +1,13 @@ -import esaml2 = require('../index'); -import { readFileSync, writeFileSync } from 'fs'; -import test from 'ava'; -import { PostBindingContext } from '../src/entity'; -import * as uuid from 'uuid'; -import * as url from 'url'; -import util from '../src/utility'; -import * as tk from 'timekeeper'; - -import * as validator from '@authenio/samlify-xsd-schema-validator'; +import esaml2 = require("../index"); +import { readFileSync, writeFileSync } from "fs"; +import test, { ExecutionContext } from "ava"; +import { PostBindingContext } from "../src/entity"; +import { v4 as uuidv4 } from "uuid"; +import * as url from "url"; +import util from "../src/utility"; +import * as tk from "timekeeper"; + +import * as validator from "@authenio/samlify-xsd-schema-validator"; // import * as validator from '@authenio/samlify-validate-with-xmllint'; // import * as validator from '@authenio/samlify-node-xmllint'; // import * as validator from '@authenio/samlify-libxml-xsd'; @@ -33,17 +33,30 @@ const binding = ref.namespace.binding; // Custom template const loginResponseTemplate = { - context: '{Issuer}{Issuer}{NameID}{Audience}{AttributeStatement}', + context: + '{Issuer}{Issuer}{NameID}{Audience}{AttributeStatement}', attributes: [ - { name: 'mail', valueTag: 'user.email', nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', valueXsiType: 'xs:string' }, - { name: 'name', valueTag: 'user.name', nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', valueXsiType: 'xs:string' }, + { + name: "mail", + valueTag: "user.email", + nameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", + valueXsiType: "xs:string", + }, + { + name: "name", + valueTag: "user.name", + nameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", + valueXsiType: "xs:string", + }, ], }; -const failedResponse: string = String(readFileSync('./test/misc/failed_response.xml')); +const failedResponse: string = String( + readFileSync("./test/misc/failed_response.xml") +); -const createTemplateCallback = (_idp, _sp, user) => template => { - const _id = '_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6'; +const createTemplateCallback = (_idp, _sp, user) => (template) => { + const _id = "_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6"; const now = new Date(); const spEntityID = _sp.entityMeta.getEntityID(); const idpSetting = _idp.entitySetting; @@ -51,23 +64,27 @@ const createTemplateCallback = (_idp, _sp, user) => template => { fiveMinutesLater.setMinutes(fiveMinutesLater.getMinutes() + 5); const tvalue = { ID: _id, - AssertionID: idpSetting.generateID ? idpSetting.generateID() : `${uuid.v4()}`, + AssertionID: idpSetting.generateID + ? idpSetting.generateID() + : `${uuidv4()}`, Destination: _sp.entityMeta.getAssertionConsumerService(binding.post), Audience: spEntityID, SubjectRecipient: spEntityID, - NameIDFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress', + NameIDFormat: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", NameID: user.email, Issuer: idp.entityMeta.getEntityID(), IssueInstant: now.toISOString(), ConditionsNotBefore: now.toISOString(), ConditionsNotOnOrAfter: fiveMinutesLater.toISOString(), SubjectConfirmationDataNotOnOrAfter: fiveMinutesLater.toISOString(), - AssertionConsumerServiceURL: _sp.entityMeta.getAssertionConsumerService(binding.post), + AssertionConsumerServiceURL: _sp.entityMeta.getAssertionConsumerService( + binding.post + ), EntityID: spEntityID, - InResponseTo: '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4', - StatusCode: 'urn:oasis:names:tc:SAML:2.0:status:Success', - attrUserEmail: 'myemailassociatedwithsp@sp.com', - attrUserName: 'mynameinsp', + InResponseTo: "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4", + StatusCode: "urn:oasis:names:tc:SAML:2.0:status:Success", + attrUserEmail: "myemailassociatedwithsp@sp.com", + attrUserName: "mynameinsp", }; return { id: _id, @@ -78,646 +95,1092 @@ const createTemplateCallback = (_idp, _sp, user) => template => { // Define of metadata const defaultIdpConfig = { - privateKey: readFileSync('./test/key/idp/privkey.pem'), - privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW', + privateKey: readFileSync("./test/key/idp/privkey.pem"), + privateKeyPass: "q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW", isAssertionEncrypted: true, - encPrivateKey: readFileSync('./test/key/idp/encryptKey.pem'), - encPrivateKeyPass: 'g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN', - metadata: readFileSync('./test/misc/idpmeta.xml'), + encPrivateKey: readFileSync("./test/key/idp/encryptKey.pem"), + encPrivateKeyPass: "g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN", + metadata: readFileSync("./test/misc/idpmeta.xml"), }; const oneloginIdpConfig = { - privateKey: readFileSync('./test/key/idp/privkey.pem'), - privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW', + privateKey: readFileSync("./test/key/idp/privkey.pem"), + privateKeyPass: "q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW", isAssertionEncrypted: true, - encPrivateKey: readFileSync('./test/key/idp/encryptKey.pem'), - encPrivateKeyPass: 'g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN', - metadata: readFileSync('./test/misc/idpmeta_onelogoutservice.xml'), + encPrivateKey: readFileSync("./test/key/idp/encryptKey.pem"), + encPrivateKeyPass: "g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN", + metadata: readFileSync("./test/misc/idpmeta_onelogoutservice.xml"), }; const defaultSpConfig = { - privateKey: readFileSync('./test/key/sp/privkey.pem'), - privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px', + privateKey: readFileSync("./test/key/sp/privkey.pem"), + privateKeyPass: "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px", isAssertionEncrypted: true, // for logout purpose - encPrivateKey: readFileSync('./test/key/sp/encryptKey.pem'), - encPrivateKeyPass: 'BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU', - metadata: readFileSync('./test/misc/spmeta.xml'), + encPrivateKey: readFileSync("./test/key/sp/encryptKey.pem"), + encPrivateKeyPass: "BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU", + metadata: readFileSync("./test/misc/spmeta.xml"), }; -const noSignedIdpMetadata = readFileSync('./test/misc/idpmeta_nosign.xml').toString().trim(); -const spmetaNoAssertSign = readFileSync('./test/misc/spmeta_noassertsign.xml').toString().trim(); +const noSignedIdpMetadata = readFileSync("./test/misc/idpmeta_nosign.xml") + .toString() + .trim(); +const spmetaNoAssertSign = readFileSync("./test/misc/spmeta_noassertsign.xml") + .toString() + .trim(); -const sampleRequestInfo = { extract: { request: { id: 'request_id' } } }; +const sampleRequestInfo = { extract: { request: { id: "request_id" } } }; // Define entities const idp = identityProvider(defaultIdpConfig); const sp = serviceProvider(defaultSpConfig); -const idpNoEncrypt = identityProvider({ ...defaultIdpConfig, isAssertionEncrypted: false }); -const idpcustomNoEncrypt = identityProvider({ ...defaultIdpConfig, isAssertionEncrypted: false, loginResponseTemplate }); -const idpcustom = identityProvider({ ...defaultIdpConfig, loginResponseTemplate }); -const idpEncryptThenSign = identityProvider({ ...defaultIdpConfig, messageSigningOrder: 'encrypt-then-sign' }); -const spWantLogoutReqSign = serviceProvider({ ...defaultSpConfig, wantLogoutRequestSigned: true }); -const idpWantLogoutResSign = identityProvider({ ...defaultIdpConfig, wantLogoutResponseSigned: true }); -const spNoAssertSign = serviceProvider({ ...defaultSpConfig, metadata: spmetaNoAssertSign }); -const spNoAssertSignCustomConfig = serviceProvider({ ...defaultSpConfig, +const idpNoEncrypt = identityProvider({ + ...defaultIdpConfig, + isAssertionEncrypted: false, +}); +const idpcustomNoEncrypt = identityProvider({ + ...defaultIdpConfig, + isAssertionEncrypted: false, + loginResponseTemplate, +}); +const idpcustom = identityProvider({ + ...defaultIdpConfig, + loginResponseTemplate, +}); +const idpEncryptThenSign = identityProvider({ + ...defaultIdpConfig, + messageSigningOrder: "encrypt-then-sign", +}); +const spWantLogoutReqSign = serviceProvider({ + ...defaultSpConfig, + wantLogoutRequestSigned: true, +}); +const idpWantLogoutResSign = identityProvider({ + ...defaultIdpConfig, + wantLogoutResponseSigned: true, +}); +const spNoAssertSign = serviceProvider({ + ...defaultSpConfig, + metadata: spmetaNoAssertSign, +}); +const spNoAssertSignCustomConfig = serviceProvider({ + ...defaultSpConfig, metadata: spmetaNoAssertSign, signatureConfig: { - prefix: 'ds', - location: { reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", action: 'after' }, + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, }, }); -const spWithClockDrift = serviceProvider({ ...defaultSpConfig, clockDrifts: [-2000, 2000] }); +const spWithClockDrift = serviceProvider({ + ...defaultSpConfig, + clockDrifts: [-2000, 2000], +}); function writer(str) { - writeFileSync('test.txt', str); + writeFileSync("test.txt", str); } -test('create login request with redirect binding using default template and parse it', async t => { - const { id, context } = sp.createLoginRequest(idp, 'redirect'); - t.is(typeof id, 'string'); - t.is(typeof context, 'string'); +test("create login request with redirect binding using default template and parse it", async (t: ExecutionContext) => { + const { id, context } = sp.createLoginRequest(idp, "redirect"); + t.is(typeof id, "string"); + t.is(typeof context, "string"); const originalURL = url.parse(context, true); const SAMLRequest = originalURL.query.SAMLRequest; const Signature = originalURL.query.Signature; const SigAlg = originalURL.query.SigAlg; delete originalURL.query.Signature; - const octetString = Object.keys(originalURL.query).map(q => q + '=' + encodeURIComponent(originalURL.query[q] as string)).join('&'); - const { samlContent, extract } = await idp.parseLoginRequest(sp, 'redirect', { query: { SAMLRequest, Signature, SigAlg }, octetString}); - t.is(extract.issuer, 'https://sp.example.org/metadata'); - t.is(typeof extract.request.id, 'string'); - t.is(extract.nameIDPolicy.format, 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'); - t.is(extract.nameIDPolicy.allowCreate, 'false'); -}); - -test('create login request with post binding using default template and parse it', async t => { - const { relayState, type, entityEndpoint, id, context: SAMLRequest } = sp.createLoginRequest(idp, 'post') as PostBindingContext; - t.is(typeof id, 'string'); - t.is(typeof SAMLRequest, 'string'); - t.is(typeof entityEndpoint, 'string'); - t.is(type, 'SAMLRequest'); - const { extract } = await idp.parseLoginRequest(sp, 'post', { body: { SAMLRequest }}); - t.is(extract.issuer, 'https://sp.example.org/metadata'); - t.is(typeof extract.request.id, 'string'); - t.is(extract.nameIDPolicy.format, 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'); - t.is(extract.nameIDPolicy.allowCreate, 'false'); - t.is(typeof extract.signature, 'string'); -}); - -test('signed in sp is not matched with the signed notation in idp with post request', t => { - const _idp = identityProvider({ ...defaultIdpConfig, metadata: noSignedIdpMetadata }); + const octetString = Object.keys(originalURL.query) + .map((q) => q + "=" + encodeURIComponent(originalURL.query[q] as string)) + .join("&"); + const { samlContent, extract } = await idp.parseLoginRequest(sp, "redirect", { + query: { SAMLRequest, Signature, SigAlg }, + octetString, + }); + t.is(extract.issuer, "https://sp.example.org/metadata"); + t.is(typeof extract.request.id, "string"); + t.is( + extract.nameIDPolicy.format, + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" + ); + t.is(extract.nameIDPolicy.allowCreate, "false"); +}); + +test("create login request with post binding using default template and parse it", async (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context: SAMLRequest, + } = sp.createLoginRequest(idp, "post") as PostBindingContext; + t.is(typeof id, "string"); + t.is(typeof SAMLRequest, "string"); + t.is(typeof entityEndpoint, "string"); + t.is(type, "SAMLRequest"); + const { extract } = await idp.parseLoginRequest(sp, "post", { + body: { SAMLRequest }, + }); + t.is(extract.issuer, "https://sp.example.org/metadata"); + t.is(typeof extract.request.id, "string"); + t.is( + extract.nameIDPolicy.format, + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" + ); + t.is(extract.nameIDPolicy.allowCreate, "false"); + t.is(typeof extract.signature, "string"); +}); + +test("signed in sp is not matched with the signed notation in idp with post request", (t: ExecutionContext) => { + const _idp = identityProvider({ + ...defaultIdpConfig, + metadata: noSignedIdpMetadata, + }); try { - const { id, context } = sp.createLoginRequest(_idp, 'post'); + const { id, context } = sp.createLoginRequest(_idp, "post"); t.fail(); } catch (e) { - t.is(e.message, 'ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG'); + t.is(e.message, "ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG"); } }); -test('signed in sp is not matched with the signed notation in idp with redirect request', t => { - const _idp = identityProvider({ ...defaultIdpConfig, metadata: noSignedIdpMetadata }); +test("signed in sp is not matched with the signed notation in idp with redirect request", (t: ExecutionContext) => { + const _idp = identityProvider({ + ...defaultIdpConfig, + metadata: noSignedIdpMetadata, + }); try { - const { id, context } = sp.createLoginRequest(_idp, 'redirect'); + const { id, context } = sp.createLoginRequest(_idp, "redirect"); t.fail(); } catch (e) { - t.is(e.message, 'ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG'); + t.is(e.message, "ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG"); } }); -test('create login request with redirect binding using [custom template]', t => { +test("create login request with redirect binding using [custom template]", (t: ExecutionContext) => { const _sp = serviceProvider({ - ...defaultSpConfig, loginRequestTemplate: { - context: '{Issuer}', + ...defaultSpConfig, + loginRequestTemplate: { + context: + '{Issuer}', }, }); - const { id, context } = _sp.createLoginRequest(idp, 'redirect', template => { - return { - id: 'exposed_testing_id', - context: template, // all the tags are supposed to be replaced - }; - }); - (id === 'exposed_testing_id' && isString(context)) ? t.pass() : t.fail(); + const { id, context } = _sp.createLoginRequest( + idp, + "redirect", + (template) => { + return { + id: "exposed_testing_id", + context: template, // all the tags are supposed to be replaced + }; + } + ); + id === "exposed_testing_id" && isString(context) ? t.pass() : t.fail(); }); -test('create login request with post binding using [custom template]', t => { +test("create login request with post binding using [custom template]", (t: ExecutionContext) => { const _sp = serviceProvider({ - ...defaultSpConfig, loginRequestTemplate: { - context: '{Issuer}', + ...defaultSpConfig, + loginRequestTemplate: { + context: + '{Issuer}', }, }); - const { id, context, entityEndpoint, type, relayState } = _sp.createLoginRequest(idp, 'post', template => { + const { + id, + context, + entityEndpoint, + type, + relayState, + } = _sp.createLoginRequest(idp, "post", (template) => { return { - id: 'exposed_testing_id', + id: "exposed_testing_id", context: template, // all the tags are supposed to be replaced }; }) as PostBindingContext; - id === 'exposed_testing_id' && - isString(context) && - isString(relayState) && - isString(entityEndpoint) && - type === 'SAMLRequest' - ? t.pass() : t.fail(); + id === "exposed_testing_id" && + isString(context) && + isString(relayState) && + isString(entityEndpoint) && + type === "SAMLRequest" + ? t.pass() + : t.fail(); }); -test('create login response with undefined binding', async t => { - const user = { email: 'user@esaml2.com' }; - const error = await t.throwsAsync(() => idp.createLoginResponse(sp, {}, 'undefined', user, createTemplateCallback(idp, sp, user))); - t.is(error.message, 'ERR_CREATE_RESPONSE_UNDEFINED_BINDING'); +test("create login response with undefined binding", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; + const error = await t.throwsAsync(() => + idp.createLoginResponse( + sp, + {}, + "undefined", + user, + createTemplateCallback(idp, sp, user) + ) + ); + t.is(error.message, "ERR_CREATE_RESPONSE_UNDEFINED_BINDING"); }); -test('create post login response', async t => { - const user = { email: 'user@esaml2.com' }; - const { id, context } = await idp.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idp, sp, user)); +test("create post login response", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; + const { id, context } = await idp.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, sp, user) + ); isString(id) && isString(context) ? t.pass() : t.fail(); }); -test('create logout request with redirect binding', t => { - const { id, context } = sp.createLogoutRequest(idp, 'redirect', { logoutNameID: 'user@esaml2' }); +test("create logout request with redirect binding", (t: ExecutionContext) => { + const { id, context } = sp.createLogoutRequest(idp, "redirect", { + logoutNameID: "user@esaml2", + }); isString(id) && isString(context) ? t.pass() : t.fail(); }); -test('create logout request with post binding', t => { - const { relayState, type, entityEndpoint, id, context } = sp.createLogoutRequest(idp, 'post', { logoutNameID: 'user@esaml2' }) as PostBindingContext; - isString(id) && isString(context) && isString(entityEndpoint) && type === 'SAMLRequest' ? t.pass() : t.fail(); +test("create logout request with post binding", (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context, + } = sp.createLogoutRequest(idp, "post", { + logoutNameID: "user@esaml2", + }) as PostBindingContext; + isString(id) && + isString(context) && + isString(entityEndpoint) && + type === "SAMLRequest" + ? t.pass() + : t.fail(); }); -test('create logout request when idp only has one binding', t => { +test("create logout request when idp only has one binding", (t: ExecutionContext) => { const testIdp = identityProvider(oneloginIdpConfig); - const { id, context } = sp.createLogoutRequest(testIdp, 'redirect', { logoutNameID: 'user@esaml2' }); + const { id, context } = sp.createLogoutRequest(testIdp, "redirect", { + logoutNameID: "user@esaml2", + }); isString(id) && isString(context) ? t.pass() : t.fail(); }); -test('create logout response with undefined binding', t => { +test("create logout response with undefined binding", (t: ExecutionContext) => { try { - const { id, context } = idp.createLogoutResponse(sp, {}, 'undefined', '', createTemplateCallback(idp, sp, {})); + const { id, context } = idp.createLogoutResponse( + sp, + {}, + "undefined", + "", + createTemplateCallback(idp, sp, {}) + ); t.fail(); } catch (e) { - t.is(e.message, 'ERR_CREATE_LOGOUT_RESPONSE_UNDEFINED_BINDING'); + t.is(e.message, "ERR_CREATE_LOGOUT_RESPONSE_UNDEFINED_BINDING"); } }); -test('create logout response with redirect binding', t => { - const { id, context } = idp.createLogoutResponse(sp, {}, 'redirect', '', createTemplateCallback(idp, sp, {})); +test("create logout response with redirect binding", (t: ExecutionContext) => { + const { id, context } = idp.createLogoutResponse( + sp, + {}, + "redirect", + "", + createTemplateCallback(idp, sp, {}) + ); isString(id) && isString(context) ? t.pass() : t.fail(); }); -test('create logout response with post binding', t => { - const { relayState, type, entityEndpoint, id, context } = idp.createLogoutResponse(sp, {}, 'post', '', createTemplateCallback(idp, sp, {})) as PostBindingContext; - isString(id) && isString(context) && isString(entityEndpoint) && type === 'SAMLResponse' ? t.pass() : t.fail(); +test("create logout response with post binding", (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context, + } = idp.createLogoutResponse( + sp, + {}, + "post", + "", + createTemplateCallback(idp, sp, {}) + ) as PostBindingContext; + isString(id) && + isString(context) && + isString(entityEndpoint) && + type === "SAMLResponse" + ? t.pass() + : t.fail(); }); // Check if the response data parsing is correct // All test cases are using customize template // simulate idp-initiated sso -test('send response with signed assertion and parse it', async t => { +test("send response with signed assertion and parse it", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, sp, user)); + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, sp, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await sp.parseLoginResponse( + idpNoEncrypt, + "post", + { body: { SAMLResponse } } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send response with signed assertion + custom transformation algorithms and parse it', async t => { +test("send response with signed assertion + custom transformation algorithms and parse it", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const signedAssertionSp = serviceProvider( - { - ...defaultSpConfig, - transformationAlgorithms: [ - 'http://www.w3.org/2000/09/xmldsig#enveloped-signature', - 'http://www.w3.org/2001/10/xml-exc-c14n#' - ] - } - ); + const signedAssertionSp = serviceProvider({ + ...defaultSpConfig, + transformationAlgorithms: [ + "http://www.w3.org/2000/09/xmldsig#enveloped-signature", + "http://www.w3.org/2001/10/xml-exc-c14n#", + ], + }); - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(signedAssertionSp, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, sp, user)); + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + signedAssertionSp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, sp, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await sp.parseLoginResponse( + idpNoEncrypt, + "post", + { body: { SAMLResponse } } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); // Verify xmldsig#enveloped-signature is included in the response - if (samlContent.indexOf('http://www.w3.org/2000/09/xmldsig#enveloped-signature') === -1) { + if ( + samlContent.indexOf( + "http://www.w3.org/2000/09/xmldsig#enveloped-signature" + ) === -1 + ) { t.fail(); } }); -test('send response with [custom template] signed assertion and parse it', async t => { +test("send response with [custom template] signed assertion and parse it", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const requestInfo = { extract: { request: { id: 'request_id' } } }; - const user = { email: 'user@esaml2.com'}; - const { id, context: SAMLResponse } = await idpcustomNoEncrypt.createLoginResponse( + const requestInfo = { extract: { request: { id: "request_id" } } }; + const user = { email: "user@esaml2.com" }; + const { + id, + context: SAMLResponse, + } = await idpcustomNoEncrypt.createLoginResponse( sp, requestInfo, - 'post', + "post", user, // declare the callback to do custom template replacement - createTemplateCallback(idpcustomNoEncrypt, sp, user), + createTemplateCallback(idpcustomNoEncrypt, sp, user) ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await sp.parseLoginResponse(idpcustomNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.attributes.name, 'mynameinsp'); - t.is(extract.attributes.mail, 'myemailassociatedwithsp@sp.com'); - t.is(extract.response.inResponseTo, '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4'); + const { samlContent, extract } = await sp.parseLoginResponse( + idpcustomNoEncrypt, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.attributes.name, "mynameinsp"); + t.is(extract.attributes.mail, "myemailassociatedwithsp@sp.com"); + t.is( + extract.response.inResponseTo, + "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4" + ); }); -test('send response with signed message and parse it', async t => { +test("send response with signed message and parse it", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(spNoAssertSign, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, spNoAssertSign, user)); + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + spNoAssertSign, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, spNoAssertSign, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spNoAssertSign.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await spNoAssertSign.parseLoginResponse( + idpNoEncrypt, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send response with [custom template] and signed message and parse it', async t => { +test("send response with [custom template] and signed message and parse it", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const requestInfo = { extract: { authnrequest: { id: 'request_id' } } }; - const user = { email: 'user@esaml2.com'}; - const { id, context: SAMLResponse } = await idpcustomNoEncrypt.createLoginResponse( + const requestInfo = { extract: { authnrequest: { id: "request_id" } } }; + const user = { email: "user@esaml2.com" }; + const { + id, + context: SAMLResponse, + } = await idpcustomNoEncrypt.createLoginResponse( spNoAssertSign, - { extract: { authnrequest: { id: 'request_id' } } }, 'post', - { email: 'user@esaml2.com' }, - createTemplateCallback(idpcustomNoEncrypt, spNoAssertSign, user), + { extract: { authnrequest: { id: "request_id" } } }, + "post", + { email: "user@esaml2.com" }, + createTemplateCallback(idpcustomNoEncrypt, spNoAssertSign, user) ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spNoAssertSign.parseLoginResponse(idpcustomNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.attributes.name, 'mynameinsp'); - t.is(extract.attributes.mail, 'myemailassociatedwithsp@sp.com'); - t.is(extract.response.inResponseTo, '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4'); + const { samlContent, extract } = await spNoAssertSign.parseLoginResponse( + idpcustomNoEncrypt, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.attributes.name, "mynameinsp"); + t.is(extract.attributes.mail, "myemailassociatedwithsp@sp.com"); + t.is( + extract.response.inResponseTo, + "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4" + ); }); -test('send login response with signed assertion + signed message and parse it', async t => { +test("send login response with signed assertion + signed message and parse it", async (t: ExecutionContext) => { const spWantMessageSign = serviceProvider({ ...defaultSpConfig, wantMessageSigned: true, }); - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(spWantMessageSign, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, spWantMessageSign, user)); + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + spWantMessageSign, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, spWantMessageSign, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spWantMessageSign.parseLoginResponse (idpNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await spWantMessageSign.parseLoginResponse( + idpNoEncrypt, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send login response with [custom template] and signed assertion + signed message and parse it', async t => { +test("send login response with [custom template] and signed assertion + signed message and parse it", async (t: ExecutionContext) => { const spWantMessageSign = serviceProvider({ ...defaultSpConfig, wantMessageSigned: true, }); - const user = { email: 'user@esaml2.com'}; - const { id, context: SAMLResponse } = await idpcustomNoEncrypt.createLoginResponse( + const user = { email: "user@esaml2.com" }; + const { + id, + context: SAMLResponse, + } = await idpcustomNoEncrypt.createLoginResponse( spWantMessageSign, - { extract: { authnrequest: { id: 'request_id' } } }, 'post', - { email: 'user@esaml2.com' }, - createTemplateCallback(idpcustomNoEncrypt, spWantMessageSign, user), + { extract: { authnrequest: { id: "request_id" } } }, + "post", + { email: "user@esaml2.com" }, + createTemplateCallback(idpcustomNoEncrypt, spWantMessageSign, user) ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spWantMessageSign.parseLoginResponse(idpcustomNoEncrypt, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.attributes.name, 'mynameinsp'); - t.is(extract.attributes.mail, 'myemailassociatedwithsp@sp.com'); - t.is(extract.response.inResponseTo, '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4'); -}); - -test('send login response with encrypted non-signed assertion and parse it', async t => { - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idp.createLoginResponse(spNoAssertSign, sampleRequestInfo, 'post', user, createTemplateCallback(idp, spNoAssertSign, user)); + const { samlContent, extract } = await spWantMessageSign.parseLoginResponse( + idpcustomNoEncrypt, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.attributes.name, "mynameinsp"); + t.is(extract.attributes.mail, "myemailassociatedwithsp@sp.com"); + t.is( + extract.response.inResponseTo, + "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4" + ); +}); + +test("send login response with encrypted non-signed assertion and parse it", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idp.createLoginResponse( + spNoAssertSign, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, spNoAssertSign, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spNoAssertSign.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await spNoAssertSign.parseLoginResponse( + idp, + "post", + { body: { SAMLResponse } } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send login response with encrypted signed assertion and parse it', async t => { - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idp.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idp, sp, user)); +test("send login response with encrypted signed assertion and parse it", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idp.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, sp, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await sp.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + const { samlContent, extract } = await sp.parseLoginResponse(idp, "post", { + body: { SAMLResponse }, + }); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send login response with [custom template] and encrypted signed assertion and parse it', async t => { - const user = { email: 'user@esaml2.com'}; +test("send login response with [custom template] and encrypted signed assertion and parse it", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; const { id, context: SAMLResponse } = await idpcustom.createLoginResponse( sp, - { extract: { request: { id: 'request_id' } } }, 'post', - { email: 'user@esaml2.com' }, - createTemplateCallback(idpcustom, sp, user), + { extract: { request: { id: "request_id" } } }, + "post", + { email: "user@esaml2.com" }, + createTemplateCallback(idpcustom, sp, user) ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await sp.parseLoginResponse(idpcustom, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.attributes.name, 'mynameinsp'); - t.is(extract.attributes.mail, 'myemailassociatedwithsp@sp.com'); - t.is(extract.response.inResponseTo, '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4'); + const { samlContent, extract } = await sp.parseLoginResponse( + idpcustom, + "post", + { body: { SAMLResponse } } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.attributes.name, "mynameinsp"); + t.is(extract.attributes.mail, "myemailassociatedwithsp@sp.com"); + t.is( + extract.response.inResponseTo, + "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4" + ); }); -test('send login response with encrypted signed assertion + signed message and parse it', async t => { +test("send login response with encrypted signed assertion + signed message and parse it", async (t: ExecutionContext) => { const spWantMessageSign = serviceProvider({ ...defaultSpConfig, wantMessageSigned: true, }); - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idp.createLoginResponse(spWantMessageSign, sampleRequestInfo, 'post', user, createTemplateCallback(idp, spWantMessageSign, user)); + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idp.createLoginResponse( + spWantMessageSign, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, spWantMessageSign, user) + ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spWantMessageSign.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); + const { samlContent, extract } = await spWantMessageSign.parseLoginResponse( + idp, + "post", + { + body: { SAMLResponse }, + } + ); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.response.inResponseTo, 'request_id'); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.response.inResponseTo, "request_id"); }); -test('send login response with [custom template] encrypted signed assertion + signed message and parse it', async t => { +test("send login response with [custom template] encrypted signed assertion + signed message and parse it", async (t: ExecutionContext) => { const spWantMessageSign = serviceProvider({ ...defaultSpConfig, wantMessageSigned: true, }); - const requestInfo = { extract: { authnrequest: { id: 'request_id' } } }; - const user = { email: 'user@esaml2.com'}; + const requestInfo = { extract: { authnrequest: { id: "request_id" } } }; + const user = { email: "user@esaml2.com" }; const { id, context: SAMLResponse } = await idpcustom.createLoginResponse( spWantMessageSign, - { extract: { authnrequest: { id: 'request_id' } } }, 'post', - { email: 'user@esaml2.com' }, - createTemplateCallback(idpcustom, spWantMessageSign, user), + { extract: { authnrequest: { id: "request_id" } } }, + "post", + { email: "user@esaml2.com" }, + createTemplateCallback(idpcustom, spWantMessageSign, user) ); // receiver (caution: only use metadata and public key when declare pair-up in oppoent entity) - const { samlContent, extract } = await spWantMessageSign.parseLoginResponse(idpcustom, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.attributes.name, 'mynameinsp'); - t.is(extract.attributes.mail, 'myemailassociatedwithsp@sp.com'); - t.is(extract.response.inResponseTo, '_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4'); + const { samlContent, extract } = await spWantMessageSign.parseLoginResponse( + idpcustom, + "post", + { + body: { SAMLResponse }, + } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.attributes.name, "mynameinsp"); + t.is(extract.attributes.mail, "myemailassociatedwithsp@sp.com"); + t.is( + extract.response.inResponseTo, + "_4606cc1f427fa981e6ffd653ee8d6972fc5ce398c4" + ); }); // simulate idp-init slo -test('idp sends a redirect logout request without signature and sp parses it', async t => { - const { id, context } = idp.createLogoutRequest(sp, 'redirect', { logoutNameID: 'user@esaml2.com' }); +test("idp sends a redirect logout request without signature and sp parses it", async (t: ExecutionContext) => { + const { id, context } = idp.createLogoutRequest(sp, "redirect", { + logoutNameID: "user@esaml2.com", + }); const query = url.parse(context).query; - t.is(query!.includes('SAMLRequest='), true); - t.is(typeof id, 'string'); - t.is(typeof context, 'string'); + t.is(query!.includes("SAMLRequest="), true); + t.is(typeof id, "string"); + t.is(typeof context, "string"); const originalURL = url.parse(context, true); - const SAMLRequest = encodeURIComponent(originalURL.query.SAMLRequest as string); + const SAMLRequest = encodeURIComponent( + originalURL.query.SAMLRequest as string + ); let result; - const { samlContent, extract } = result = await sp.parseLogoutRequest(idp, 'redirect', { query: { SAMLRequest }}); + const { samlContent, extract } = (result = await sp.parseLogoutRequest( + idp, + "redirect", + { query: { SAMLRequest } } + )); t.is(result.sigAlg, null); - t.is(typeof samlContent, 'string'); - t.is(extract.nameID, 'user@esaml2.com'); + t.is(typeof samlContent, "string"); + t.is(extract.nameID, "user@esaml2.com"); t.is(extract.signature, null); - t.is(typeof extract.request.id, 'string'); - t.is(extract.request.destination, 'https://sp.example.org/sp/slo'); - t.is(extract.issuer, 'https://idp.example.com/metadata'); + t.is(typeof extract.request.id, "string"); + t.is(extract.request.destination, "https://sp.example.org/sp/slo"); + t.is(extract.issuer, "https://idp.example.com/metadata"); }); -test('idp sends a redirect logout request with signature and sp parses it', async t => { - const { id, context } = idp.createLogoutRequest(spWantLogoutReqSign, 'redirect', { logoutNameID: 'user@esaml2.com' }); +test("idp sends a redirect logout request with signature and sp parses it", async (t: ExecutionContext) => { + const { id, context } = idp.createLogoutRequest( + spWantLogoutReqSign, + "redirect", + { logoutNameID: "user@esaml2.com" } + ); const query = url.parse(context).query; - t.is(query!.includes('SAMLRequest='), true); - t.is(query!.includes('SigAlg='), true); - t.is(query!.includes('Signature='), true); - t.is(typeof id, 'string'); - t.is(typeof context, 'string'); + t.is(query!.includes("SAMLRequest="), true); + t.is(query!.includes("SigAlg="), true); + t.is(query!.includes("Signature="), true); + t.is(typeof id, "string"); + t.is(typeof context, "string"); const originalURL = url.parse(context, true); const SAMLRequest = originalURL.query.SAMLRequest; const Signature = originalURL.query.Signature; const SigAlg = originalURL.query.SigAlg; delete originalURL.query.Signature; - const octetString = Object.keys(originalURL.query).map(q => q + '=' + encodeURIComponent(originalURL.query[q] as string)).join('&'); - const { extract } = await spWantLogoutReqSign.parseLogoutRequest(idp, 'redirect', { query: { SAMLRequest, Signature, SigAlg }, octetString}); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.issuer, 'https://idp.example.com/metadata'); - t.is(typeof extract.request.id, 'string'); - t.is(extract.request.destination, 'https://sp.example.org/sp/slo'); + const octetString = Object.keys(originalURL.query) + .map((q) => q + "=" + encodeURIComponent(originalURL.query[q] as string)) + .join("&"); + const { extract } = await spWantLogoutReqSign.parseLogoutRequest( + idp, + "redirect", + { query: { SAMLRequest, Signature, SigAlg }, octetString } + ); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.issuer, "https://idp.example.com/metadata"); + t.is(typeof extract.request.id, "string"); + t.is(extract.request.destination, "https://sp.example.org/sp/slo"); t.is(extract.signature, null); // redirect binding doesn't embed the signature }); -test('idp sends a post logout request without signature and sp parses it', async t => { - const { relayState, type, entityEndpoint, id, context } = idp.createLogoutRequest(sp, 'post', { logoutNameID: 'user@esaml2.com' }) as PostBindingContext; - t.is(typeof id, 'string'); - t.is(typeof context, 'string'); - t.is(typeof entityEndpoint, 'string'); - t.is(type, 'SAMLRequest'); - const { extract } = await sp.parseLogoutRequest(idp, 'post', { body: { SAMLRequest: context } }); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.issuer, 'https://idp.example.com/metadata'); - t.is(typeof extract.request.id, 'string'); - t.is(extract.request.destination, 'https://sp.example.org/sp/slo'); +test("idp sends a post logout request without signature and sp parses it", async (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context, + } = idp.createLogoutRequest(sp, "post", { + logoutNameID: "user@esaml2.com", + }) as PostBindingContext; + t.is(typeof id, "string"); + t.is(typeof context, "string"); + t.is(typeof entityEndpoint, "string"); + t.is(type, "SAMLRequest"); + const { extract } = await sp.parseLogoutRequest(idp, "post", { + body: { SAMLRequest: context }, + }); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.issuer, "https://idp.example.com/metadata"); + t.is(typeof extract.request.id, "string"); + t.is(extract.request.destination, "https://sp.example.org/sp/slo"); t.is(extract.signature, null); }); -test('idp sends a post logout request with signature and sp parses it', async t => { - const { relayState, type, entityEndpoint, id, context } = idp.createLogoutRequest(spWantLogoutReqSign, 'post', { logoutNameID: 'user@esaml2.com' }) as PostBindingContext; - t.is(typeof id, 'string'); - t.is(typeof context, 'string'); - t.is(typeof entityEndpoint, 'string'); - t.is(type, 'SAMLRequest'); - const { extract } = await spWantLogoutReqSign.parseLogoutRequest(idp, 'post', { body: { SAMLRequest: context } }); - t.is(extract.nameID, 'user@esaml2.com'); - t.is(extract.issuer, 'https://idp.example.com/metadata'); - t.is(extract.request.destination, 'https://sp.example.org/sp/slo'); - t.is(typeof extract.request.id, 'string'); - t.is(typeof extract.signature, 'string'); +test("idp sends a post logout request with signature and sp parses it", async (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context, + } = idp.createLogoutRequest(spWantLogoutReqSign, "post", { + logoutNameID: "user@esaml2.com", + }) as PostBindingContext; + t.is(typeof id, "string"); + t.is(typeof context, "string"); + t.is(typeof entityEndpoint, "string"); + t.is(type, "SAMLRequest"); + const { extract } = await spWantLogoutReqSign.parseLogoutRequest( + idp, + "post", + { body: { SAMLRequest: context } } + ); + t.is(extract.nameID, "user@esaml2.com"); + t.is(extract.issuer, "https://idp.example.com/metadata"); + t.is(extract.request.destination, "https://sp.example.org/sp/slo"); + t.is(typeof extract.request.id, "string"); + t.is(typeof extract.signature, "string"); }); // simulate init-slo -test('sp sends a post logout response without signature and parse', async t => { - const { context: SAMLResponse } = sp.createLogoutResponse(idp, null, 'post', '', createTemplateCallback(idp, sp, {})) as PostBindingContext; - const { samlContent, extract } = await idp.parseLogoutResponse(sp, 'post', { body: { SAMLResponse }}); +test("sp sends a post logout response without signature and parse", async (t: ExecutionContext) => { + const { context: SAMLResponse } = sp.createLogoutResponse( + idp, + null, + "post", + "", + createTemplateCallback(idp, sp, {}) + ) as PostBindingContext; + const { samlContent, extract } = await idp.parseLogoutResponse(sp, "post", { + body: { SAMLResponse }, + }); t.is(extract.signature, null); - t.is(extract.issuer, 'https://sp.example.org/metadata'); - t.is(typeof extract.response.id, 'string'); - t.is(extract.response.destination, 'https://idp.example.org/sso/SingleLogoutService'); + t.is(extract.issuer, "https://sp.example.org/metadata"); + t.is(typeof extract.response.id, "string"); + t.is( + extract.response.destination, + "https://idp.example.org/sso/SingleLogoutService" + ); }); -test('sp sends a post logout response with signature and parse', async t => { - const { relayState, type, entityEndpoint, id, context: SAMLResponse } = sp.createLogoutResponse(idpWantLogoutResSign, sampleRequestInfo, 'post', '', createTemplateCallback(idpWantLogoutResSign, sp, {})) as PostBindingContext; - const { samlContent, extract } = await idpWantLogoutResSign.parseLogoutResponse(sp, 'post', { body: { SAMLResponse }}); - t.is(typeof extract.signature, 'string'); - t.is(extract.issuer, 'https://sp.example.org/metadata'); - t.is(typeof extract.response.id, 'string'); - t.is(extract.response.destination, 'https://idp.example.org/sso/SingleLogoutService'); +test("sp sends a post logout response with signature and parse", async (t: ExecutionContext) => { + const { + relayState, + type, + entityEndpoint, + id, + context: SAMLResponse, + } = sp.createLogoutResponse( + idpWantLogoutResSign, + sampleRequestInfo, + "post", + "", + createTemplateCallback(idpWantLogoutResSign, sp, {}) + ) as PostBindingContext; + const { + samlContent, + extract, + } = await idpWantLogoutResSign.parseLogoutResponse(sp, "post", { + body: { SAMLResponse }, + }); + t.is(typeof extract.signature, "string"); + t.is(extract.issuer, "https://sp.example.org/metadata"); + t.is(typeof extract.response.id, "string"); + t.is( + extract.response.destination, + "https://idp.example.org/sso/SingleLogoutService" + ); }); -test('send login response with encrypted non-signed assertion with EncryptThenSign and parse it', async t => { - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpEncryptThenSign.createLoginResponse(spNoAssertSignCustomConfig, sampleRequestInfo, 'post', user, createTemplateCallback(idpEncryptThenSign, spNoAssertSignCustomConfig, user), true); - const { samlContent, extract } = await spNoAssertSignCustomConfig.parseLoginResponse(idpEncryptThenSign, 'post', { body: { SAMLResponse } }); - t.is(typeof id, 'string'); - t.is(samlContent.startsWith(''), true); - t.is(extract.nameID, 'user@esaml2.com'); +test("send login response with encrypted non-signed assertion with EncryptThenSign and parse it", async (t: ExecutionContext) => { + const user = { email: "user@esaml2.com" }; + const { + id, + context: SAMLResponse, + } = await idpEncryptThenSign.createLoginResponse( + spNoAssertSignCustomConfig, + sampleRequestInfo, + "post", + user, + createTemplateCallback( + idpEncryptThenSign, + spNoAssertSignCustomConfig, + user + ), + true + ); + const { + samlContent, + extract, + } = await spNoAssertSignCustomConfig.parseLoginResponse( + idpEncryptThenSign, + "post", + { body: { SAMLResponse } } + ); + t.is(typeof id, "string"); + t.is(samlContent.startsWith(""), true); + t.is(extract.nameID, "user@esaml2.com"); }); -test('Customize prefix (saml2) for encrypted assertion tag', async t => { - const user = { email: 'test@email.com' }; - const idpCustomizePfx = identityProvider(Object.assign(defaultIdpConfig, { tagPrefix: { - encryptedAssertion: 'saml2', - }})); - const { id, context: SAMLResponse } = await idpCustomizePfx.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idpCustomizePfx, sp, user)); - t.is((utility.base64Decode(SAMLResponse) as string).includes('saml2:EncryptedAssertion'), true); - const { samlContent, extract } = await sp.parseLoginResponse(idpCustomizePfx, 'post', { body: { SAMLResponse } }); +test("Customize prefix (saml2) for encrypted assertion tag", async (t: ExecutionContext) => { + const user = { email: "test@email.com" }; + const idpCustomizePfx = identityProvider( + Object.assign(defaultIdpConfig, { + tagPrefix: { + encryptedAssertion: "saml2", + }, + }) + ); + const { + id, + context: SAMLResponse, + } = await idpCustomizePfx.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpCustomizePfx, sp, user) + ); + t.is( + (utility.base64Decode(SAMLResponse) as string).includes( + "saml2:EncryptedAssertion" + ), + true + ); + const { samlContent, extract } = await sp.parseLoginResponse( + idpCustomizePfx, + "post", + { body: { SAMLResponse } } + ); }); -test('Customize prefix (default is saml) for encrypted assertion tag', async t => { - const user = { email: 'test@email.com' }; - const { id, context: SAMLResponse } = await idp.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idp, sp, user)); - t.is((utility.base64Decode(SAMLResponse) as string).includes('saml:EncryptedAssertion'), true); - const { samlContent, extract } = await sp.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); +test("Customize prefix (default is saml) for encrypted assertion tag", async (t: ExecutionContext) => { + const user = { email: "test@email.com" }; + const { id, context: SAMLResponse } = await idp.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, sp, user) + ); + t.is( + (utility.base64Decode(SAMLResponse) as string).includes( + "saml:EncryptedAssertion" + ), + true + ); + const { samlContent, extract } = await sp.parseLoginResponse(idp, "post", { + body: { SAMLResponse }, + }); }); -test('avoid malformatted response', async t => { +test("avoid malformatted response", async (t: ExecutionContext) => { // sender (caution: only use metadata and public key when declare pair-up in oppoent entity) - const user = { email: 'user@email.com' }; - const { context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, sp, user)); + const user = { email: "user@email.com" }; + const { context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, sp, user) + ); const rawResponse = String(utility.base64Decode(SAMLResponse, true)); const attackResponse = `evil@evil.com${rawResponse}`; try { - await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse: utility.base64Encode(attackResponse) } }); + await sp.parseLoginResponse(idpNoEncrypt, "post", { + body: { SAMLResponse: utility.base64Encode(attackResponse) }, + }); } catch (e) { // it must throw an error t.is(true, true); } }); -test('should reject signature wrapped response - case 1', async t => { - // - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, sp, user)); +test("should reject signature wrapped response - case 1", async (t: ExecutionContext) => { + // + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, sp, user) + ); //Decode - const buffer = Buffer.from(SAMLResponse, 'base64'); + const buffer = Buffer.from(SAMLResponse, "base64"); const xml = buffer.toString(); //Create version of response without signature - const stripped = xml - .replace(//, ''); + const stripped = xml.replace(//, ""); //Create version of response with altered IDs and new username const outer = xml .replace(/assertion" ID="_[0-9a-f]{3}/g, 'assertion" ID="_000') - .replace('user@esaml2.com', 'admin@esaml2.com'); + .replace("user@esaml2.com", "admin@esaml2.com"); //Put stripped version under SubjectConfirmationData of modified version - const xmlWrapped = outer.replace(/]*\/>/, '' + stripped.replace('', '') + ''); - const wrappedResponse = Buffer.from(xmlWrapped).toString('base64'); + const xmlWrapped = outer.replace( + /]*\/>/, + "" + + stripped.replace('', "") + + "" + ); + const wrappedResponse = Buffer.from(xmlWrapped).toString("base64"); try { - await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse: wrappedResponse } }); + await sp.parseLoginResponse(idpNoEncrypt, "post", { + body: { SAMLResponse: wrappedResponse }, + }); } catch (e) { - t.is(e.message, 'ERR_POTENTIAL_WRAPPING_ATTACK'); + t.is(e.message, "ERR_POTENTIAL_WRAPPING_ATTACK"); } }); -test('should reject signature wrapped response - case 2', async t => { - // - const user = { email: 'user@esaml2.com' }; - const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idpNoEncrypt, sp, user)); +test("should reject signature wrapped response - case 2", async (t: ExecutionContext) => { + // + const user = { email: "user@esaml2.com" }; + const { id, context: SAMLResponse } = await idpNoEncrypt.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idpNoEncrypt, sp, user) + ); //Decode - const buffer = Buffer.from(SAMLResponse, 'base64'); + const buffer = Buffer.from(SAMLResponse, "base64"); const xml = buffer.toString(); //Create version of response without signature - const stripped = xml - .replace(//, ''); + const stripped = xml.replace(//, ""); //Create version of response with altered IDs and new username const outer = xml .replace(/assertion" ID="_[0-9a-f]{3}/g, 'assertion" ID="_000') - .replace('user@esaml2.com', 'admin@esaml2.com'); + .replace("user@esaml2.com", "admin@esaml2.com"); //Put stripped version under SubjectConfirmationData of modified version - const xmlWrapped = outer.replace(/<\/saml:Conditions>/, '' + stripped.replace('', '') + ''); - const wrappedResponse = Buffer.from(xmlWrapped).toString('base64'); + const xmlWrapped = outer.replace( + /<\/saml:Conditions>/, + "" + + stripped.replace('', "") + + "" + ); + const wrappedResponse = Buffer.from(xmlWrapped).toString("base64"); try { - const result = await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse: wrappedResponse } }); + const result = await sp.parseLoginResponse(idpNoEncrypt, "post", { + body: { SAMLResponse: wrappedResponse }, + }); } catch (e) { - t.is(e.message, 'ERR_POTENTIAL_WRAPPING_ATTACK'); + t.is(e.message, "ERR_POTENTIAL_WRAPPING_ATTACK"); } }); -test('should throw two-tiers code error when the response does not return success status', async t => { +test("should throw two-tiers code error when the response does not return success status", async (t: ExecutionContext) => { try { - const _result = await sp.parseLoginResponse(idpNoEncrypt, 'post', { body: { SAMLResponse: utility.base64Encode(failedResponse) } }); + const _result = await sp.parseLoginResponse(idpNoEncrypt, "post", { + body: { SAMLResponse: utility.base64Encode(failedResponse) }, + }); } catch (e) { - t.is(e.message, 'ERR_FAILED_STATUS with top tier code: urn:oasis:names:tc:SAML:2.0:status:Requester, second tier code: urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy'); + t.is( + e.message, + "ERR_FAILED_STATUS with top tier code: urn:oasis:names:tc:SAML:2.0:status:Requester, second tier code: urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy" + ); } }); -test.serial('should throw ERR_SUBJECT_UNCONFIRMED for the expired SAML response without clock drift setup', async t => { - - const now = new Date(); - const fiveMinutesOneSecLater = new Date(now.getTime()); - fiveMinutesOneSecLater.setMinutes(fiveMinutesOneSecLater.getMinutes() + 5); - fiveMinutesOneSecLater.setSeconds(fiveMinutesOneSecLater.getSeconds() + 1); - - const user = { email: 'user@esaml2.com' }; - - try { - const { context: SAMLResponse } = await idp.createLoginResponse(sp, sampleRequestInfo, 'post', user, createTemplateCallback(idp, sp, user)); - // simulate the time on client side when response arrives after 5.1 sec - tk.freeze(fiveMinutesOneSecLater); - await sp.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); - // test failed, it shouldn't happen - t.is(true, false); - } catch (e) { - t.is(e, 'ERR_SUBJECT_UNCONFIRMED'); - } finally { - tk.reset(); +test.serial( + "should throw ERR_SUBJECT_UNCONFIRMED for the expired SAML response without clock drift setup", + async (t: ExecutionContext) => { + const now = new Date(); + const fiveMinutesOneSecLater = new Date(now.getTime()); + fiveMinutesOneSecLater.setMinutes(fiveMinutesOneSecLater.getMinutes() + 5); + fiveMinutesOneSecLater.setSeconds(fiveMinutesOneSecLater.getSeconds() + 1); + + const user = { email: "user@esaml2.com" }; + + try { + const { context: SAMLResponse } = await idp.createLoginResponse( + sp, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, sp, user) + ); + // simulate the time on client side when response arrives after 5.1 sec + tk.freeze(fiveMinutesOneSecLater); + await sp.parseLoginResponse(idp, "post", { body: { SAMLResponse } }); + // test failed, it shouldn't happen + t.is(true, false); + } catch (e) { + t.is(e, "ERR_SUBJECT_UNCONFIRMED"); + } finally { + tk.reset(); + } } -}); - -test.serial('should not throw ERR_SUBJECT_UNCONFIRMED for the expired SAML response with clock drift setup', async t => { - - const now = new Date(); - const fiveMinutesOneSecLater = new Date(now.getTime()); - fiveMinutesOneSecLater.setMinutes(fiveMinutesOneSecLater.getMinutes() + 5); - fiveMinutesOneSecLater.setSeconds(fiveMinutesOneSecLater.getSeconds() + 1); - const user = { email: 'user@esaml2.com' }; - - try { - const { context: SAMLResponse } = await idp.createLoginResponse(spWithClockDrift, sampleRequestInfo, 'post', user, createTemplateCallback(idp, spWithClockDrift, user)); - // simulate the time on client side when response arrives after 5.1 sec - tk.freeze(fiveMinutesOneSecLater); - await spWithClockDrift.parseLoginResponse(idp, 'post', { body: { SAMLResponse } }); - t.is(true, true); - } catch (e) { - // test failed, it shouldn't happen - t.is(e, false); - } finally { - tk.reset(); +); + +test.serial( + "should not throw ERR_SUBJECT_UNCONFIRMED for the expired SAML response with clock drift setup", + async (t: ExecutionContext) => { + const now = new Date(); + const fiveMinutesOneSecLater = new Date(now.getTime()); + fiveMinutesOneSecLater.setMinutes(fiveMinutesOneSecLater.getMinutes() + 5); + fiveMinutesOneSecLater.setSeconds(fiveMinutesOneSecLater.getSeconds() + 1); + const user = { email: "user@esaml2.com" }; + + try { + const { context: SAMLResponse } = await idp.createLoginResponse( + spWithClockDrift, + sampleRequestInfo, + "post", + user, + createTemplateCallback(idp, spWithClockDrift, user) + ); + // simulate the time on client side when response arrives after 5.1 sec + tk.freeze(fiveMinutesOneSecLater); + await spWithClockDrift.parseLoginResponse(idp, "post", { + body: { SAMLResponse }, + }); + t.is(true, true); + } catch (e) { + // test failed, it shouldn't happen + t.is(e, false); + } finally { + tk.reset(); + } } - -}); \ No newline at end of file +); diff --git a/test/index.ts b/test/index.ts index 07cfe83e..8e830c57 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,7 +1,7 @@ -import esaml2 = require('../index'); -import { readFileSync, writeFileSync } from 'fs'; -import test from 'ava'; -import { verifyTime } from '../src/validator'; +import esaml2 = require("../index"); +import { readFileSync } from "fs"; +import test, { ExecutionContext } from "ava"; +import { verifyTime } from "../src/validator"; const { IdentityProvider: identityProvider, @@ -18,332 +18,575 @@ const algorithms = ref.algorithms; const wording = ref.wording; const signatureAlgorithms = algorithms.signature; -const _spKeyFolder = './test/key/sp/'; -const _spPrivPem = String(readFileSync(_spKeyFolder + 'privkey.pem')); -const _spPrivKeyPass = 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px'; +const _spKeyFolder = "./test/key/sp/"; +const _spPrivPem = String(readFileSync(_spKeyFolder + "privkey.pem")); +const _spPrivKeyPass = "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px"; const defaultIdpConfig = { - privateKey: readFileSync('./test/key/idp/privkey.pem'), - privateKeyPass: 'q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW', + privateKey: readFileSync("./test/key/idp/privkey.pem"), + privateKeyPass: "q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW", isAssertionEncrypted: true, - encPrivateKey: readFileSync('./test/key/idp/encryptKey.pem'), - encPrivateKeyPass: 'g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN', - metadata: readFileSync('./test/misc/idpmeta.xml'), + encPrivateKey: readFileSync("./test/key/idp/encryptKey.pem"), + encPrivateKeyPass: "g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN", + metadata: readFileSync("./test/misc/idpmeta.xml"), }; const defaultSpConfig = { - privateKey: readFileSync('./test/key/sp/privkey.pem'), - privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px', + privateKey: readFileSync("./test/key/sp/privkey.pem"), + privateKeyPass: "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px", isAssertionEncrypted: true, - encPrivateKey: readFileSync('./test/key/sp/encryptKey.pem'), - encPrivateKeyPass: 'BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU', - metadata: readFileSync('./test/misc/spmeta.xml'), + encPrivateKey: readFileSync("./test/key/sp/encryptKey.pem"), + encPrivateKeyPass: "BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU", + metadata: readFileSync("./test/misc/spmeta.xml"), }; const idp = identityProvider(defaultIdpConfig); const idpRollingCert = identityProvider({ ...defaultIdpConfig, - metadata: readFileSync('./test/misc/idpmeta_rollingcert.xml'), + metadata: readFileSync("./test/misc/idpmeta_rollingcert.xml"), }); const sp = serviceProvider(defaultSpConfig); -const IdPMetadata = idpMetadata(readFileSync('./test/misc/idpmeta.xml')); -const SPMetadata = spMetadata(readFileSync('./test/misc/spmeta.xml')); -const sampleSignedResponse = readFileSync('./test/misc/response_signed.xml').toString(); -const wrongResponse = readFileSync('./test/misc/invalid_response.xml').toString(); -const spCertKnownGood = readFileSync('./test/key/sp/knownGoodCert.cer').toString().trim(); -const spPemKnownGood = readFileSync('./test/key/sp/knownGoodEncryptKey.pem').toString().trim(); - -test('base64 encoding returns encoded string', t => { - t.is(utility.base64Encode('Hello World'), 'SGVsbG8gV29ybGQ='); +const IdPMetadata = idpMetadata(readFileSync("./test/misc/idpmeta.xml")); +const SPMetadata = spMetadata(readFileSync("./test/misc/spmeta.xml")); +const sampleSignedResponse = readFileSync( + "./test/misc/response_signed.xml" +).toString(); +const wrongResponse = readFileSync( + "./test/misc/invalid_response.xml" +).toString(); +const spCertKnownGood = readFileSync("./test/key/sp/knownGoodCert.cer") + .toString() + .trim(); +const spPemKnownGood = readFileSync("./test/key/sp/knownGoodEncryptKey.pem") + .toString() + .trim(); + +test("base64 encoding returns encoded string", (t: ExecutionContext) => { + t.is(utility.base64Encode("Hello World"), "SGVsbG8gV29ybGQ="); }); -test('base64 decoding returns decoded string', t => { - t.is(utility.base64Decode('SGVsbG8gV29ybGQ='), 'Hello World'); +test("base64 decoding returns decoded string", (t: ExecutionContext) => { + t.is(utility.base64Decode("SGVsbG8gV29ybGQ="), "Hello World"); }); -test('deflate + base64 encoded', t => { - t.is(utility.base64Encode(utility.deflateString('Hello World')), '80jNyclXCM8vykkBAA=='); +test("deflate + base64 encoded", (t: ExecutionContext) => { + t.is( + utility.base64Encode(utility.deflateString("Hello World")), + "80jNyclXCM8vykkBAA==" + ); }); -test('base64 decoded + inflate', t => { - t.is(utility.inflateString('80jNyclXCM8vykkBAA=='), 'Hello World'); +test("base64 decoded + inflate", (t: ExecutionContext) => { + t.is(utility.inflateString("80jNyclXCM8vykkBAA=="), "Hello World"); }); -test('parse cer format resulting clean certificate', t => { - t.is(utility.normalizeCerString(readFileSync('./test/key/sp/cert.cer')), spCertKnownGood); +test("parse cer format resulting clean certificate", (t: ExecutionContext) => { + t.is( + utility.normalizeCerString(readFileSync("./test/key/sp/cert.cer")), + spCertKnownGood + ); }); -test('normalize pem key returns clean string', t => { - const ekey = readFileSync('./test/key/sp/encryptKey.pem').toString(); +test("normalize pem key returns clean string", (t: ExecutionContext) => { + const ekey = readFileSync("./test/key/sp/encryptKey.pem").toString(); t.is(utility.normalizePemString(ekey), spPemKnownGood); }); -test('getAssertionConsumerService with one binding', t => { - const expectedPostLocation = 'https:sp.example.org/sp/sso/post'; +test("getAssertionConsumerService with one binding", (t: ExecutionContext) => { + const expectedPostLocation = "https:sp.example.org/sp/sso/post"; const _sp = serviceProvider({ - privateKey: './test/key/sp/privkey.pem', - privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px', + privateKey: "./test/key/sp/privkey.pem", + privateKeyPass: "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px", isAssertionEncrypted: true, - encPrivateKey: './test/key/sp/encryptKey.pem', - encPrivateKeyPass: 'BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU', - assertionConsumerService: [{ - Binding: binding.post, - Location: expectedPostLocation, - }], - singleLogoutService: [{ - Binding: binding.redirect, - Location: 'https:sp.example.org/sp/slo', - }], - }); - t.is(_sp.entityMeta.getAssertionConsumerService(wording.binding.post), expectedPostLocation); + encPrivateKey: "./test/key/sp/encryptKey.pem", + encPrivateKeyPass: "BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU", + assertionConsumerService: [ + { + Binding: binding.post, + Location: expectedPostLocation, + }, + ], + singleLogoutService: [ + { + Binding: binding.redirect, + Location: "https:sp.example.org/sp/slo", + }, + ], + }); + t.is( + _sp.entityMeta.getAssertionConsumerService(wording.binding.post), + expectedPostLocation + ); }); -test('getAssertionConsumerService with two bindings', t => { - const expectedPostLocation = 'https:sp.example.org/sp/sso/post'; - const expectedArtifactLocation = 'https:sp.example.org/sp/sso/artifact'; +test("getAssertionConsumerService with two bindings", (t: ExecutionContext) => { + const expectedPostLocation = "https:sp.example.org/sp/sso/post"; + const expectedArtifactLocation = "https:sp.example.org/sp/sso/artifact"; const _sp = serviceProvider({ - privateKey: './test/key/sp/privkey.pem', - privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px', + privateKey: "./test/key/sp/privkey.pem", + privateKeyPass: "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px", isAssertionEncrypted: true, - encPrivateKey: './test/key/sp/encryptKey.pem', - encPrivateKeyPass: 'BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU', - assertionConsumerService: [{ - Binding: binding.post, - Location: expectedPostLocation, - }, { - Binding: binding.artifact, - Location: expectedArtifactLocation, - }], - singleLogoutService: [{ - Binding: binding.redirect, - Location: 'https:sp.example.org/sp/slo', - }, { - Binding: binding.post, - Location: 'https:sp.example.org/sp/slo', - }], - }); - t.is(_sp.entityMeta.getAssertionConsumerService(wording.binding.post), expectedPostLocation); - t.is(_sp.entityMeta.getAssertionConsumerService(wording.binding.artifact), expectedArtifactLocation); + encPrivateKey: "./test/key/sp/encryptKey.pem", + encPrivateKeyPass: "BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU", + assertionConsumerService: [ + { + Binding: binding.post, + Location: expectedPostLocation, + }, + { + Binding: binding.artifact, + Location: expectedArtifactLocation, + }, + ], + singleLogoutService: [ + { + Binding: binding.redirect, + Location: "https:sp.example.org/sp/slo", + }, + { + Binding: binding.post, + Location: "https:sp.example.org/sp/slo", + }, + ], + }); + t.is( + _sp.entityMeta.getAssertionConsumerService(wording.binding.post), + expectedPostLocation + ); + t.is( + _sp.entityMeta.getAssertionConsumerService(wording.binding.artifact), + expectedArtifactLocation + ); }); (() => { - - - const _originRequest: string = String(readFileSync('./test/misc/request.xml')); - const _decodedResponse: string = String(readFileSync('./test/misc/response_signed.xml')); - const _falseDecodedRequestSHA1: string = String(readFileSync('./test/misc/false_signed_request_sha1.xml')); - const _decodedRequestSHA256: string = String(readFileSync('./test/misc/signed_request_sha256.xml')); - const _falseDecodedRequestSHA256: string = String(readFileSync('./test/misc/false_signed_request_sha256.xml')); - const _decodedRequestSHA512: string = String(readFileSync('./test/misc/signed_request_sha512.xml')); - const _falseDecodedRequestSHA512: string = String(readFileSync('./test/misc/false_signed_request_sha512.xml')); - - const octetString: string = 'SAMLRequest=fVNdj9MwEHxH4j9Yfm%2Fi5PpBrLaotEJUOrioKTzwgoy9oZZiO9ibu%2FLvcXLtKUhHnyzZM7Mzu+tlEKZp+abDkz3A7w4CkrNpbODDw4p23nIngg7cCgOBo+TV5vM9zxPGW+%2FQSdfQEeU2Q4QAHrWzlOx3K%2FrjHSsWbFEzdsfETDE2z5ksVKHqYlHP84WooVBS5lNKvoEPkbeiUYaS0rtHrcB%2FiRVWtCoJRuNRM4QO9jagsBiRLJtO2GKSzY%2F5HZ%2FlfDr7TskuIrUVOIidEFueplq1CZyFaRtIpDNpVT1U4B+1hKQ9tUO5IegHbZW2v25n%2FPkMCvzT8VhOyofqSMnmmnvrbOgM+Iv818P9i4nwrwcFxmVp1IJzb+K9kIGu374hZNm3mQ9R%2Ffp1rgEUSqBYpmPsC7nlfd%2F2u9I1Wv4hH503Av8fKkuy4UarST1AORihm41SHkKI4ZrGPW09CIyzQN8BTce1LmsFaliy2ACEM5KtM63wOvRTiNYlPoe7xhtjt01cmwPU65ubJbnscfG6jMeT8+qS%2FlWpwV96w2BEXN%2FHn2P9Fw%3D%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1'; - const octetStringSHA256: string = 'SAMLRequest=fZJbTwIxEIX%2Fyqbvy3Yv3BogQYiRBJWw6IN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- const signatureB64SHA512: string = 'pLoxKnpOVA1mvLpOZCyzCyB/P01Qcy7cEFskzycm5sdNFYjmZAMGT6yxCgTRvzIloX2J7abZdAkU1dA8kY2yPQrWCuQFOxeSCqnGpHg5/bBKzFiGwWtlyHgh7LXEEo2zKWspJh7BhwRIbtOAnN3XvCPDO58wKHnEdxo9TneTyFmy5hcfYKcF7LlI8jSFkmsPvCsMMJ8TawgnKlwdIU0Ze/cp64Y24cpYxVIKtCC950VRuxAt3bmr7pqtIEsHKkqTOrPv5pWo2XqRG0UhvzjYCbpC8aGOuqLe8hfTfgpQ6ebUkqrgAufkLrinOGpZrlQQDFr0iVIKR30bInDGjg2G+g=='; - const signatureB64SHA256: string = 'iC7RXfHuIu4gBLGABv0qtt96XFvyC7QSX8cDyLjJj+WNOTRMO5J/AYKelVhuc2AZuyGcf/sfeeVmcW7wyKTBHiGS+AWUCljmG43mPWERPfsa7og+GxrsHDSFh5nD70mQF44bXvpo/oVOxHx/lPiDG5LZg2KBccNXqJxMVUhnyU6xeGBctYY5ZQ4y7MGOx7hWTWjHyv+wyFd44Bcq0kpunTls91z03GkYo/Oxd4KllbfR5D2v6awjrc79wMYL1CcZiKZ941ter6tHOHCwtZRhTqV3Dl42zOKUOCyGcjJnVzJre1QBA7hrn3WB5/fu5kE6/E9ENRWp8ZRJLbU8C2Oogg=='; - const signatureB64SHA1: string = 'UKPzYQivZOavFV3QjOH/B9AwKls9n5hZIzOL+V93Yi7lJ7siNkAA9WZgErtFVpDTN6ngSwvlfP/hXZcS33RcCGBWi1SX+xuwuk2U7bZgdkkw4tIH8zcgiRy8bK0IpMoXmLbApU2QsiNwRDMZq3iQdlaMhlsJh85VI+90SQk7fewseiw5Ui6BIpFSH96gLYjWMDPpwk+0GkhkkVaP5vo+I6mBQryD9YPFRu7JfCrnw2T6gldXlGu0IN326+qajKheAGmPSLWBmeFYhquJ5ipgfQGU/KCNIEUr6hkW8NU0+6EVaZl/A9Fyfs1+8KCQ6HxZ7FGyewQjJ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GhTQk5iZHIrNjZFMnFwY0VoQUYxaUptekJOeWhiL3lkbEV1VnBuOC9Fc29QK0h2QmVpRGw1Z29uMzU2Mk16WklnVi9wTGRUZnhIeVc2aHpBUWhqR3EyVWhjdlIrZ1hOVkp2SFAyZVM0amxIbkprQjliZm8wa3ZmODdRK0Q2WEtYM3E1YzNtTzh0cVc2VXBxSFNDK3VMRXB6WmlOTGV1RmE0VFVJaGdCZ2pEamxSck5ES3U4bmRhbmNTbjN5QkhZbnFKMnQ5Y1IrY29Gbm5qWUFCUXBOcnZrNG10bVhZOFNYb0J6WUc5WStscWVBdW42KzBZeUU9PC9YNTA5Q2VydGlmaWNhdGU+PC9YNTA5RGF0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9zYW1scDpBdXRoblJlcXVlc3Q+'; - - test('sign a SAML message with RSA-SHA1', t => { - t.is(libsaml.constructMessageSignature(octetString, _spPrivPem, _spPrivKeyPass).toString('base64'), signatureB64SHA1); - }); - test('sign a SAML message with RSA-SHA256', t => { - t.is(libsaml.constructMessageSignature(octetStringSHA256, _spPrivPem, _spPrivKeyPass, undefined, signatureAlgorithms.RSA_SHA256).toString('base64'), signatureB64SHA256); - }); - test('sign a SAML message with RSA-SHA512', t => { - t.is(libsaml.constructMessageSignature(octetStringSHA512, _spPrivPem, _spPrivKeyPass, undefined, signatureAlgorithms.RSA_SHA512).toString('base64'), signatureB64SHA512); - }); - test('verify binary SAML message signed with RSA-SHA1', t => { - const signature = libsaml.constructMessageSignature(octetString, _spPrivPem, _spPrivKeyPass, false); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetString, signature), true); - }); - test('verify binary SAML message signed with RSA-SHA256', t => { - const signature = libsaml.constructMessageSignature(octetStringSHA256, _spPrivPem, _spPrivKeyPass, false, signatureAlgorithms.RSA_SHA256); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetStringSHA256, signature, signatureAlgorithms.RSA_SHA256), true); - }); - test('verify binary SAML message signed with RSA-SHA512', t => { - const signature = libsaml.constructMessageSignature(octetStringSHA512, _spPrivPem, _spPrivKeyPass, false, signatureAlgorithms.RSA_SHA512); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetStringSHA512, signature, signatureAlgorithms.RSA_SHA512), true); - }); - test('verify stringified SAML message signed with RSA-SHA1', t => { - const signature = libsaml.constructMessageSignature(octetString, _spPrivPem, _spPrivKeyPass); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetString, Buffer.from(signature, 'base64')), true); - }); - test('verify stringified SAML message signed with RSA-SHA256', t => { - const signature = libsaml.constructMessageSignature(octetStringSHA256, _spPrivPem, _spPrivKeyPass); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetStringSHA256, Buffer.from(signature, 'base64')), true); - }); - test('verify stringified SAML message signed with RSA-SHA512', t => { - const signature = libsaml.constructMessageSignature(octetStringSHA512, _spPrivPem, _spPrivKeyPass); - t.is(libsaml.verifyMessageSignature(SPMetadata, octetStringSHA512, Buffer.from(signature, 'base64')), true); - }); - test('construct signature with RSA-SHA1', t => { - t.is(libsaml.constructSAMLSignature({ - rawSamlMessage: _originRequest, - referenceTagXPath: libsaml.createXPath('Issuer'), - signingCert: SPMetadata.getX509Certificate('signing') as string, - privateKey: _spPrivPem, - privateKeyPass: _spPrivKeyPass, - signatureAlgorithm: signatureAlgorithms.RSA_SHA1, - }), dummySignRequest); - }); - test('construct signature with RSA-SHA256', t => { - t.is(libsaml.constructSAMLSignature({ - rawSamlMessage: _originRequest, - referenceTagXPath: libsaml.createXPath('Issuer'), - signingCert: SPMetadata.getX509Certificate('signing') as string, - privateKey: _spPrivPem, - privateKeyPass: _spPrivKeyPass, - signatureAlgorithm: signatureAlgorithms.RSA_SHA256, - }), dummySignRequestSHA256); - }); - test('construct signature with RSA-SHA512', t => { - t.is(libsaml.constructSAMLSignature({ - rawSamlMessage: _originRequest, - referenceTagXPath: libsaml.createXPath('Issuer'), - signingCert: SPMetadata.getX509Certificate('signing') as string, - privateKey: _spPrivPem, - privateKeyPass: _spPrivKeyPass, - signatureAlgorithm: signatureAlgorithms.RSA_SHA512, - }), dummySignRequestSHA512); - }); - test('verify a XML signature signed by RSA-SHA1 with metadata', t => { - t.is(libsaml.verifySignature(_decodedResponse, { metadata: IdPMetadata })[0], true); - }); - test('integrity check for request signed with RSA-SHA1', t => { + const _originRequest: string = String( + readFileSync("./test/misc/request.xml") + ); + const _decodedResponse: string = String( + readFileSync("./test/misc/response_signed.xml") + ); + const _falseDecodedRequestSHA1: string = String( + readFileSync("./test/misc/false_signed_request_sha1.xml") + ); + const _decodedRequestSHA256: string = String( + readFileSync("./test/misc/signed_request_sha256.xml") + ); + const _falseDecodedRequestSHA256: string = String( + readFileSync("./test/misc/false_signed_request_sha256.xml") + ); + const _decodedRequestSHA512: string = String( + readFileSync("./test/misc/signed_request_sha512.xml") + ); + const _falseDecodedRequestSHA512: string = String( + readFileSync("./test/misc/false_signed_request_sha512.xml") + ); + + const octetString: string = + "SAMLRequest=fVNdj9MwEHxH4j9Yfm%2Fi5PpBrLaotEJUOrioKTzwgoy9oZZiO9ibu%2FLvcXLtKUhHnyzZM7Mzu+tlEKZp+abDkz3A7w4CkrNpbODDw4p23nIngg7cCgOBo+TV5vM9zxPGW+%2FQSdfQEeU2Q4QAHrWzlOx3K%2FrjHSsWbFEzdsfETDE2z5ksVKHqYlHP84WooVBS5lNKvoEPkbeiUYaS0rtHrcB%2FiRVWtCoJRuNRM4QO9jagsBiRLJtO2GKSzY%2F5HZ%2FlfDr7TskuIrUVOIidEFueplq1CZyFaRtIpDNpVT1U4B+1hKQ9tUO5IegHbZW2v25n%2FPkMCvzT8VhOyofqSMnmmnvrbOgM+Iv818P9i4nwrwcFxmVp1IJzb+K9kIGu374hZNm3mQ9R%2Ffp1rgEUSqBYpmPsC7nlfd%2F2u9I1Wv4hH503Av8fKkuy4UarST1AORihm41SHkKI4ZrGPW09CIyzQN8BTce1LmsFaliy2ACEM5KtM63wOvRTiNYlPoe7xhtjt01cmwPU65ubJbnscfG6jMeT8+qS%2FlWpwV96w2BEXN%2FHn2P9Fw%3D%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1"; + const octetStringSHA256: string = + "SAMLRequest=fZJbTwIxEIX%2Fyqbvy3Yv3BogQYiRBJWw6INvY3eAJt0WO10v%2F966YIKJkPRpek7nfDMdEdT6IKaN35s1vjVIPvqstSHRXoxZ44ywQIqEgRpJeCnK6f1SZB0uDs56K61mZ5brDiBC55U1LFrMx2wrB8P%2BIB%2FGeQHbuOgVwxigB3EqewXfDjDPZJ9Fz%2BgoWMYsvBB8RA0uDHkwPpR42o1THvNswzMRTtHtpEX2wqJ5QFEGfOvce38QSaKtBL235EXOeZoQ2aRUZqexVDvzaEp070pikveG3W5otTrx3ShTBdl1tNejiMTdZrOKV4%2FlhkXTX9yZNdTU6E4dntbLfzIVnGdtJpDEJqOfaYqW1k0ua2v0UIGHUXKuHx3X%2BhBSLuYrq5X8im6tq8Ffhkg7aVtRVbxtpQJrUHpaVQ6JAozW9mPmEDyGzYEmZMnk2PbvB5p8Aw%3D%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256"; + const octetStringSHA512: string = + "SAMLRequest=fZJfT8IwFMW%2FytL3sY5tCA0jQYiRBIUw9MG3a3cnTboWezv%2FfHvr0AQT9fX2nJ7zu%2B2UoNVHMe%2F8wezwuUPy0VurDYn%2BoGSdM8ICKRIGWiThpajmN2sxHHBxdNZbaTU7s%2FzvACJ0XlnDotWyZFBkDcAE47wZjeNcXqTxGAsZy0lR1EUzAiwaFt2jo2ApWbgh%2BIg6XBnyYHwY8bSIUx7z4Z4PRZaLbDLg4%2FyBRcuAogz43nnw%2FiiSRFsJ%2BmDJi4zzNCGySaXMk8ZKPZmNqdC9KIlJNgr5IWr7xXepTB1k%2F6M9nkQkrvf7bbzdVHsWzb9xF9ZQ16L7SrjbrX%2FplHM%2B7DuBJDabfm5T9LRu9re2RQ81eJgm5%2Frp6VlvQ8vVcmu1ku%2FRlXUt%2BL8h0kHaT1QdN71UYAtKz%2BvaIVGA0dq%2BLhyCx5I1oAlZMjvF%2FvxAsw8%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha512"; + const signatureB64SHA512: string = + "pLoxKnpOVA1mvLpOZCyzCyB/P01Qcy7cEFskzycm5sdNFYjmZAMGT6yxCgTRvzIloX2J7abZdAkU1dA8kY2yPQrWCuQFOxeSCqnGpHg5/bBKzFiGwWtlyHgh7LXEEo2zKWspJh7BhwRIbtOAnN3XvCPDO58wKHnEdxo9TneTyFmy5hcfYKcF7LlI8jSFkmsPvCsMMJ8TawgnKlwdIU0Ze/cp64Y24cpYxVIKtCC950VRuxAt3bmr7pqtIEsHKkqTOrPv5pWo2XqRG0UhvzjYCbpC8aGOuqLe8hfTfgpQ6ebUkqrgAufkLrinOGpZrlQQDFr0iVIKR30bInDGjg2G+g=="; + const signatureB64SHA256: string = + "iC7RXfHuIu4gBLGABv0qtt96XFvyC7QSX8cDyLjJj+WNOTRMO5J/AYKelVhuc2AZuyGcf/sfeeVmcW7wyKTBHiGS+AWUCljmG43mPWERPfsa7og+GxrsHDSFh5nD70mQF44bXvpo/oVOxHx/lPiDG5LZg2KBccNXqJxMVUhnyU6xeGBctYY5ZQ4y7MGOx7hWTWjHyv+wyFd44Bcq0kpunTls91z03GkYo/Oxd4KllbfR5D2v6awjrc79wMYL1CcZiKZ941ter6tHOHCwtZRhTqV3Dl42zOKUOCyGcjJnVzJre1QBA7hrn3WB5/fu5kE6/E9ENRWp8ZRJLbU8C2Oogg=="; + const signatureB64SHA1: string = + "UKPzYQivZOavFV3QjOH/B9AwKls9n5hZIzOL+V93Yi7lJ7siNkAA9WZgErtFVpDTN6ngSwvlfP/hXZcS33RcCGBWi1SX+xuwuk2U7bZgdkkw4tIH8zcgiRy8bK0IpMoXmLbApU2QsiNwRDMZq3iQdlaMhlsJh85VI+90SQk7fewseiw5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FRRUxCUUFEZ2dFQkFHNGxZWDNLUVhlbmV6NExwRG5aaGNGQkVaaTlZc3RVS1BGNUVLZCtXcGxwVmJjVFFjMUEzL1ordUhSbXlWOGgrcFF6ZUY2TGlvYjM3Rzg3WXBhY1BwbEpJNjZjZjJSajdqOGhTQk5iZHIrNjZFMnFwY0VoQUYxaUptekJOeWhiL3lkbEV1VnBuOC9Fc29QK0h2QmVpRGw1Z29uMzU2Mk16WklnVi9wTGRUZnhIeVc2aHpBUWhqR3EyVWhjdlIrZ1hOVkp2SFAyZVM0amxIbkprQjliZm8wa3ZmODdRK0Q2WEtYM3E1YzNtTzh0cVc2VXBxSFNDK3VMRXB6WmlOTGV1RmE0VFVJaGdCZ2pEamxSck5ES3U4bmRhbmNTbjN5QkhZbnFKMnQ5Y1IrY29Gbm5qWUFCUXBOcnZrNG10bVhZOFNYb0J6WUc5WStscWVBdW42KzBZeUU9PC9YNTA5Q2VydGlmaWNhdGU+PC9YNTA5RGF0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9zYW1scDpBdXRoblJlcXVlc3Q+"; + + test("sign a SAML message with RSA-SHA1", (t: ExecutionContext) => { + t.is( + libsaml + .constructMessageSignature(octetString, _spPrivPem, _spPrivKeyPass) + .toString(), + signatureB64SHA1 + ); + }); + test("sign a SAML message with RSA-SHA256", (t: ExecutionContext) => { + t.is( + libsaml + .constructMessageSignature( + octetStringSHA256, + _spPrivPem, + _spPrivKeyPass, + undefined, + signatureAlgorithms.RSA_SHA256 + ) + .toString(), + signatureB64SHA256 + ); + }); + test("sign a SAML message with RSA-SHA512", (t: ExecutionContext) => { + t.is( + libsaml + .constructMessageSignature( + octetStringSHA512, + _spPrivPem, + _spPrivKeyPass, + undefined, + signatureAlgorithms.RSA_SHA512 + ) + .toString(), + signatureB64SHA512 + ); + }); + test("verify binary SAML message signed with RSA-SHA1", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetString, + _spPrivPem, + _spPrivKeyPass, + false + ); + t.is( + libsaml.verifyMessageSignature(SPMetadata, octetString, signature), + true + ); + }); + test("verify binary SAML message signed with RSA-SHA256", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetStringSHA256, + _spPrivPem, + _spPrivKeyPass, + false, + signatureAlgorithms.RSA_SHA256 + ); + t.is( + libsaml.verifyMessageSignature( + SPMetadata, + octetStringSHA256, + signature, + signatureAlgorithms.RSA_SHA256 + ), + true + ); + }); + test("verify binary SAML message signed with RSA-SHA512", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetStringSHA512, + _spPrivPem, + _spPrivKeyPass, + false, + signatureAlgorithms.RSA_SHA512 + ); + t.is( + libsaml.verifyMessageSignature( + SPMetadata, + octetStringSHA512, + signature, + signatureAlgorithms.RSA_SHA512 + ), + true + ); + }); + test("verify stringified SAML message signed with RSA-SHA1", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetString, + _spPrivPem, + _spPrivKeyPass + ); + t.is( + libsaml.verifyMessageSignature( + SPMetadata, + octetString, + Buffer.from(signature, "base64") + ), + true + ); + }); + test("verify stringified SAML message signed with RSA-SHA256", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetStringSHA256, + _spPrivPem, + _spPrivKeyPass + ); + t.is( + libsaml.verifyMessageSignature( + SPMetadata, + octetStringSHA256, + Buffer.from(signature, "base64") + ), + true + ); + }); + test("verify stringified SAML message signed with RSA-SHA512", (t: ExecutionContext) => { + const signature = libsaml.constructMessageSignature( + octetStringSHA512, + _spPrivPem, + _spPrivKeyPass + ); + t.is( + libsaml.verifyMessageSignature( + SPMetadata, + octetStringSHA512, + Buffer.from(signature, "base64") + ), + true + ); + }); + test("construct signature with RSA-SHA1", (t: ExecutionContext) => { + t.is( + libsaml.constructSAMLSignature({ + rawSamlMessage: _originRequest, + referenceTagXPath: libsaml.createXPath("Issuer"), + signingCert: SPMetadata.getX509Certificate("signing") as string, + privateKey: _spPrivPem, + privateKeyPass: _spPrivKeyPass, + signatureAlgorithm: signatureAlgorithms.RSA_SHA1, + }), + dummySignRequest + ); + }); + test("construct signature with RSA-SHA256", (t: ExecutionContext) => { + t.is( + libsaml.constructSAMLSignature({ + rawSamlMessage: _originRequest, + referenceTagXPath: libsaml.createXPath("Issuer"), + signingCert: SPMetadata.getX509Certificate("signing") as string, + privateKey: _spPrivPem, + privateKeyPass: _spPrivKeyPass, + signatureAlgorithm: signatureAlgorithms.RSA_SHA256, + }), + dummySignRequestSHA256 + ); + }); + test("construct signature with RSA-SHA512", (t: ExecutionContext) => { + t.is( + libsaml.constructSAMLSignature({ + rawSamlMessage: _originRequest, + referenceTagXPath: libsaml.createXPath("Issuer"), + signingCert: SPMetadata.getX509Certificate("signing") as string, + privateKey: _spPrivPem, + privateKeyPass: _spPrivKeyPass, + signatureAlgorithm: signatureAlgorithms.RSA_SHA512, + }), + dummySignRequestSHA512 + ); + }); + test("verify a XML signature signed by RSA-SHA1 with metadata", (t: ExecutionContext) => { + t.is( + libsaml.verifySignature(_decodedResponse, { metadata: IdPMetadata })[0], + true + ); + }); + test("integrity check for request signed with RSA-SHA1", (t: ExecutionContext) => { try { - libsaml.verifySignature(_falseDecodedRequestSHA1, { metadata: SPMetadata, signatureAlgorithm: signatureAlgorithms.RSA_SHA1 }); + libsaml.verifySignature(_falseDecodedRequestSHA1, { + metadata: SPMetadata, + signatureAlgorithm: signatureAlgorithms.RSA_SHA1, + }); } catch (e) { - t.is(e.message, 'ERR_FAILED_TO_VERIFY_SIGNATURE'); + t.is(e.message, "ERR_FAILED_TO_VERIFY_SIGNATURE"); } }); - test('verify a XML signature signed by RSA-SHA256 with metadata', t => { - t.is(libsaml.verifySignature(_decodedRequestSHA256, { metadata: SPMetadata, signatureAlgorithm: signatureAlgorithms.RSA_SHA256 })[0], true); + test("verify a XML signature signed by RSA-SHA256 with metadata", (t: ExecutionContext) => { + t.is( + libsaml.verifySignature(_decodedRequestSHA256, { + metadata: SPMetadata, + signatureAlgorithm: signatureAlgorithms.RSA_SHA256, + })[0], + true + ); }); - test('integrity check for request signed with RSA-SHA256', t => { + test("integrity check for request signed with RSA-SHA256", (t: ExecutionContext) => { try { - libsaml.verifySignature(_falseDecodedRequestSHA256, { metadata: SPMetadata, signatureAlgorithm: signatureAlgorithms.RSA_SHA256 }); + libsaml.verifySignature(_falseDecodedRequestSHA256, { + metadata: SPMetadata, + signatureAlgorithm: signatureAlgorithms.RSA_SHA256, + }); } catch (e) { - t.is(e.message, 'ERR_FAILED_TO_VERIFY_SIGNATURE'); + t.is(e.message, "ERR_FAILED_TO_VERIFY_SIGNATURE"); } }); - test('verify a XML signature signed by RSA-SHA512 with metadata', t => { - t.is(libsaml.verifySignature(_decodedRequestSHA512, { metadata: SPMetadata, signatureAlgorithm: signatureAlgorithms.RSA_SHA512 })[0], true); + test("verify a XML signature signed by RSA-SHA512 with metadata", (t: ExecutionContext) => { + t.is( + libsaml.verifySignature(_decodedRequestSHA512, { + metadata: SPMetadata, + signatureAlgorithm: signatureAlgorithms.RSA_SHA512, + })[0], + true + ); }); - test('integrity check for request signed with RSA-SHA512', t => { + test("integrity check for request signed with RSA-SHA512", (t: ExecutionContext) => { try { - libsaml.verifySignature(_falseDecodedRequestSHA512, { metadata: SPMetadata, signatureAlgorithm: signatureAlgorithms.RSA_SHA512 }); + libsaml.verifySignature(_falseDecodedRequestSHA512, { + metadata: SPMetadata, + signatureAlgorithm: signatureAlgorithms.RSA_SHA512, + }); } catch (e) { - t.is(e.message, 'ERR_FAILED_TO_VERIFY_SIGNATURE'); + t.is(e.message, "ERR_FAILED_TO_VERIFY_SIGNATURE"); } }); - - test('verify a XML signature with metadata but with rolling certificate', t => { - - const responseSignedByCert1 = String(readFileSync('./test/misc/response_signed_cert1.xml')); - const responseSignedByCert2 = String(readFileSync('./test/misc/response_signed_cert2.xml')); - t.is(libsaml.verifySignature(responseSignedByCert1, { metadata: idpRollingCert.entityMeta, signatureAlgorithm: signatureAlgorithms.RSA_SHA256 })[0], true); - t.is(libsaml.verifySignature(responseSignedByCert2, { metadata: idpRollingCert.entityMeta, signatureAlgorithm: signatureAlgorithms.RSA_SHA256 })[0], true); - - }); - test('verify a XML signature signed by RSA-SHA1 with .cer keyFile', t => { - const xml = String(readFileSync('./test/misc/signed_request_sha1.xml')); - t.is(libsaml.verifySignature(xml, { keyFile: './test/key/sp/cert.cer' })[0], true); - }); - test('verify a XML signature signed by RSA-SHA256 with .cer keyFile', t => { - const xml = String(readFileSync('./test/misc/signed_request_sha256.xml')); - t.is(libsaml.verifySignature(xml, { keyFile: './test/key/sp/cert.cer' })[0], true); - }); - test('verify a XML signature signed by RSA-SHA512 with .cer keyFile', t => { - const xml = String(readFileSync('./test/misc/signed_request_sha512.xml')); - t.is(libsaml.verifySignature(xml, { keyFile: './test/key/sp/cert.cer' })[0], true); - }); - test('encrypt assertion test passes', async t => { - await t.notThrowsAsync(() => libsaml.encryptAssertion(idp, sp, sampleSignedResponse)); - }); - test('encrypt assertion response without assertion returns error', async t => { - const error = await t.throwsAsync(() => libsaml.encryptAssertion(idp, sp, wrongResponse)); - t.is(error.message, 'ERR_MULTIPLE_ASSERTION'); - }); - test('encrypt assertion with invalid xml syntax returns error', async t => { - const error = await t.throwsAsync(() => libsaml.encryptAssertion(idp, sp, 'This is not a xml format string')); - t.is(error.message, 'ERR_MULTIPLE_ASSERTION'); - }); - test('encrypt assertion with empty string returns error', async t => { - const error = await t.throwsAsync(() => libsaml.encryptAssertion(idp, sp, '')); - t.is(error.message, 'ERR_UNDEFINED_ASSERTION'); - }); - test('encrypt assertion with undefined string returns error', async t => { - const error = await t.throwsAsync(() => libsaml.encryptAssertion(idp, sp, undefined)); - t.is(error.message, 'ERR_UNDEFINED_ASSERTION'); - }); - test('building attribute statement with one attribute', t => { - const attributes = [{ - name: 'email', - valueTag: 'user.email', - nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', - valueXsiType: 'xs:string' - }]; - const expectedStatement = '{attrUserEmail}'; + test("verify a XML signature with metadata but with rolling certificate", (t: ExecutionContext) => { + const responseSignedByCert1 = String( + readFileSync("./test/misc/response_signed_cert1.xml") + ); + const responseSignedByCert2 = String( + readFileSync("./test/misc/response_signed_cert2.xml") + ); + t.is( + libsaml.verifySignature(responseSignedByCert1, { + metadata: idpRollingCert.entityMeta, + signatureAlgorithm: signatureAlgorithms.RSA_SHA256, + })[0], + true + ); + t.is( + libsaml.verifySignature(responseSignedByCert2, { + metadata: idpRollingCert.entityMeta, + signatureAlgorithm: signatureAlgorithms.RSA_SHA256, + })[0], + true + ); + }); + + test("verify a XML signature signed by RSA-SHA1 with .cer keyFile", (t: ExecutionContext) => { + const xml = String(readFileSync("./test/misc/signed_request_sha1.xml")); + t.is( + libsaml.verifySignature(xml, { keyFile: "./test/key/sp/cert.cer" })[0], + true + ); + }); + test("verify a XML signature signed by RSA-SHA256 with .cer keyFile", (t: ExecutionContext) => { + const xml = String(readFileSync("./test/misc/signed_request_sha256.xml")); + t.is( + libsaml.verifySignature(xml, { keyFile: "./test/key/sp/cert.cer" })[0], + true + ); + }); + test("verify a XML signature signed by RSA-SHA512 with .cer keyFile", (t: ExecutionContext) => { + const xml = String(readFileSync("./test/misc/signed_request_sha512.xml")); + t.is( + libsaml.verifySignature(xml, { keyFile: "./test/key/sp/cert.cer" })[0], + true + ); + }); + test("encrypt assertion test passes", async (t: ExecutionContext) => { + await t.notThrowsAsync(() => + libsaml.encryptAssertion(idp, sp, sampleSignedResponse) + ); + }); + test("encrypt assertion response without assertion returns error", async (t: ExecutionContext) => { + const error = await t.throwsAsync(() => + libsaml.encryptAssertion(idp, sp, wrongResponse) + ); + t.is(error.message, "ERR_MULTIPLE_ASSERTION"); + }); + test("encrypt assertion with invalid xml syntax returns error", async (t: ExecutionContext) => { + const error = await t.throwsAsync(() => + libsaml.encryptAssertion(idp, sp, "This is not a xml format string") + ); + t.is(error.message, "ERR_MULTIPLE_ASSERTION"); + }); + test("encrypt assertion with empty string returns error", async (t: ExecutionContext) => { + const error = await t.throwsAsync(() => + libsaml.encryptAssertion(idp, sp, "") + ); + t.is(error.message, "ERR_UNDEFINED_ASSERTION"); + }); + test("encrypt assertion with undefined string returns error", async (t: ExecutionContext) => { + const error = await t.throwsAsync(() => + libsaml.encryptAssertion(idp, sp, undefined) + ); + t.is(error.message, "ERR_UNDEFINED_ASSERTION"); + }); + test("building attribute statement with one attribute", (t: ExecutionContext) => { + const attributes = [ + { + name: "email", + valueTag: "user.email", + nameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", + valueXsiType: "xs:string", + }, + ]; + const expectedStatement = + '{attrUserEmail}'; t.is(libsaml.attributeStatementBuilder(attributes), expectedStatement); }); - test('building attribute statement with multiple attributes', t => { - const attributes = [{ - name: 'email', - valueTag: 'user.email', - nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', - valueXsiType: 'xs:string', - }, { - name: 'firstname', - valueTag: 'user.firstname', - nameFormat: 'urn:oasis:names:tc:SAML:2.0:attrname-format:basic', - valueXsiType: 'xs:string', - }]; - const expectedStatement = '{attrUserEmail}{attrUserFirstname}'; + test("building attribute statement with multiple attributes", (t: ExecutionContext) => { + const attributes = [ + { + name: "email", + valueTag: "user.email", + nameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", + valueXsiType: "xs:string", + }, + { + name: "firstname", + valueTag: "user.firstname", + nameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", + valueXsiType: "xs:string", + }, + ]; + const expectedStatement = + '{attrUserEmail}{attrUserFirstname}'; t.is(libsaml.attributeStatementBuilder(attributes), expectedStatement); }); })(); (() => { const baseConfig = { - signingCert: readFileSync('./test/key/sp/cert.cer'), - privateKey: readFileSync('./test/key/sp/privkey.pem'), - privateKeyPass: 'VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px', - entityID: 'http://sp', - nameIDFormat: ['urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'], - assertionConsumerService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Location: 'http://sp/acs', - Index: 1, - }], - singleLogoutService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Location: 'http://sp/slo', - Index: 1, - }], + signingCert: readFileSync("./test/key/sp/cert.cer"), + privateKey: readFileSync("./test/key/sp/privkey.pem"), + privateKeyPass: "VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px", + entityID: "http://sp", + nameIDFormat: ["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"], + assertionConsumerService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Location: "http://sp/acs", + Index: 1, + }, + ], + singleLogoutService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Location: "http://sp/slo", + Index: 1, + }, + ], }; - test('sp metadata with default elements order', t => { - t.is(serviceProvider(baseConfig).getMetadata(), 'MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE=urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'); - }); - test('sp metadata with shibboleth elements order', t => { - const spToShib = serviceProvider(Object.assign({}, baseConfig, { elementsOrder: ref.elementsOrder.shibboleth })); - t.is(spToShib.getMetadata(), 'MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE=urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'); + test("sp metadata with default elements order", (t: ExecutionContext) => { + t.is( + serviceProvider(baseConfig).getMetadata(), + 'MIIDozCCAougAwIBAgIJAKNsmL8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S4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE=urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + ); + }); + test("sp metadata with shibboleth elements order", (t: ExecutionContext) => { + const spToShib = serviceProvider( + Object.assign({}, baseConfig, { + elementsOrder: ref.elementsOrder.shibboleth, + }) + ); + t.is( + spToShib.getMetadata(), + 'MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE=urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress' + ); }); - })(); -test('verify time with and without drift tolerance', t => { - +test("verify time with and without drift tolerance", (t: ExecutionContext) => { const now = new Date(); - const timeBefore10Mins = new Date(new Date().setMinutes(now.getMinutes() - 10)).toISOString(); - const timeBefore5Mins = new Date(new Date().setMinutes(now.getMinutes() - 5)).toISOString(); - const timeAfter5Mins = new Date(new Date().setMinutes(now.getMinutes() + 5)).toISOString(); - const timeAfter10Mins = new Date(new Date().setMinutes(now.getMinutes() + 5)).toISOString(); + const timeBefore10Mins = new Date( + new Date().setMinutes(now.getMinutes() - 10) + ).toISOString(); + const timeBefore5Mins = new Date( + new Date().setMinutes(now.getMinutes() - 5) + ).toISOString(); + const timeAfter5Mins = new Date( + new Date().setMinutes(now.getMinutes() + 5) + ).toISOString(); + const timeAfter10Mins = new Date( + new Date().setMinutes(now.getMinutes() + 5) + ).toISOString(); // without drift tolerance t.true(verifyTime(timeBefore5Mins, timeAfter5Mins)); t.true(verifyTime(timeBefore5Mins, undefined)); t.true(verifyTime(undefined, timeAfter5Mins)); - + t.false(verifyTime(undefined, timeBefore5Mins)); t.false(verifyTime(timeAfter5Mins, undefined)); t.false(verifyTime(timeBefore10Mins, timeBefore5Mins)); @@ -361,54 +604,67 @@ test('verify time with and without drift tolerance', t => { t.true(verifyTime(timeAfter5Mins, undefined, drifts)); t.true(verifyTime(timeBefore10Mins, timeBefore5Mins, drifts)); t.true(verifyTime(timeAfter5Mins, timeAfter10Mins, drifts)); - + t.true(verifyTime(undefined, undefined, drifts)); }); - -test('metadata with multiple entity descriptors is invalid', t => { +test("metadata with multiple entity descriptors is invalid", (t: ExecutionContext) => { try { - identityProvider({ ...defaultIdpConfig, metadata: readFileSync('./test/misc/multiple_entitydescriptor.xml') }); + identityProvider({ + ...defaultIdpConfig, + metadata: readFileSync("./test/misc/multiple_entitydescriptor.xml"), + }); t.fail(); } catch ({ message }) { - t.is(message, 'ERR_MULTIPLE_METADATA_ENTITYDESCRIPTOR'); + t.is(message, "ERR_MULTIPLE_METADATA_ENTITYDESCRIPTOR"); } }); -test('undefined x509 key in metadata should return null', t => { - t.is(idp.entityMeta.getX509Certificate('undefined'), null); - t.is(sp.entityMeta.getX509Certificate('undefined'), null); +test("undefined x509 key in metadata should return null", (t: ExecutionContext) => { + t.is(idp.entityMeta.getX509Certificate("undefined"), null); + t.is(sp.entityMeta.getX509Certificate("undefined"), null); }); -test('return list of x509 key in metadata when multiple keys are used', t => { - t.is(Array.isArray(idpRollingCert.entityMeta.getX509Certificate('signing')), true); - t.is(idpRollingCert.entityMeta.getX509Certificate('signing').length, 2); - t.is(typeof idpRollingCert.entityMeta.getX509Certificate('encryption'), 'string'); +test("return list of x509 key in metadata when multiple keys are used", (t: ExecutionContext) => { + t.is( + Array.isArray(idpRollingCert.entityMeta.getX509Certificate("signing")), + true + ); + t.is(idpRollingCert.entityMeta.getX509Certificate("signing").length, 2); + t.is( + typeof idpRollingCert.entityMeta.getX509Certificate("encryption"), + "string" + ); }); -test('get name id format in metadata', t => { - t.is(sp.entityMeta.getNameIDFormat(), 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'); +test("get name id format in metadata", (t: ExecutionContext) => { + t.is( + sp.entityMeta.getNameIDFormat(), + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" + ); t.is(Array.isArray(idp.entityMeta.getNameIDFormat()), true); }); -test('get entity setting', t => { - t.is(typeof idp.getEntitySetting(), 'object'); - t.is(typeof sp.getEntitySetting(), 'object'); +test("get entity setting", (t: ExecutionContext) => { + t.is(typeof idp.getEntitySetting(), "object"); + t.is(typeof sp.getEntitySetting(), "object"); }); -test('contains shared certificate for both signing and encryption in metadata', t => { - const metadata = idpMetadata(readFileSync('./test/misc/idpmeta_share_cert.xml')); - const signingCertificate = metadata.getX509Certificate('signing'); - const encryptionCertificate = metadata.getX509Certificate('encryption'); +test("contains shared certificate for both signing and encryption in metadata", (t: ExecutionContext) => { + const metadata = idpMetadata( + readFileSync("./test/misc/idpmeta_share_cert.xml") + ); + const signingCertificate = metadata.getX509Certificate("signing"); + const encryptionCertificate = metadata.getX509Certificate("encryption"); t.not(signingCertificate, null); t.not(encryptionCertificate, null); t.is(signingCertificate, encryptionCertificate); }); -test('contains explicit certificate declaration for signing and encryption in metadata', t => { - const signingCertificate = IdPMetadata.getX509Certificate('signing'); - const encryptionCertificate = IdPMetadata.getX509Certificate('encryption'); +test("contains explicit certificate declaration for signing and encryption in metadata", (t: ExecutionContext) => { + const signingCertificate = IdPMetadata.getX509Certificate("signing"); + const encryptionCertificate = IdPMetadata.getX509Certificate("encryption"); t.not(signingCertificate, null); t.not(encryptionCertificate, null); t.not(signingCertificate, encryptionCertificate); -}); \ No newline at end of file +}); diff --git a/test/issues.ts b/test/issues.ts index f9130321..19ac1e16 100644 --- a/test/issues.ts +++ b/test/issues.ts @@ -1,11 +1,11 @@ -import esaml2 = require('../index'); -import { readFileSync, writeFileSync } from 'fs'; -import test from 'ava'; -import * as fs from 'fs'; -import * as url from 'url'; -import { DOMParser as dom } from 'xmldom'; -import { xpath as select } from 'xml-crypto'; -import { extract } from '../src/extractor'; +import esaml2 = require("../index"); +import * as fs from "fs"; +import { readFileSync } from "fs"; +import test, { ExecutionContext } from "ava"; +import * as url from "url"; +import { DOMParser as dom } from "xmldom"; +import { xpath as select } from "xml-crypto"; +import { extract } from "../src/extractor"; const { IdentityProvider: identityProvider, @@ -20,17 +20,17 @@ const { const getQueryParamByType = libsaml.getQueryParamByType; const wording = ref.wording; -test('#31 query param for sso/slo is SamlRequest', t => { - t.is(getQueryParamByType('SAMLRequest'), wording.urlParams.samlRequest); - t.is(getQueryParamByType('LogoutRequest'), wording.urlParams.samlRequest); +test("#31 query param for sso/slo is SamlRequest", (t: ExecutionContext) => { + t.is(getQueryParamByType("SAMLRequest"), wording.urlParams.samlRequest); + t.is(getQueryParamByType("LogoutRequest"), wording.urlParams.samlRequest); }); -test('#31 query param for sso/slo is SamlResponse', t => { - t.is(getQueryParamByType('SAMLResponse'), wording.urlParams.samlResponse); - t.is(getQueryParamByType('LogoutResponse'), wording.urlParams.samlResponse); +test("#31 query param for sso/slo is SamlResponse", (t: ExecutionContext) => { + t.is(getQueryParamByType("SAMLResponse"), wording.urlParams.samlResponse); + t.is(getQueryParamByType("LogoutResponse"), wording.urlParams.samlResponse); }); -test('#31 query param for sso/slo returns error', t => { +test("#31 query param for sso/slo returns error", (t: ExecutionContext) => { try { - getQueryParamByType('samlRequest'); + getQueryParamByType("samlRequest"); t.fail(); } catch (e) { t.pass(); @@ -39,40 +39,52 @@ test('#31 query param for sso/slo returns error', t => { (() => { const spcfg = { - entityID: 'sp.example.com', - nameIDFormat: ['urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'], - assertionConsumerService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Location: 'sp.example.com/acs', - }, { - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Location: 'sp.example.com/acs', - }], - singleLogoutService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Location: 'sp.example.com/slo', - }, { - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Location: 'sp.example.com/slo', - }], + entityID: "sp.example.com", + nameIDFormat: ["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"], + assertionConsumerService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Location: "sp.example.com/acs", + }, + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Location: "sp.example.com/acs", + }, + ], + singleLogoutService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Location: "sp.example.com/slo", + }, + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Location: "sp.example.com/slo", + }, + ], }; const idpcfg = { - entityID: 'idp.example.com', - nameIDFormat: ['urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'], - singleSignOnService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Location: 'idp.example.com/sso', - }, { - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Location: 'idp.example.com/sso', - }], - singleLogoutService: [{ - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - Location: 'idp.example.com/sso/slo', - }, { - Binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - Location: 'idp.example.com/sso/slo', - }], + entityID: "idp.example.com", + nameIDFormat: ["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"], + singleSignOnService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Location: "idp.example.com/sso", + }, + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Location: "idp.example.com/sso", + }, + ], + singleLogoutService: [ + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Location: "idp.example.com/sso/slo", + }, + { + Binding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Location: "idp.example.com/sso/slo", + }, + ], }; const idp = identityProvider(idpcfg); const sp = serviceProvider(spcfg); @@ -80,88 +92,118 @@ test('#31 query param for sso/slo returns error', t => { const idpxml = idp.getMetadata(); const acs = extract(spxml, [ { - key: 'assertionConsumerService', - localPath: ['EntityDescriptor', 'SPSSODescriptor', 'AssertionConsumerService'], - attributes: ['Binding', 'Location', 'isDefault', 'index'], - } + key: "assertionConsumerService", + localPath: [ + "EntityDescriptor", + "SPSSODescriptor", + "AssertionConsumerService", + ], + attributes: ["Binding", "Location", "isDefault", "index"], + }, ]); const spslo = extract(spxml, [ { - key: 'singleLogoutService', - localPath: ['EntityDescriptor', 'SPSSODescriptor', 'SingleLogoutService'], - attributes: ['Binding', 'Location', 'isDefault', 'index'], - } + key: "singleLogoutService", + localPath: ["EntityDescriptor", "SPSSODescriptor", "SingleLogoutService"], + attributes: ["Binding", "Location", "isDefault", "index"], + }, ]); const sso = extract(idpxml, [ { - key: 'singleSignOnService', - localPath: ['EntityDescriptor', 'IDPSSODescriptor', 'SingleSignOnService'], - attributes: ['Binding', 'Location', 'isDefault', 'index'], - } + key: "singleSignOnService", + localPath: [ + "EntityDescriptor", + "IDPSSODescriptor", + "SingleSignOnService", + ], + attributes: ["Binding", "Location", "isDefault", "index"], + }, ]); const idpslo = extract(idpxml, [ { - key: 'singleLogoutService', - localPath: ['EntityDescriptor', 'IDPSSODescriptor', 'SingleLogoutService'], - attributes: ['Binding', 'Location', 'isDefault', 'index'], - } + key: "singleLogoutService", + localPath: [ + "EntityDescriptor", + "IDPSSODescriptor", + "SingleLogoutService", + ], + attributes: ["Binding", "Location", "isDefault", "index"], + }, ]); - const sp98 = serviceProvider({ metadata: fs.readFileSync('./test/misc/sp_metadata_98.xml') }); - test('#33 sp metadata acs index should be increased by 1', t => { + const sp98 = serviceProvider({ + metadata: fs.readFileSync("./test/misc/sp_metadata_98.xml"), + }); + test("#33 sp metadata acs index should be increased by 1", (t: ExecutionContext) => { t.is(acs.assertionConsumerService.length, 2); - t.is(acs.assertionConsumerService[0].index, '0'); - t.is(acs.assertionConsumerService[1].index, '1'); + t.is(acs.assertionConsumerService[0].index, "0"); + t.is(acs.assertionConsumerService[1].index, "1"); }); - test('#352 no index attribute for sp SingleLogoutService nodes', t => { + test("#352 no index attribute for sp SingleLogoutService nodes", (t: ExecutionContext) => { t.is(spslo.singleLogoutService.length, 2); t.is(spslo.singleLogoutService[0].index, undefined); t.is(spslo.singleLogoutService[1].index, undefined); }); - test('#352 no index attribute for idp SingleSignOnService nodes', t => { + test("#352 no index attribute for idp SingleSignOnService nodes", (t: ExecutionContext) => { t.is(sso.singleSignOnService.length, 2); t.is(sso.singleSignOnService[0].index, undefined); t.is(sso.singleSignOnService[1].index, undefined); }); - test('#352 no index attribute for idp SingleLogoutService nodes', t => { + test("#352 no index attribute for idp SingleLogoutService nodes", (t: ExecutionContext) => { t.is(idpslo.singleLogoutService.length, 2); t.is(idpslo.singleLogoutService[0].index, undefined); t.is(idpslo.singleLogoutService[1].index, undefined); }); - test('#86 duplicate issuer throws error', t => { - const xml = readFileSync('./test/misc/dumpes_issuer_response.xml'); - const { issuer } = extract(xml.toString(), [{ - key: 'issuer', - localPath: [ - ['Response', 'Issuer'], - ['Response', 'Assertion', 'Issuer'] - ], - attributes: [] - }]); + test("#86 duplicate issuer throws error", (t: ExecutionContext) => { + const xml = readFileSync("./test/misc/dumpes_issuer_response.xml"); + const { issuer } = extract(xml.toString(), [ + { + key: "issuer", + localPath: [ + ["Response", "Issuer"], + ["Response", "Assertion", "Issuer"], + ], + attributes: [], + }, + ]); t.is(issuer.length, 1); - t.is(issuer.every(i => i === 'http://www.okta.com/dummyIssuer'), true); + t.is( + issuer.every((i: string) => i === "http://www.okta.com/dummyIssuer"), + true + ); }); - test('#87 add existence check for signature verification', t => { + test("#87 add existence check for signature verification", (t: ExecutionContext) => { try { - libsaml.verifySignature(readFileSync('./test/misc/response.xml').toString(), {}); + libsaml.verifySignature( + readFileSync("./test/misc/response.xml").toString() + ); t.fail(); } catch ({ message }) { - t.is(message, 'ERR_ZERO_SIGNATURE'); + t.is(message, "ERR_ZERO_SIGNATURE"); } }); - test('#91 idp gets single sign on service from the metadata', t => { - t.is(idp.entityMeta.getSingleSignOnService('post'), 'idp.example.com/sso'); + test("#91 idp gets single sign on service from the metadata", (t: ExecutionContext) => { + t.is(idp.entityMeta.getSingleSignOnService("post"), "idp.example.com/sso"); }); - - test('#98 undefined AssertionConsumerServiceURL with redirect request', t => { - const { id, context } = sp98.createLoginRequest(idp, 'redirect'); + + test("#98 undefined AssertionConsumerServiceURL with redirect request", (t: ExecutionContext) => { + const { id, context } = sp98.createLoginRequest(idp, "redirect"); const originalURL = url.parse(context, true); const request = originalURL.query.SAMLRequest as string; const rawRequest = utility.inflateString(decodeURIComponent(request)); const xml = new dom().parseFromString(rawRequest); - const authnRequest = select(xml, "/*[local-name(.)='AuthnRequest']")[0]; - const index = Object.keys(authnRequest.attributes).find((i: string) => authnRequest.attributes[i].nodeName === 'AssertionConsumerServiceURL') as any; - t.is(authnRequest.attributes[index].nodeValue, 'https://example.org/response'); + const authnRequest: any = select( + xml, + "/*[local-name(.)='AuthnRequest']" + )[0]; + const index = Object.keys(authnRequest.attributes).find( + (i: string) => + authnRequest.attributes[i].nodeName === "AssertionConsumerServiceURL" + ) as any; + t.is( + authnRequest.attributes[index].nodeValue, + "https://example.org/response" + ); }); -})(); \ No newline at end of file +})(); diff --git a/test/key/idp/README.md b/test/key/idp/README.md index d9b165c4..6e789d68 100644 --- a/test/key/idp/README.md +++ b/test/key/idp/README.md @@ -1,4 +1,4 @@ ## Support the use case of rolling certificate -* `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` -* `privkey2.pem` - no password protected, it generates `cert2.cer` \ No newline at end of file +- `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` +- `privkey2.pem` - no password protected, it generates `cert2.cer` diff --git a/tsconfig.json b/tsconfig.json index 946e97a7..52bf1872 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "lib": ["dom", "es2015.core", "es2015.promise", "es2015.iterable", "es5"], "target": "es5", "module": "commonjs", "moduleResolution": "node", @@ -13,21 +14,13 @@ "baseUrl": "./", "removeComments": false, "strictNullChecks": true, - "paths": {}, - "lib": [ - "dom", - "es2015.core", - "es2015.promise", - "es2015.iterable", - "es5" - ] + "allowSyntheticDefaultImports": true, + "paths": {} }, - "atom": { "rewriteTsconfig": false }, - "exclude": [ - "node_modules", - "types/**/*.ts", - "test/**/*.ts" - ], + "atom": { + "rewriteTsconfig": false + }, + "exclude": ["node_modules", "types/**/*.ts", "test/**/*.ts"], "compileOnSave": false, "buildOnSave": false } diff --git a/tslint.json b/tslint.json index e2b2917c..4e4a080f 100644 --- a/tslint.json +++ b/tslint.json @@ -1,35 +1,38 @@ { - "extends": "tslint:recommended", - "rulesDirectory": [], - "linterOptions": { - "exclude": [ - "node_modules/**" - ] - }, - "rules": { - "arrow-parens": [true, "ban-single-arg-parens"], - "comment-format": false, - "interface-name": [true, "never-prefix"], - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "no-console": [false], - "no-consecutive-blank-lines": [true, 3], - "no-empty-interface": false, - "no-string-literal": false, - "object-literal-sort-keys": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "trailing-comma": false, - "eofline": false, - "no-empty": false, - "align": false, - "no-trailing-whitespace": false, - "ordered-imports": false, - "quotemark": [true, "single", "avoid-escape", "avoid-template"], - "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"], - "interface-over-type-literal": false, - "no-var-requires": false - }, - "jsRules": {} + "extends": "tslint:recommended", + "rulesDirectory": [], + "linterOptions": { + "exclude": ["node_modules/**"] + }, + "rules": { + "arrow-parens": [true, "ban-single-arg-parens"], + "comment-format": false, + "interface-name": [true, "never-prefix"], + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "no-console": [false], + "no-consecutive-blank-lines": [true, 3], + "no-empty-interface": false, + "no-string-literal": false, + "object-literal-sort-keys": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "trailing-comma": false, + "eofline": false, + "no-empty": false, + "align": false, + "no-trailing-whitespace": false, + "ordered-imports": false, + "variable-name": [ + true, + "ban-keywords", + "check-format", + "allow-leading-underscore", + "allow-pascal-case" + ], + "interface-over-type-literal": false, + "no-var-requires": false + }, + "jsRules": {} } diff --git a/types.d.ts b/types.d.ts index 8f37c925..fa716dd5 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,2 +1,2 @@ -export * from './index' -export * from './src/types' \ No newline at end of file +export * from "./index"; +export * from "./src/types"; diff --git a/yarn.lock b/yarn.lock index 172bba85..b856a259 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,18 @@ # yarn lockfile v1 +"@authenio/samlify-xsd-schema-validator@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@authenio/samlify-xsd-schema-validator/-/samlify-xsd-schema-validator-1.0.3.tgz#7e30a5a3a4af302f43095fec1eb9d3fd29778142" + integrity sha512-J4yC4S6Jn8bd9AXIdytzuFprrpDrRoV5TUoH135fFirx8CE1wUzy5xKYPXi8juDRylsIKOGpXEY3voCPIWYxGg== + dependencies: + "@authenio/xsd-schema-validator" "^0.7.1" + +"@authenio/xsd-schema-validator@^0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@authenio/xsd-schema-validator/-/xsd-schema-validator-0.7.1.tgz#3264c1b781d5192fe46cb5207d6ce51a706eed07" + integrity sha512-LfxalSt34Z6V2MKBRExfDBXHwLO3PycKaI0+k4nM1ei5rLJZHqU3C/vYm+LaA1nba6cu+cVXQY8zez3R0ZKl+w== + "@ava/typescript@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@ava/typescript/-/typescript-1.1.1.tgz#3dcaba3aced8026fdb584d927d809752854dc6e6" @@ -263,10 +275,17 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/node-forge@^0.7.4": - version "0.7.12" - resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.7.12.tgz#24b0bbbbc2c8163379e976a8fd27c7950a271cbc" - integrity sha512-cLUoHEUZvAW6bX1mAwi2n1DHcwZ0fSzpmKiMf0AVK2sN4wQhy+IkHdHLGNq8I1/2ePsjraEpKRPlJ3eYMy0iVg== +"@types/node-forge@^0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.9.4.tgz#3a81edafed5022eba8e63338ef4b04def04c61f1" + integrity sha512-uFhaKXdhhrLNzfNhXbXJqDwF3jXMzN9qfkdW+IAMnAfwqNZhBcE/cciMITLT0Sg6ls6JYHo3xVWNXAG1g9tm8A== + dependencies: + "@types/node" "*" + +"@types/node-rsa@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/node-rsa/-/node-rsa-1.0.0.tgz#4432df6227c5de734f5f0fbea2420ffb51c51e44" + integrity sha512-9hTSXhGDKotpq5XCm+r7wMgt5gl6bGH6VS/sV9bsKda4JmJYyOCdTenSkTUh7zsOihm2oCm5o2ZdfpUIGYKLzQ== dependencies: "@types/node" "*" @@ -275,10 +294,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== -"@types/node@^11.11.3": - version "11.15.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.15.12.tgz#bf5d348c4d37c026029ad81e874946fa6ad100ba" - integrity sha512-iefeBfpmhoYaZfj+gJM5z9H9eiTwhuzhPsJgH/flx4HP2SBI2FNDra1D3vKljqPLGDr9Cazvh9gP9Xszc30ncA== +"@types/node@^14.0.23": + version "14.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" + integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -290,27 +309,40 @@ resolved "https://registry.yarnpkg.com/@types/pako/-/pako-1.0.1.tgz#33b237f3c9aff44d0f82fe63acffa4a365ef4a61" integrity sha512-GdZbRSJ3Cv5fiwT6I0SQ3ckeN2PWNqxd26W9Z2fCK1tGrrasGy4puvNFtnddqH9UJFMQYXxEuuB7B8UK+LLwSg== -"@types/uuid@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.0.0.tgz#be93b14bcf97f59c079a9e58754960b5efd946c3" - integrity sha512-CGaBAcUB4o+YTaUBZ2VfBc7PcIZXwHflZs4FDtr5Kk7MpAl0PVfH7W/VqoHH+OAG41d9YSCV8eWDfz/KKqVm+A== +"@types/uuid@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.0.0.tgz#165aae4819ad2174a17476dbe66feebd549556c0" + integrity sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== + +"@types/xml-crypto@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@types/xml-crypto/-/xml-crypto-1.4.1.tgz#30824290c0b867302269e7ff31fc62fb6494ce18" + integrity sha512-w7pI4Gq1buWinzLsDopd4du0sUzlSltT7QfHqknLu+hVuFWTXLzJnAOmYKuD20ncx3XCkYNwSRr2sKeYiwCvZw== dependencies: "@types/node" "*" + xpath "0.0.27" -"@types/xmldom@^0.1.28": - version "0.1.29" - resolved "https://registry.yarnpkg.com/@types/xmldom/-/xmldom-0.1.29.tgz#c4428b0ca86d3b881475726fd94980b38a27c381" - integrity sha1-xEKLDKhtO4gUdXJv2UmAs4onw4E= +"@types/xml@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/xml/-/xml-1.0.5.tgz#5f647b6719cdbcfd026d7e73f295035e49cae0bd" + integrity sha512-h3PVM7waRi2UeoaY2BhpLGvettU/3vfCbsjXMV/9Ex5WjvIy82J8Qfp1xiPxM4kTSOLdFFpjRwQ7YY7XJeKBvg== + dependencies: + "@types/node" "*" -acorn-walk@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" - integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== +"@types/xmldom@^0.1.30": + version "0.1.30" + resolved "https://registry.yarnpkg.com/@types/xmldom/-/xmldom-0.1.30.tgz#d36d9a7d64af4693d3b18d5dc02ce432a95be12e" + integrity sha512-edqgAFXMEtVvaBZ3YnhamvmrHjoYpuxETmnb0lbTZmf/dXpAsO9ZKotUO4K2rn2SIZBDFCMOuA7fOe0H6dRZcA== -acorn@^7.1.1: +acorn-walk@^7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe" - integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + +acorn@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" + integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== aggregate-error@^3.0.0: version "3.0.1" @@ -446,42 +478,42 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -ava@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/ava/-/ava-3.8.2.tgz#877c9eb861763a185bbabd54f359e1fbe57d1754" - integrity sha512-sph3oUsVTGsq4qbgeWys03QKCmXjkZUO3oPnFWXEW6g1SReCY9vuONGghMgw1G6VOzkg1k+niqJsOzwfO8h9Ng== +ava@^3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/ava/-/ava-3.10.1.tgz#a4e68b1a2bb248fa0d96529d23dd83f57082e944" + integrity sha512-+w86ZHyFHIGCABi7NUrn/WJMyC+fDj0BSIlFNVS45WDKAD5vxbIiDWeclctxOOc2KDPfQD7tFOURSBz0FBLD0A== dependencies: "@concordance/react" "^2.0.0" - acorn "^7.1.1" - acorn-walk "^7.1.1" + acorn "^7.3.1" + acorn-walk "^7.2.0" ansi-styles "^4.2.1" arrgv "^1.0.2" arrify "^2.0.1" callsites "^3.1.0" - chalk "^4.0.0" + chalk "^4.1.0" chokidar "^3.4.0" chunkd "^2.0.1" ci-info "^2.0.0" - ci-parallel-vars "^1.0.0" + ci-parallel-vars "^1.0.1" clean-yaml-object "^0.1.0" cli-cursor "^3.1.0" cli-truncate "^2.1.0" - code-excerpt "^2.1.1" + code-excerpt "^3.0.0" common-path-prefix "^3.0.0" - concordance "^4.0.0" + concordance "^5.0.0" convert-source-map "^1.7.0" currently-unhandled "^0.4.1" debug "^4.1.1" del "^5.1.0" - emittery "^0.6.0" + emittery "^0.7.0" equal-length "^1.0.0" figures "^3.2.0" - globby "^11.0.0" - ignore-by-default "^1.0.0" + globby "^11.0.1" + ignore-by-default "^2.0.0" import-local "^3.0.2" indent-string "^4.0.0" is-error "^2.2.2" - is-plain-object "^3.0.0" + is-plain-object "^3.0.1" is-promise "^4.0.0" lodash "^4.17.15" matcher "^3.0.0" @@ -505,7 +537,7 @@ ava@^3.8.2: trim-off-newlines "^1.0.1" update-notifier "^4.1.0" write-file-atomic "^3.0.3" - yargs "^15.3.1" + yargs "^15.4.0" aws-sign2@~0.7.0: version "0.7.0" @@ -611,6 +643,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz#5259f7c30e35e278f1bdc2a4d91230b37cad981e" + integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -633,10 +670,10 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" - integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== +chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -666,10 +703,10 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-parallel-vars@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.0.tgz#af97729ed1c7381911ca37bcea263d62638701b3" - integrity sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g== +ci-parallel-vars@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz#e87ff0625ccf9d286985b29b4ada8485ca9ffbc2" + integrity sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg== clean-stack@^2.0.0: version "2.2.0" @@ -727,10 +764,10 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -code-excerpt@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-2.1.1.tgz#5fe3057bfbb71a5f300f659ef2cc0a47651ba77c" - integrity sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw== +code-excerpt@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-3.0.0.tgz#fcfb6748c03dba8431c19f5474747fad3f250f10" + integrity sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw== dependencies: convert-to-spaces "^1.0.1" @@ -785,21 +822,18 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concordance@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/concordance/-/concordance-4.0.0.tgz#5932fdee397d129bdbc3a1885fbe69839b1b7e15" - integrity sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ== +concordance@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/concordance/-/concordance-5.0.0.tgz#6d4552f76c78301dd65e748c26af2cf131f9dd49" + integrity sha512-stOCz9ffg0+rytwTaL2njUOIyMfANwfwmqc9Dr4vTUS/x/KkVFlWx9Zlzu6tHYtjKxxaCF/cEAZgPDac+n35sg== dependencies: - date-time "^2.1.0" - esutils "^2.0.2" - fast-diff "^1.1.2" + date-time "^3.1.0" + esutils "^2.0.3" + fast-diff "^1.2.0" js-string-escape "^1.0.1" - lodash.clonedeep "^4.5.0" - lodash.flattendeep "^4.4.0" - lodash.islength "^4.0.1" - lodash.merge "^4.6.1" - md5-hex "^2.0.0" - semver "^5.5.1" + lodash "^4.17.15" + md5-hex "^3.0.1" + semver "^7.3.2" well-known-symbols "^2.0.0" configstore@^5.0.1: @@ -870,10 +904,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -date-time@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2" - integrity sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g== +date-time@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/date-time/-/date-time-3.1.0.tgz#0d1e934d170579f481ed8df1e2b8ff70ee845e1e" + integrity sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg== dependencies: time-zone "^1.0.0" @@ -971,10 +1005,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -emittery@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.6.0.tgz#e85312468d77c3ed9a6adf43bb57d34849e0c95a" - integrity sha512-6EMRGr9KzYWp8DzHFZsKVZBsMO6QhAeHMeHND8rhyBNCHKMLpgW9tZv40bwN3rAIKRS5CxcK8oLRKUJSB9h7yQ== +emittery@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.1.tgz#c02375a927a40948c0345cc903072597f5270451" + integrity sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ== emoji-regex@^7.0.1: version "7.0.3" @@ -1040,7 +1074,7 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esutils@^2.0.2: +esutils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== @@ -1065,7 +1099,7 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== -fast-diff@^1.1.2: +fast-diff@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== @@ -1179,6 +1213,11 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -1245,10 +1284,10 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154" - integrity sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg== +globby@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -1339,10 +1378,10 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -ignore-by-default@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= +ignore-by-default@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-2.0.0.tgz#537092018540640459569fe7c8c7a408af581146" + integrity sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA== ignore@^5.1.1, ignore@^5.1.4: version "5.1.4" @@ -1484,12 +1523,10 @@ is-path-inside@^3.0.1: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== -is-plain-object@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" - integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== - dependencies: - isobject "^4.0.0" +is-plain-object@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" + integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== is-promise@^4.0.0: version "4.0.0" @@ -1521,11 +1558,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isobject@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" - integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -1712,26 +1744,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= -lodash.islength@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.islength/-/lodash.islength-4.0.1.tgz#4e9868d452575d750affd358c979543dc20ed577" - integrity sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc= - -lodash.merge@^4.6.1: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash@^4.17.13, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" @@ -1785,13 +1802,6 @@ matcher@^3.0.0: dependencies: escape-string-regexp "^4.0.0" -md5-hex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-2.0.0.tgz#d0588e9f1c74954492ecd24ac0ac6ce997d92e33" - integrity sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM= - dependencies: - md5-o-matic "^0.1.1" - md5-hex@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c" @@ -1799,11 +1809,6 @@ md5-hex@^3.0.1: dependencies: blueimp-md5 "^2.10.0" -md5-o-matic@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" - integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M= - mem@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-6.1.0.tgz#846eca0bd4708a8f04b9c3f3cd769e194ae63c5c" @@ -1886,10 +1891,10 @@ node-forge@^0.7.0: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== -node-forge@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.5.tgz#57906f07614dc72762c84cef442f427c0e1b86ee" - integrity sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q== +node-forge@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" + integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ== node-preload@^0.2.1: version "0.2.1" @@ -1898,7 +1903,7 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-rsa@^1.0.5: +node-rsa@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/node-rsa/-/node-rsa-1.0.8.tgz#29a4517380f3272cd2073ff4d4c1ca44127ea4ad" integrity sha512-q8knkMHEqViIX/fshOltCHTtlt4Nw5wpBpu0//LB1tkxqYZB/001dYMwbPvTPiENwKvPqVDkhxK6J4fV09oa7w== @@ -1925,10 +1930,10 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== -nyc@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.0.1.tgz#bd4d5c2b17f2ec04370365a5ca1fc0ed26f9f93d" - integrity sha512-n0MBXYBYRqa67IVt62qW1r/d9UH/Qtr7SF1w/nQLJ9KxvWF6b2xCHImRAixHN9tnMMYHC2P14uo6KddNGwMgGg== +nyc@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" + integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -1938,6 +1943,7 @@ nyc@^15.0.1: find-cache-dir "^3.2.0" find-up "^4.1.0" foreground-child "^2.0.0" + get-package-type "^0.1.0" glob "^7.1.6" istanbul-lib-coverage "^3.0.0" istanbul-lib-hook "^3.0.0" @@ -2060,7 +2066,7 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pako@^1.0.10: +pako@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -2160,6 +2166,11 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prettier@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== + pretty-ms@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-7.0.0.tgz#45781273110caf35f55cab21a8a9bd403a233dc0" @@ -2361,7 +2372,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -2371,6 +2382,11 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + serialize-error@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" @@ -2633,10 +2649,10 @@ trim-off-newlines@^1.0.1: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-node@^8.3.0: - version "8.10.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.1.tgz#77da0366ff8afbe733596361d2df9a60fc9c9bd3" - integrity sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw== +ts-node@^8.10.2: + version "8.10.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" + integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== dependencies: arg "^4.1.0" diff "^4.0.1" @@ -2709,10 +2725,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@^3.9.6: + version "3.9.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a" + integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw== unique-string@^2.0.0: version "2.0.0" @@ -2759,6 +2775,11 @@ uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.2.0.tgz#cb10dd6b118e2dada7d0cd9730ba7417c93d920e" + integrity sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -2844,7 +2865,7 @@ xml-crypto@^1.5.3: xmldom "0.1.27" xpath "0.0.27" -xml-encryption@^1.1.1: +xml-encryption@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/xml-encryption/-/xml-encryption-1.2.0.tgz#37c8b470beae88b4625ea8cad82f108ea0f9c364" integrity sha512-J3NjGMY8jf6bTo15jURTYBLtsisbnyCeM+MuxtfiAkZEZBnSZpNKjUUORhiOScKvSi6tMOAaZ3r7bZOXOni+Ew== @@ -2864,7 +2885,12 @@ xmldom@0.1.27: resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk= -xmldom@^0.1.27, xmldom@~0.1.15: +xmldom@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a" + integrity sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g== + +xmldom@~0.1.15: version "0.1.31" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== @@ -2879,7 +2905,7 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yargs-parser@^18.1.1: +yargs-parser@^18.1.1, yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -2887,7 +2913,7 @@ yargs-parser@^18.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^15.0.2, yargs@^15.3.1: +yargs@^15.0.2: version "15.3.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== @@ -2904,6 +2930,23 @@ yargs@^15.0.2, yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.1" +yargs@^15.4.0: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 678f6be21fe6bf6acde8944e0c3bc1f587de4bee Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 03:55:25 +0400 Subject: [PATCH 02/26] chore: update --- src/libsaml.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libsaml.ts b/src/libsaml.ts index fa434358..61447733 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -9,7 +9,7 @@ import utility, { flattenDeep, isString } from "./utility"; import { algorithms, namespace, wording } from "./urn"; import { select } from "xpath"; import { MetadataInterface } from "./metadata"; -import * as Nrsa from "node-rsa"; +import * as NodeRSA from "node-rsa"; import { AdvancedSigningScheme, SigningScheme, @@ -569,9 +569,9 @@ const libSaml = () => { ): string { // Default returning base64 encoded signature // Embed with node-rsa module - const decryptedKey = new Nrsa( + const decryptedKey = new NodeRSA( utility.readPrivateKey(key, passphrase), - "private", + undefined, { signingScheme: getSigningScheme(signingAlgorithm), } @@ -598,9 +598,8 @@ const libSaml = () => { ) { const signCert = metadata.getX509Certificate(certUse.signing); const signingScheme = getSigningScheme(verifyAlgorithm); - const key = new Nrsa( - utility.getPublicKeyPemFromCertificate(signCert), - "public", + const key = new NodeRSA( + utility.getPublicKeyPemFromCertificate(signCert),undefined, { signingScheme } ); return key.verify( From b976e1f17709c0e0d89fca45c57a06e2e5d26a40 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:19:14 +0400 Subject: [PATCH 03/26] chore: update --- package.json | 2 +- src/binding-redirect.ts | 2 +- src/entity.ts | 16 ++++++++-------- src/extractor.ts | 22 ++++++++++++---------- src/libsaml.ts | 12 +++++------- src/metadata-idp.ts | 25 +++++++++++++------------ src/metadata-sp.ts | 16 +++++++++------- src/metadata.ts | 2 +- src/utility.ts | 8 +++++--- test/index.ts | 6 +++--- 10 files changed, 58 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index e9bd1d72..702ff2ed 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ }, "license": "MIT", "dependencies": { - "@authenio/samlify-xsd-schema-validator": "^1.0.3", "camelcase": "^6.0.0", "node-forge": "^0.9.1", "node-rsa": "^1.0.8", @@ -44,6 +43,7 @@ "xpath": "^0.0.27" }, "devDependencies": { + "@authenio/samlify-xsd-schema-validator": "^1.0.3", "@ava/typescript": "^1.1.1", "@types/node": "^14.0.23", "@types/node-forge": "^0.9.4", diff --git a/src/binding-redirect.ts b/src/binding-redirect.ts index 05cf4ab6..106dc58d 100644 --- a/src/binding-redirect.ts +++ b/src/binding-redirect.ts @@ -71,7 +71,7 @@ function buildRedirectURL(opts: BuildRedirectConfig) { entitySetting.privateKeyPass, undefined, entitySetting.requestSignatureAlgorithm - ) + ) as string ) ) ); diff --git a/src/entity.ts b/src/entity.ts index a7602b3f..aec0fc7e 100644 --- a/src/entity.ts +++ b/src/entity.ts @@ -72,7 +72,7 @@ export default class Entity { /** * @param entitySetting - * @param entityMeta is the entity metadata, deprecated after 2.0 + * @param entityType */ constructor(entitySetting: EntityConstructor, entityType: "idp" | "sp") { this.entitySetting = Object.assign({}, defaultEntitySetting, entitySetting); @@ -133,7 +133,7 @@ export default class Entity { } if (isNonEmptyArray(field)) { let res = true; - (field as string[]).forEach((f) => { + (field as string[]).forEach((f:string) => { if (f !== metaField) { res = false; return; @@ -145,7 +145,7 @@ export default class Entity { } /** @desc Generates the logout request for developers to design their own method - * @param {ServiceProvider} sp object of service provider + * @param targetEntity * @param {string} binding protocol binding * @param {object} user current logged user (e.g. user) * @param {string} relayState the URL to which to redirect the user when logout is complete @@ -192,7 +192,7 @@ export default class Entity { /** * @desc Generates the logout response for developers to design their own method - * @param {IdentityProvider} idp object of identity provider + * @param target * @param {object} requestInfo corresponding request, used to obtain the id * @param {string} relayState the URL to which to redirect the user when logout is complete. * @param {string} binding protocol binding @@ -238,9 +238,9 @@ export default class Entity { /** * @desc Validation of the parsed the URL parameters - * @param {IdentityProvider} idp object of identity provider + * @param from * @param {string} binding protocol binding - * @param {request} req request + * @param request * @return {Promise} */ parseLogoutRequest(from, binding, request: ESamlHttpRequest) { @@ -258,9 +258,9 @@ export default class Entity { /** * @desc Validation of the parsed the URL parameters - * @param {object} config config for the parser + * @param from * @param {string} binding protocol binding - * @param {request} req request + * @param request * @return {Promise} */ parseLogoutResponse(from, binding, request: ESamlHttpRequest) { diff --git a/src/extractor.ts b/src/extractor.ts index e2572825..f3f78ac2 100644 --- a/src/extractor.ts +++ b/src/extractor.ts @@ -1,6 +1,6 @@ -import {DOMParser} from "xmldom"; -import {select, SelectedValue} from "xpath"; -import {last, notEmpty, uniq, zipObject} from "./utility"; +import { DOMParser } from "xmldom"; +import { select, SelectedValue } from "xpath"; +import { last, notEmpty, uniq, zipObject } from "./utility"; import camelCase from "camelcase"; const dom = DOMParser; @@ -39,7 +39,7 @@ function buildAttributeXPath(attributes) { return `/@${attributes[0]}`; } const filters = attributes - .map((attribute:string) => `name()='${attribute}'`) + .map((attribute: string) => `name()='${attribute}'`) .join(" or "); return `/@*[${filters}]`; } @@ -107,7 +107,7 @@ export const logoutResponseStatusFields = [ ]; export const loginResponseFields: (assertion: any) => ExtractorFields = ( - assertion:string + assertion: string ) => [ { key: "conditions", @@ -236,9 +236,9 @@ export function extract(context: string, fields) { attributes: [] } */ - if (localPath.every((path:string) => Array.isArray(path))) { + if (localPath.every((path: string) => Array.isArray(path))) { const multiXPaths = localPath - .map((path:string) => { + .map((path: string) => { // not support attribute yet, so ignore it return `${buildAbsoluteXPath(path)}/text()`; }) @@ -284,7 +284,7 @@ export function extract(context: string, fields) { const childAttributeXPath = buildAttributeXPath(attributes); const fullChildXPath = `${childXPath}${childAttributeXPath}`; // [ 'test', 'test@example.com', [ 'users', 'examplerole1' ] ] - const childAttributes = parentNodes.map((node:SelectedValue) => { + const childAttributes = parentNodes.map((node: SelectedValue) => { const nodeDoc = new dom().parseFromString(node.toString()); if (attributes.length === 0) { const childValues = select(fullChildXPath, nodeDoc).map( @@ -329,7 +329,7 @@ export function extract(context: string, fields) { value = node[0].toString(); } if (node.length > 1) { - value = node.map((n:SelectedValue) => n.toString()); + value = node.map((n: SelectedValue) => n.toString()); } return { ...result, @@ -346,7 +346,9 @@ export function extract(context: string, fields) { } */ if (attributes.length > 1) { - const baseNode = select(baseXPath, targetDoc).map((n:SelectedValue) => n.toString()); + const baseNode = select(baseXPath, targetDoc).map((n: SelectedValue) => + n.toString() + ); const childXPath = `${buildAbsoluteXPath([ last(localPath), ])}${attributeXPath}`; diff --git a/src/libsaml.ts b/src/libsaml.ts index 61447733..4e86be26 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -566,7 +566,7 @@ const libSaml = () => { passphrase?: string, isBase64?: boolean, signingAlgorithm?: string - ): string { + ): string | Buffer { // Default returning base64 encoded signature // Embed with node-rsa module const decryptedKey = new NodeRSA( @@ -580,7 +580,7 @@ const libSaml = () => { // Use private key to sign data return isBase64 !== false ? signature.toString("base64") - : signature.toString(); + : (signature as Buffer); }, /** * @desc Verifies message signature @@ -599,13 +599,11 @@ const libSaml = () => { const signCert = metadata.getX509Certificate(certUse.signing); const signingScheme = getSigningScheme(verifyAlgorithm); const key = new NodeRSA( - utility.getPublicKeyPemFromCertificate(signCert),undefined, + utility.getPublicKeyPemFromCertificate(signCert), + undefined, { signingScheme } ); - return key.verify( - new Buffer(octetString), - Buffer.from(signature.toString()) - ); + return key.verify(new Buffer(octetString), Buffer.from(signature)); }, /** * @desc Get the public key in string format diff --git a/src/metadata-idp.ts b/src/metadata-idp.ts index 4e33958d..7558215d 100644 --- a/src/metadata-idp.ts +++ b/src/metadata-idp.ts @@ -3,15 +3,14 @@ * @author tngan * @desc Metadata of identity provider */ -import Metadata, {MetadataInterface} from "./metadata"; -import {MetadataIdpConstructor, MetadataIdpOptions} from "./types"; -import {namespace} from "./urn"; +import Metadata, { MetadataInterface } from "./metadata"; +import { MetadataIdpConstructor, MetadataIdpOptions } from "./types"; +import { namespace } from "./urn"; import libsaml from "./libsaml"; -import {isNonEmptyArray, isString} from "./utility"; +import { isNonEmptyArray, isString } from "./utility"; import * as xml from "xml"; -export interface IdpMetadataInterface extends MetadataInterface { -} +export interface IdpMetadataInterface extends MetadataInterface {} /* * @desc interface function @@ -59,11 +58,13 @@ export class IdpMetadata extends Metadata { } if (isNonEmptyArray(nameIDFormat)) { - nameIDFormat.forEach((f: any) => IDPSSODescriptor.push({NameIDFormat: f})); + nameIDFormat.forEach((f: any) => + IDPSSODescriptor.push({ NameIDFormat: f }) + ); } if (isNonEmptyArray(singleSignOnService)) { - singleSignOnService.forEach((a:any) => { + singleSignOnService.forEach((a: any) => { const attr: any = { Binding: a.Binding, Location: a.Location, @@ -71,21 +72,21 @@ export class IdpMetadata extends Metadata { if (a.isDefault) { attr.isDefault = true; } - IDPSSODescriptor.push({SingleSignOnService: [{_attr: attr}]}); + IDPSSODescriptor.push({ SingleSignOnService: [{ _attr: attr }] }); }); } else { throw new Error("ERR_IDP_METADATA_MISSING_SINGLE_SIGN_ON_SERVICE"); } if (isNonEmptyArray(singleLogoutService)) { - singleLogoutService.forEach((a:any) => { + singleLogoutService.forEach((a: any) => { const attr: any = {}; if (a.isDefault) { attr.isDefault = true; } attr.Binding = a.Binding; attr.Location = a.Location; - IDPSSODescriptor.push({SingleLogoutService: [{_attr: attr}]}); + IDPSSODescriptor.push({ SingleLogoutService: [{ _attr: attr }] }); }); } else { console.warn( @@ -104,7 +105,7 @@ export class IdpMetadata extends Metadata { entityID, }, }, - {IDPSSODescriptor}, + { IDPSSODescriptor }, ], }, ]); diff --git a/src/metadata-sp.ts b/src/metadata-sp.ts index 60604913..d9e452a3 100644 --- a/src/metadata-sp.ts +++ b/src/metadata-sp.ts @@ -94,14 +94,14 @@ export class SpMetadata extends Metadata { } if (isNonEmptyArray(nameIDFormat)) { - nameIDFormat.forEach((f:any) => descriptors.NameIDFormat!.push(f)); + nameIDFormat.forEach((f: any) => descriptors.NameIDFormat!.push(f)); } else { // default value descriptors.NameIDFormat!.push(namespace.format.emailAddress); } if (isNonEmptyArray(singleLogoutService)) { - singleLogoutService.forEach((a:any) => { + singleLogoutService.forEach((a: any) => { const attr: any = { Binding: a.Binding, Location: a.Location, @@ -115,7 +115,7 @@ export class SpMetadata extends Metadata { if (isNonEmptyArray(assertionConsumerService)) { let indexCount = 0; - assertionConsumerService.forEach((a:any) => { + assertionConsumerService.forEach((a: any) => { const attr: any = { index: String(indexCount++), Binding: a.Binding, @@ -131,11 +131,13 @@ export class SpMetadata extends Metadata { } // handle element order - const existedElements = elementsOrder.filter((name:string) => + const existedElements = elementsOrder.filter((name: string) => isNonEmptyArray(descriptors[name]) ); - existedElements.forEach((name:string) => { - descriptors[name].forEach((e:string) => SPSSODescriptor.push({ [name]: e })); + existedElements.forEach((name: string) => { + descriptors[name].forEach((e: string) => + SPSSODescriptor.push({ [name]: e }) + ); }); // Re-assign the meta reference as a XML string|Buffer for use with the parent constructor @@ -201,7 +203,7 @@ export class SpMetadata extends Metadata { let location; const bindName = namespace.binding[binding]; if (isNonEmptyArray(this.meta.assertionConsumerService)) { - this.meta.assertionConsumerService.forEach((obj:any) => { + this.meta.assertionConsumerService.forEach((obj: any) => { if (obj.binding === bindName) { location = obj.location; return; diff --git a/src/metadata.ts b/src/metadata.ts index a9b4e374..e304fcc0 100644 --- a/src/metadata.ts +++ b/src/metadata.ts @@ -153,7 +153,7 @@ export default class Metadata implements MetadataInterface { singleLogoutService = [singleLogoutService]; } const service = singleLogoutService.find( - (obj:any) => obj.binding === bindType + (obj: any) => obj.binding === bindType ); if (service) { return service.location; diff --git a/src/utility.ts b/src/utility.ts index 6ea437bd..cd50f250 100644 --- a/src/utility.ts +++ b/src/utility.ts @@ -113,7 +113,9 @@ export function base64Decode( * @return {string} compressed string */ function deflateString(message: string): number[] { - const input = Array.prototype.map.call(message, (char:string) => char.charCodeAt(0)); + const input = Array.prototype.map.call(message, (char: string) => + char.charCodeAt(0) + ); return Array.from(deflate(input, { raw: true })); } @@ -126,10 +128,10 @@ export function inflateString(compressedString: string): string { const inputBuffer = Buffer.from(compressedString, BASE64_STR); const input = Array.prototype.map.call( inputBuffer.toString("binary"), - (char:string) => char.charCodeAt(0) + (char: string) => char.charCodeAt(0) ); return Array.from(inflate(input, { raw: true })) - .map((byte:number) => String.fromCharCode(byte)) + .map((byte: number) => String.fromCharCode(byte)) .join(""); } diff --git a/test/index.ts b/test/index.ts index 8e830c57..f83223b5 100644 --- a/test/index.ts +++ b/test/index.ts @@ -289,7 +289,7 @@ test("getAssertionConsumerService with two bindings", (t: ExecutionContext) => { libsaml.verifyMessageSignature( SPMetadata, octetString, - Buffer.from(signature, "base64") + Buffer.from(signature as string, "base64") ), true ); @@ -304,7 +304,7 @@ test("getAssertionConsumerService with two bindings", (t: ExecutionContext) => { libsaml.verifyMessageSignature( SPMetadata, octetStringSHA256, - Buffer.from(signature, "base64") + Buffer.from(signature as string, "base64") ), true ); @@ -319,7 +319,7 @@ test("getAssertionConsumerService with two bindings", (t: ExecutionContext) => { libsaml.verifyMessageSignature( SPMetadata, octetStringSHA512, - Buffer.from(signature, "base64") + Buffer.from(signature as string, "base64") ), true ); From b3fed5f35c8fbd252c206c4db56f7ebffb12f5cf Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:21:42 +0400 Subject: [PATCH 04/26] chore: update --- tsconfig.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 52bf1872..a882a3f6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,16 @@ { "compilerOptions": { - "lib": ["dom", "es2015.core", "es2015.promise", "es2015.iterable", "es5"], + "lib": [ + "dom", + "es2015.core", + "es2015.promise", + "es2015.iterable", + "es5" + ], "target": "es5", "module": "commonjs", "moduleResolution": "node", "declaration": true, - "declarationDir": "types", "emitDecoratorMetadata": true, "experimentalDecorators": true, "downlevelIteration": true, @@ -20,7 +25,11 @@ "atom": { "rewriteTsconfig": false }, - "exclude": ["node_modules", "types/**/*.ts", "test/**/*.ts"], + "exclude": [ + "node_modules", + "types/**/*.ts", + "test/**/*.ts" + ], "compileOnSave": false, "buildOnSave": false } From e7e2fe7db27e128e2c9e7f626e1a7207c32c6078 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:22:10 +0400 Subject: [PATCH 05/26] 2.7.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 702ff2ed..cc85b8c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify", - "version": "2.7.4", + "version": "2.7.5", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "build/index.js", "keywords": [ From 82841191c84db1d167a475d8a44e212f5076d519 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:24:08 +0400 Subject: [PATCH 06/26] chore: update --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index cc85b8c9..7551133d 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "samlify", + "name": "samlify-js", "version": "2.7.5", "description": "High-level API for Single Sign On (SAML 2.0)", - "main": "build/index.js", + "main": "./build/index.js", "keywords": [ "nodejs", "saml2", @@ -10,7 +10,6 @@ "slo", "metadata" ], - "typings": "types/index.d.ts", "scripts": { "build": "yarn audit;make rebuild", "docs": "docsify serve -o docs", @@ -26,7 +25,7 @@ ], "author": "tngan", "repository": { - "url": "https://github.com/tngan/samlify", + "url": "https://github.com/meabed/samlify-js", "type": "git" }, "license": "MIT", From 8f9edddfe59e9f13921cad1a94f546a7c68d0c5f Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:24:10 +0400 Subject: [PATCH 07/26] 2.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7551133d..de9449ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.5", + "version": "2.7.6", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 6f8ee282a74b3b30935a27cf261b100326875eae Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:26:54 +0400 Subject: [PATCH 08/26] chore: update --- .npmignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 8600fc0b..2578d030 100644 --- a/.npmignore +++ b/.npmignore @@ -2,6 +2,11 @@ node_modules examples test @types +types +src docs yarn* -.nyc_output \ No newline at end of file +.nyc_output +.idea +.travis.yml +.github From fa11432e69b2d196817ed5ef67c64cf600013731 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:28:04 +0400 Subject: [PATCH 09/26] chore: update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de9449ec..2ada1fe1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.6", + "version": "2.7.4", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From eba739c65d8fe96e7c03a534a725b1e40a9c05bd Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:28:25 +0400 Subject: [PATCH 10/26] 2.7.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ada1fe1..7551133d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.4", + "version": "2.7.5", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 21258cf1f1798d49eeba181fe1b8ac874e852d84 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:28:44 +0400 Subject: [PATCH 11/26] 2.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7551133d..de9449ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.5", + "version": "2.7.6", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 4a2ed920c72a0e6e03bd47ab16c33aff8730d649 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:28:56 +0400 Subject: [PATCH 12/26] chore: update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de9449ec..2ada1fe1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.6", + "version": "2.7.4", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 9f1043416396e1cab33c9d4feaba514436f69f2f Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:29:03 +0400 Subject: [PATCH 13/26] 2.7.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ada1fe1..7551133d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.4", + "version": "2.7.5", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From fd378523a1a2eafe2e02c590ef3339053945a2ff Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:32:40 +0400 Subject: [PATCH 14/26] chore: update --- .gitignore | 3 +- .npmignore | 1 + build/index.d.ts | 10 + build/index.js | 28 + build/index.js.map | 1 + build/src/api.d.ts | 8 + build/src/api.js | 19 + build/src/api.js.map | 1 + build/src/binding-post.d.ts | 45 ++ build/src/binding-post.js | 396 ++++++++++++ build/src/binding-post.js.map | 1 + build/src/binding-redirect.d.ts | 44 ++ build/src/binding-redirect.js | 214 +++++++ build/src/binding-redirect.js.map | 1 + build/src/entity-idp.d.ts | 44 ++ build/src/entity-idp.js | 162 +++++ build/src/entity-idp.js.map | 1 + build/src/entity-sp.d.ts | 35 ++ build/src/entity-sp.js | 111 ++++ build/src/entity-sp.js.map | 1 + build/src/entity.d.ts | 90 +++ build/src/entity.js | 204 +++++++ build/src/entity.js.map | 1 + build/src/extractor.d.ts | 25 + build/src/extractor.js | 366 +++++++++++ build/src/extractor.js.map | 1 + build/src/flow.d.ts | 5 + build/src/flow.js | 275 +++++++++ build/src/flow.js.map | 1 + build/src/libsaml.d.ts | 172 ++++++ build/src/libsaml.js | 576 ++++++++++++++++++ build/src/libsaml.js.map | 1 + build/src/metadata-idp.d.ts | 24 + build/src/metadata-idp.js | 161 +++++ build/src/metadata-idp.js.map | 1 + build/src/metadata-sp.d.ts | 36 ++ build/src/metadata-sp.js | 205 +++++++ build/src/metadata-sp.js.map | 1 + build/src/metadata.d.ts | 58 ++ build/src/metadata.js | 155 +++++ build/src/metadata.js.map | 1 + build/src/types.d.ts | 108 ++++ build/src/types.js | 11 + build/src/types.js.map | 1 + build/src/urn.d.ts | 189 ++++++ build/src/urn.js | 224 +++++++ build/src/urn.js.map | 1 + build/src/utility.d.ts | 137 +++++ build/src/utility.js | 268 ++++++++ build/src/utility.js.map | 1 + build/src/validator.d.ts | 3 + build/src/validator.js | 45 ++ build/src/validator.js.map | 1 + build/test/key/idp/README.md | 4 + build/test/key/idp/cert.cer | 22 + build/test/key/idp/cert2.cer | 30 + build/test/key/idp/encryptKey.pem | 30 + build/test/key/idp/encryptionCert.cer | 23 + build/test/key/idp/nocrypt.pem | 27 + build/test/key/idp/privkey.pem | 30 + build/test/key/idp/privkey2.pem | 51 ++ build/test/key/keypass.txt | 11 + build/test/key/sp/cert.cer | 22 + build/test/key/sp/encryptKey.pem | 30 + build/test/key/sp/encryptionCert.cer | 24 + build/test/key/sp/knownGoodCert.cer | 1 + build/test/key/sp/knownGoodEncryptKey.pem | 1 + build/test/key/sp/privkey.pem | 30 + build/test/misc/attack_response_signed.xml | 1 + build/test/misc/dumpes_issuer_response.xml | 65 ++ build/test/misc/failed_response.xml | 1 + build/test/misc/false_signed_request_sha1.xml | 1 + .../test/misc/false_signed_request_sha256.xml | 1 + .../test/misc/false_signed_request_sha512.xml | 1 + build/test/misc/idpmeta.xml | 34 ++ build/test/misc/idpmeta_nosign.xml | 27 + build/test/misc/idpmeta_onelogoutservice.xml | 33 + build/test/misc/idpmeta_rollingcert.xml | 39 ++ build/test/misc/idpmeta_share_cert.xml | 27 + build/test/misc/invalid_response.xml | 6 + build/test/misc/logout_request.xml | 4 + build/test/misc/multiple_entitydescriptor.xml | 37 ++ build/test/misc/request.xml | 1 + build/test/misc/response.xml | 1 + build/test/misc/response_signed.xml | 1 + build/test/misc/response_signed_cert1.xml | 1 + build/test/misc/response_signed_cert2.xml | 1 + build/test/misc/signed_request_sha1.xml | 1 + build/test/misc/signed_request_sha256.xml | 1 + build/test/misc/signed_request_sha512.xml | 1 + build/test/misc/signed_response_sha1.xml | 1 + build/test/misc/signed_response_sha256.xml | 1 + build/test/misc/signed_response_sha512.xml | 1 + build/test/misc/sp_metadata_98.xml | 6 + build/test/misc/spmeta.xml | 27 + build/test/misc/spmeta_noassertsign.xml | 32 + build/test/misc/spmeta_noauthnsign.xml | 25 + 97 files changed, 5186 insertions(+), 2 deletions(-) create mode 100644 build/index.d.ts create mode 100644 build/index.js create mode 100644 build/index.js.map create mode 100644 build/src/api.d.ts create mode 100644 build/src/api.js create mode 100644 build/src/api.js.map create mode 100644 build/src/binding-post.d.ts create mode 100644 build/src/binding-post.js create mode 100644 build/src/binding-post.js.map create mode 100644 build/src/binding-redirect.d.ts create mode 100644 build/src/binding-redirect.js create mode 100644 build/src/binding-redirect.js.map create mode 100644 build/src/entity-idp.d.ts create mode 100644 build/src/entity-idp.js create mode 100644 build/src/entity-idp.js.map create mode 100644 build/src/entity-sp.d.ts create mode 100644 build/src/entity-sp.js create mode 100644 build/src/entity-sp.js.map create mode 100644 build/src/entity.d.ts create mode 100644 build/src/entity.js create mode 100644 build/src/entity.js.map create mode 100644 build/src/extractor.d.ts create mode 100644 build/src/extractor.js create mode 100644 build/src/extractor.js.map create mode 100644 build/src/flow.d.ts create mode 100644 build/src/flow.js create mode 100644 build/src/flow.js.map create mode 100644 build/src/libsaml.d.ts create mode 100644 build/src/libsaml.js create mode 100644 build/src/libsaml.js.map create mode 100644 build/src/metadata-idp.d.ts create mode 100644 build/src/metadata-idp.js create mode 100644 build/src/metadata-idp.js.map create mode 100644 build/src/metadata-sp.d.ts create mode 100644 build/src/metadata-sp.js create mode 100644 build/src/metadata-sp.js.map create mode 100644 build/src/metadata.d.ts create mode 100644 build/src/metadata.js create mode 100644 build/src/metadata.js.map create mode 100644 build/src/types.d.ts create mode 100644 build/src/types.js create mode 100644 build/src/types.js.map create mode 100644 build/src/urn.d.ts create mode 100644 build/src/urn.js create mode 100644 build/src/urn.js.map create mode 100644 build/src/utility.d.ts create mode 100644 build/src/utility.js create mode 100644 build/src/utility.js.map create mode 100644 build/src/validator.d.ts create mode 100644 build/src/validator.js create mode 100644 build/src/validator.js.map create mode 100644 build/test/key/idp/README.md create mode 100644 build/test/key/idp/cert.cer create mode 100644 build/test/key/idp/cert2.cer create mode 100644 build/test/key/idp/encryptKey.pem create mode 100644 build/test/key/idp/encryptionCert.cer create mode 100644 build/test/key/idp/nocrypt.pem create mode 100644 build/test/key/idp/privkey.pem create mode 100644 build/test/key/idp/privkey2.pem create mode 100644 build/test/key/keypass.txt create mode 100644 build/test/key/sp/cert.cer create mode 100644 build/test/key/sp/encryptKey.pem create mode 100644 build/test/key/sp/encryptionCert.cer create mode 100644 build/test/key/sp/knownGoodCert.cer create mode 100644 build/test/key/sp/knownGoodEncryptKey.pem create mode 100644 build/test/key/sp/privkey.pem create mode 100644 build/test/misc/attack_response_signed.xml create mode 100644 build/test/misc/dumpes_issuer_response.xml create mode 100644 build/test/misc/failed_response.xml create mode 100644 build/test/misc/false_signed_request_sha1.xml create mode 100644 build/test/misc/false_signed_request_sha256.xml create mode 100644 build/test/misc/false_signed_request_sha512.xml create mode 100644 build/test/misc/idpmeta.xml create mode 100644 build/test/misc/idpmeta_nosign.xml create mode 100644 build/test/misc/idpmeta_onelogoutservice.xml create mode 100644 build/test/misc/idpmeta_rollingcert.xml create mode 100644 build/test/misc/idpmeta_share_cert.xml create mode 100644 build/test/misc/invalid_response.xml create mode 100644 build/test/misc/logout_request.xml create mode 100644 build/test/misc/multiple_entitydescriptor.xml create mode 100644 build/test/misc/request.xml create mode 100644 build/test/misc/response.xml create mode 100644 build/test/misc/response_signed.xml create mode 100644 build/test/misc/response_signed_cert1.xml create mode 100644 build/test/misc/response_signed_cert2.xml create mode 100644 build/test/misc/signed_request_sha1.xml create mode 100644 build/test/misc/signed_request_sha256.xml create mode 100644 build/test/misc/signed_request_sha512.xml create mode 100644 build/test/misc/signed_response_sha1.xml create mode 100644 build/test/misc/signed_response_sha256.xml create mode 100644 build/test/misc/signed_response_sha512.xml create mode 100644 build/test/misc/sp_metadata_98.xml create mode 100644 build/test/misc/spmeta.xml create mode 100644 build/test/misc/spmeta_noassertsign.xml create mode 100644 build/test/misc/spmeta_noauthnsign.xml diff --git a/.gitignore b/.gitignore index 1a5000ec..035ab29c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ coverage # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- node_modules -build types/ .yarnclean @@ -33,4 +32,4 @@ types/ *.tgz -package-lock.json \ No newline at end of file +package-lock.json diff --git a/.npmignore b/.npmignore index 2578d030..ac702bbe 100644 --- a/.npmignore +++ b/.npmignore @@ -10,3 +10,4 @@ yarn* .idea .travis.yml .github +!build diff --git a/build/index.d.ts b/build/index.d.ts new file mode 100644 index 00000000..f760f375 --- /dev/null +++ b/build/index.d.ts @@ -0,0 +1,10 @@ +import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from "./src/entity-idp"; +import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from "./src/entity-sp"; +export { default as IdPMetadata } from "./src/metadata-idp"; +export { default as SPMetadata } from "./src/metadata-sp"; +export { default as Utility } from "./src/utility"; +export { default as SamlLib } from "./src/libsaml"; +import * as Constants from "./src/urn"; +import * as Extractor from "./src/extractor"; +import { setSchemaValidator } from "./src/api"; +export { Constants, Extractor, IdentityProvider, IdentityProviderInstance, ServiceProvider, ServiceProviderInstance, setSchemaValidator, }; diff --git a/build/index.js b/build/index.js new file mode 100644 index 00000000..4e1c523a --- /dev/null +++ b/build/index.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setSchemaValidator = exports.ServiceProviderInstance = exports.ServiceProvider = exports.IdentityProviderInstance = exports.IdentityProvider = exports.Extractor = exports.Constants = void 0; +// version <= 1.25 +var entity_idp_1 = require("./src/entity-idp"); +exports.IdentityProvider = entity_idp_1.default; +Object.defineProperty(exports, "IdentityProviderInstance", { enumerable: true, get: function () { return entity_idp_1.IdentityProvider; } }); +var entity_sp_1 = require("./src/entity-sp"); +exports.ServiceProvider = entity_sp_1.default; +Object.defineProperty(exports, "ServiceProviderInstance", { enumerable: true, get: function () { return entity_sp_1.ServiceProvider; } }); +var metadata_idp_1 = require("./src/metadata-idp"); +Object.defineProperty(exports, "IdPMetadata", { enumerable: true, get: function () { return metadata_idp_1.default; } }); +var metadata_sp_1 = require("./src/metadata-sp"); +Object.defineProperty(exports, "SPMetadata", { enumerable: true, get: function () { return metadata_sp_1.default; } }); +var utility_1 = require("./src/utility"); +Object.defineProperty(exports, "Utility", { enumerable: true, get: function () { return utility_1.default; } }); +var libsaml_1 = require("./src/libsaml"); +Object.defineProperty(exports, "SamlLib", { enumerable: true, get: function () { return libsaml_1.default; } }); +// roadmap +// new name convention in version >= 3.0 +var Constants = require("./src/urn"); +exports.Constants = Constants; +var Extractor = require("./src/extractor"); +exports.Extractor = Extractor; +// exposed methods for customising samlify +var api_1 = require("./src/api"); +Object.defineProperty(exports, "setSchemaValidator", { enumerable: true, get: function () { return api_1.setSchemaValidator; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map new file mode 100644 index 00000000..57831e95 --- /dev/null +++ b/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,+CAE0B;AAqBxB,2BAvBK,oBAAgB,CAuBL;AAChB,yGAvBoB,6BAAwB,OAuBpB;AArB1B,6CAEyB;AAoBvB,0BAtBK,mBAAe,CAsBL;AACf,wGAtBmB,2BAAuB,OAsBnB;AAnBzB,mDAA4D;AAAnD,2GAAA,OAAO,OAAe;AAC/B,iDAA0D;AAAjD,yGAAA,OAAO,OAAc;AAC9B,yCAAmD;AAA1C,kGAAA,OAAO,OAAW;AAC3B,yCAAmD;AAA1C,kGAAA,OAAO,OAAW;AAC3B,UAAU;AACV,wCAAwC;AACxC,qCAAuC;AAOrC,8BAAS;AANX,2CAA6C;AAO3C,8BAAS;AALX,0CAA0C;AAC1C,iCAA+C;AAW7C,mGAXO,wBAAkB,OAWP"} \ No newline at end of file diff --git a/build/src/api.d.ts b/build/src/api.d.ts new file mode 100644 index 00000000..b5c813a0 --- /dev/null +++ b/build/src/api.d.ts @@ -0,0 +1,8 @@ +interface Context extends ValidatorContext { +} +interface ValidatorContext { + validate?: (xml: string) => Promise; +} +export declare function getContext(): Context; +export declare function setSchemaValidator(params: ValidatorContext): void; +export {}; diff --git a/build/src/api.js b/build/src/api.js new file mode 100644 index 00000000..3ebba0d3 --- /dev/null +++ b/build/src/api.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setSchemaValidator = exports.getContext = void 0; +var context = { + validate: undefined, +}; +function getContext() { + return context; +} +exports.getContext = getContext; +function setSchemaValidator(params) { + if (typeof params.validate !== "function") { + throw new Error("validate must be a callback function having one arguemnt as xml input"); + } + // assign the validate function to the context + context.validate = params.validate; +} +exports.setSchemaValidator = setSchemaValidator; +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/build/src/api.js.map b/build/src/api.js.map new file mode 100644 index 00000000..f9bebf91 --- /dev/null +++ b/build/src/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAOA,IAAM,OAAO,GAAY;IACvB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAFD,gCAEC;AAED,SAAgB,kBAAkB,CAAC,MAAwB;IACzD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE;QACzC,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;KACH;IAED,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACrC,CAAC;AATD,gDASC"} \ No newline at end of file diff --git a/build/src/binding-post.d.ts b/build/src/binding-post.d.ts new file mode 100644 index 00000000..f2641ccf --- /dev/null +++ b/build/src/binding-post.d.ts @@ -0,0 +1,45 @@ +/** + * @file binding-post.ts + * @author tngan + * @desc Binding-level API, declare the functions using POST binding + */ +import { BindingContext } from "./entity"; +/** + * @desc Generate a base64 encoded login request + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +declare function base64LoginRequest(referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext; +/** + * @desc Generate a base64 encoded login response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {object} user current logged user (e.g. req.user) + * @param {function} customTagReplacement used when developers have their own login response template + * @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt + */ +declare function base64LoginResponse(requestInfo: any, entity: any, user?: any, customTagReplacement?: (template: string) => BindingContext, encryptThenSign?: boolean): Promise; +/** + * @desc Generate a base64 encoded logout request + * @param {object} user current logged user (e.g. req.user) + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} base64 encoded request + */ +declare function base64LogoutRequest(user: any, referenceTagXPath: any, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext; +/** + * @desc Generate a base64 encoded logout response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +declare function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacement: (template: string) => BindingContext): BindingContext; +declare const postBinding: { + base64LoginRequest: typeof base64LoginRequest; + base64LoginResponse: typeof base64LoginResponse; + base64LogoutRequest: typeof base64LogoutRequest; + base64LogoutResponse: typeof base64LogoutResponse; +}; +export default postBinding; diff --git a/build/src/binding-post.js b/build/src/binding-post.js new file mode 100644 index 00000000..ce14f302 --- /dev/null +++ b/build/src/binding-post.js @@ -0,0 +1,396 @@ +"use strict"; +/** + * @file binding-post.ts + * @author tngan + * @desc Binding-level API, declare the functions using POST binding + */ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var urn_1 = require("./urn"); +var libsaml_1 = require("./libsaml"); +var utility_1 = require("./utility"); +var binding = urn_1.wording.binding; +/** + * @desc Generate a base64 encoded login request + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +function base64LoginRequest(referenceTagXPath, entity, customTagReplacement) { + var metadata = { idp: entity.idp.entityMeta, sp: entity.sp.entityMeta }; + var spSetting = entity.sp.entitySetting; + var id = ""; + if (metadata && metadata.idp && metadata.sp) { + var base = metadata.idp.getSingleSignOnService(binding.post); + var rawSamlRequest = void 0; + if (spSetting.loginRequestTemplate && customTagReplacement) { + var info = customTagReplacement(spSetting.loginRequestTemplate.context); + id = utility_1.get(info, "id", null); + rawSamlRequest = utility_1.get(info, "context", null); + } + else { + var nameIDFormat = spSetting.nameIDFormat; + var selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + id = spSetting.generateID(); + rawSamlRequest = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLoginRequestTemplate.context, { + ID: id, + Destination: base, + Issuer: metadata.sp.getEntityID(), + IssueInstant: new Date().toISOString(), + AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService(binding.post), + EntityID: metadata.sp.getEntityID(), + AllowCreate: spSetting.allowCreate, + NameIDFormat: selectedNameIDFormat, + }); + } + if (metadata.idp.isWantAuthnRequestsSigned()) { + var privateKey = spSetting.privateKey, privateKeyPass = spSetting.privateKeyPass, signatureAlgorithm = spSetting.requestSignatureAlgorithm, transformationAlgorithms = spSetting.transformationAlgorithms; + return { + id: id, + context: libsaml_1.default.constructSAMLSignature({ + referenceTagXPath: referenceTagXPath, + privateKey: privateKey, + privateKeyPass: privateKeyPass, + signatureAlgorithm: signatureAlgorithm, + transformationAlgorithms: transformationAlgorithms, + rawSamlMessage: rawSamlRequest, + signingCert: metadata.sp.getX509Certificate("signing"), + signatureConfig: spSetting.signatureConfig || { + prefix: "ds", + location: { + reference: "/*[local-name(.)='AuthnRequest']/*[local-name(.)='Issuer']", + action: "after", + }, + }, + }), + }; + } + // No need to embeded XML signature + return { + id: id, + context: utility_1.default.base64Encode(rawSamlRequest), + }; + } + throw new Error("ERR_GENERATE_POST_LOGIN_REQUEST_MISSING_METADATA"); +} +/** + * @desc Generate a base64 encoded login response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {object} user current logged user (e.g. req.user) + * @param {function} customTagReplacement used when developers have their own login response template + * @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt + */ +function base64LoginResponse(requestInfo, entity, user, customTagReplacement, encryptThenSign) { + if (requestInfo === void 0) { requestInfo = {}; } + if (user === void 0) { user = {}; } + if (encryptThenSign === void 0) { encryptThenSign = false; } + return __awaiter(this, void 0, void 0, function () { + var idpSetting, spSetting, id, metadata, nameIDFormat, selectedNameIDFormat, base, rawSamlResponse, nowTime, spEntityID, fiveMinutesLaterTime, fiveMinutesLater, now, acl, tvalue, template, privateKey, privateKeyPass, signatureAlgorithm, config, context; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + idpSetting = entity.idp.entitySetting; + spSetting = entity.sp.entitySetting; + id = idpSetting.generateID(); + metadata = { + idp: entity.idp.entityMeta, + sp: entity.sp.entityMeta, + }; + nameIDFormat = idpSetting.nameIDFormat; + selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + if (!(metadata && metadata.idp && metadata.sp)) return [3 /*break*/, 3]; + base = metadata.sp.getAssertionConsumerService(binding.post); + rawSamlResponse = void 0; + nowTime = new Date(); + spEntityID = metadata.sp.getEntityID(); + fiveMinutesLaterTime = new Date(nowTime.getTime()); + fiveMinutesLaterTime.setMinutes(fiveMinutesLaterTime.getMinutes() + 5); + fiveMinutesLater = fiveMinutesLaterTime.toISOString(); + now = nowTime.toISOString(); + acl = metadata.sp.getAssertionConsumerService(binding.post); + tvalue = { + ID: id, + AssertionID: idpSetting.generateID(), + Destination: base, + Audience: spEntityID, + EntityID: spEntityID, + SubjectRecipient: acl, + Issuer: metadata.idp.getEntityID(), + IssueInstant: now, + AssertionConsumerServiceURL: acl, + StatusCode: urn_1.StatusCode.Success, + // can be customized + ConditionsNotBefore: now, + ConditionsNotOnOrAfter: fiveMinutesLater, + SubjectConfirmationDataNotOnOrAfter: fiveMinutesLater, + NameIDFormat: selectedNameIDFormat, + NameID: user.email || "", + InResponseTo: utility_1.get(requestInfo, "extract.request.id", ""), + AuthnStatement: "", + AttributeStatement: "", + }; + if (idpSetting.loginResponseTemplate && customTagReplacement) { + template = customTagReplacement(idpSetting.loginResponseTemplate.context); + rawSamlResponse = utility_1.get(template, "context", null); + } + else { + if (requestInfo !== null) { + tvalue.InResponseTo = requestInfo.extract.request.id; + } + rawSamlResponse = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLoginResponseTemplate.context, tvalue); + } + privateKey = idpSetting.privateKey, privateKeyPass = idpSetting.privateKeyPass, signatureAlgorithm = idpSetting.requestSignatureAlgorithm; + config = { + privateKey: privateKey, + privateKeyPass: privateKeyPass, + signatureAlgorithm: signatureAlgorithm, + signingCert: metadata.idp.getX509Certificate("signing"), + isBase64Output: false, + }; + // step: sign assertion ? -> encrypted ? -> sign message ? + if (metadata.sp.isWantAssertionsSigned()) { + // console.debug('sp wants assertion signed'); + rawSamlResponse = libsaml_1.default.constructSAMLSignature(__assign(__assign({}, config), { rawSamlMessage: rawSamlResponse, transformationAlgorithms: spSetting.transformationAlgorithms, referenceTagXPath: "/*[local-name(.)='Response']/*[local-name(.)='Assertion']", signatureConfig: { + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Assertion']/*[local-name(.)='Issuer']", + action: "after", + }, + } })); + } + // console.debug('after assertion signed', rawSamlResponse); + // SAML response must be signed sign message first, then encrypt + if (!encryptThenSign && + (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned())) { + // console.debug('sign then encrypt and sign entire message'); + rawSamlResponse = libsaml_1.default.constructSAMLSignature(__assign(__assign({}, config), { rawSamlMessage: rawSamlResponse, isMessageSigned: true, transformationAlgorithms: spSetting.transformationAlgorithms, signatureConfig: spSetting.signatureConfig || { + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, + } })); + } + if (!idpSetting.isAssertionEncrypted) return [3 /*break*/, 2]; + return [4 /*yield*/, libsaml_1.default.encryptAssertion(entity.idp, entity.sp, rawSamlResponse)]; + case 1: + context = _a.sent(); + if (encryptThenSign) { + //need to decode it + rawSamlResponse = utility_1.default.base64Decode(context); + } + else { + return [2 /*return*/, Promise.resolve({ id: id, context: context })]; + } + _a.label = 2; + case 2: + //sign after encrypting + if (encryptThenSign && + (spSetting.wantMessageSigned || !metadata.sp.isWantAssertionsSigned())) { + rawSamlResponse = libsaml_1.default.constructSAMLSignature(__assign(__assign({}, config), { rawSamlMessage: rawSamlResponse, isMessageSigned: true, transformationAlgorithms: spSetting.transformationAlgorithms, signatureConfig: spSetting.signatureConfig || { + prefix: "ds", + location: { + reference: "/*[local-name(.)='Response']/*[local-name(.)='Issuer']", + action: "after", + }, + } })); + } + return [2 /*return*/, Promise.resolve({ + id: id, + context: utility_1.default.base64Encode(rawSamlResponse), + })]; + case 3: throw new Error("ERR_GENERATE_POST_LOGIN_RESPONSE_MISSING_METADATA"); + } + }); + }); +} +/** + * @desc Generate a base64 encoded logout request + * @param {object} user current logged user (e.g. req.user) + * @param {string} referenceTagXPath reference uri + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} base64 encoded request + */ +function base64LogoutRequest(user, referenceTagXPath, entity, customTagReplacement) { + var metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; + var initSetting = entity.init.entitySetting; + var nameIDFormat = initSetting.nameIDFormat; + var selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + var id = ""; + if (metadata && metadata.init && metadata.target) { + var rawSamlRequest = void 0; + if (initSetting.logoutRequestTemplate && customTagReplacement) { + var template = customTagReplacement(initSetting.logoutRequestTemplate.context); + id = utility_1.get(template, "id", null); + rawSamlRequest = utility_1.get(template, "context", null); + } + else { + id = initSetting.generateID(); + var tvalue = { + ID: id, + Destination: metadata.target.getSingleLogoutService(binding.redirect), + Issuer: metadata.init.getEntityID(), + IssueInstant: new Date().toISOString(), + EntityID: metadata.init.getEntityID(), + NameIDFormat: selectedNameIDFormat, + NameID: user.logoutNameID, + }; + rawSamlRequest = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLogoutRequestTemplate.context, tvalue); + } + if (entity.target.entitySetting.wantLogoutRequestSigned) { + // Need to embeded XML signature + var privateKey = initSetting.privateKey, privateKeyPass = initSetting.privateKeyPass, signatureAlgorithm = initSetting.requestSignatureAlgorithm, transformationAlgorithms = initSetting.transformationAlgorithms; + return { + id: id, + context: libsaml_1.default.constructSAMLSignature({ + referenceTagXPath: referenceTagXPath, + privateKey: privateKey, + privateKeyPass: privateKeyPass, + signatureAlgorithm: signatureAlgorithm, + transformationAlgorithms: transformationAlgorithms, + rawSamlMessage: rawSamlRequest, + signingCert: metadata.init.getX509Certificate("signing"), + signatureConfig: initSetting.signatureConfig || { + prefix: "ds", + location: { + reference: "/*[local-name(.)='LogoutRequest']/*[local-name(.)='Issuer']", + action: "after", + }, + }, + }), + }; + } + return { + id: id, + context: utility_1.default.base64Encode(rawSamlRequest), + }; + } + throw new Error("ERR_GENERATE_POST_LOGOUT_REQUEST_MISSING_METADATA"); +} +/** + * @desc Generate a base64 encoded logout response + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + */ +function base64LogoutResponse(requestInfo, entity, customTagReplacement) { + var metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; + var id = ""; + var initSetting = entity.init.entitySetting; + if (metadata && metadata.init && metadata.target) { + var rawSamlResponse = void 0; + if (initSetting.logoutResponseTemplate) { + var template = customTagReplacement(initSetting.logoutResponseTemplate.context); + id = template.id; + rawSamlResponse = template.context; + } + else { + id = initSetting.generateID(); + var tvalue = { + ID: id, + Destination: metadata.target.getSingleLogoutService(binding.post), + EntityID: metadata.init.getEntityID(), + Issuer: metadata.init.getEntityID(), + IssueInstant: new Date().toISOString(), + StatusCode: urn_1.StatusCode.Success, + InResponseTo: utility_1.get(requestInfo, "extract.request.id", null), + }; + rawSamlResponse = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLogoutResponseTemplate.context, tvalue); + } + if (entity.target.entitySetting.wantLogoutResponseSigned) { + var privateKey = initSetting.privateKey, privateKeyPass = initSetting.privateKeyPass, signatureAlgorithm = initSetting.requestSignatureAlgorithm, transformationAlgorithms = initSetting.transformationAlgorithms; + return { + id: id, + context: libsaml_1.default.constructSAMLSignature({ + isMessageSigned: true, + transformationAlgorithms: transformationAlgorithms, + privateKey: privateKey, + privateKeyPass: privateKeyPass, + signatureAlgorithm: signatureAlgorithm, + rawSamlMessage: rawSamlResponse, + signingCert: metadata.init.getX509Certificate("signing"), + signatureConfig: { + prefix: "ds", + location: { + reference: "/*[local-name(.)='LogoutResponse']/*[local-name(.)='Issuer']", + action: "after", + }, + }, + }), + }; + } + return { + id: id, + context: utility_1.default.base64Encode(rawSamlResponse), + }; + } + throw new Error("ERR_GENERATE_POST_LOGOUT_RESPONSE_MISSING_METADATA"); +} +var postBinding = { + base64LoginRequest: base64LoginRequest, + base64LoginResponse: base64LoginResponse, + base64LogoutRequest: base64LogoutRequest, + base64LogoutResponse: base64LogoutResponse, +}; +exports.default = postBinding; +//# sourceMappingURL=binding-post.js.map \ No newline at end of file diff --git a/build/src/binding-post.js.map b/build/src/binding-post.js.map new file mode 100644 index 00000000..92dd03bb --- /dev/null +++ b/build/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AwB;oBAClD,UAAU,YAAA;oBACV,cAAc,gBAAA;oBACd,kBAAkB,oBAAA;oBAClB,cAAc,EAAE,eAAe;oBAC/B,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;oBACxD,eAAe,EAAE;wBACf,MAAM,EAAE,IAAI;wBACZ,QAAQ,EAAE;4BACR,SAAS,EACP,8DAA8D;4BAChE,MAAM,EAAE,OAAO;yBAChB;qBACF;iBACF,CAAC;aACH,CAAC;SACH;QACD,OAAO;YACL,EAAE,IAAA;YACF,OAAO,EAAE,iBAAO,CAAC,YAAY,CAAC,eAAe,CAAC;SAC/C,CAAC;KACH;IACD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACxE,CAAC;AAED,IAAM,WAAW,GAAG;IAClB,kBAAkB,oBAAA;IAClB,mBAAmB,qBAAA;IACnB,mBAAmB,qBAAA;IACnB,oBAAoB,sBAAA;CACrB,CAAC;AAEF,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/build/src/binding-redirect.d.ts b/build/src/binding-redirect.d.ts new file mode 100644 index 00000000..bfbd5caf --- /dev/null +++ b/build/src/binding-redirect.d.ts @@ -0,0 +1,44 @@ +import { BindingContext } from "./entity"; +import { IdentityProvider as Idp } from "./entity-idp"; +import { ServiceProvider as Sp } from "./entity-sp"; +export interface BuildRedirectConfig { + baseUrl: string; + type: string; + isSigned: boolean; + context: string; + entitySetting: any; + relayState?: string; +} +/** + * @desc Redirect URL for login request + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +declare function loginRequestRedirectURL(entity: { + idp: Idp; + sp: Sp; +}, customTagReplacement?: (template: string) => BindingContext): BindingContext; +/** + * @desc Redirect URL for logout request + * @param {object} user current logged user (e.g. req.user) + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +declare function logoutRequestRedirectURL(user: any, entity: any, relayState?: string, customTagReplacement?: (template: string, tags: object) => BindingContext): BindingContext; +/** + * @desc Redirect URL for logout response + * @param requestInfo + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + */ +declare function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext; +declare const redirectBinding: { + loginRequestRedirectURL: typeof loginRequestRedirectURL; + logoutRequestRedirectURL: typeof logoutRequestRedirectURL; + logoutResponseRedirectURL: typeof logoutResponseRedirectURL; +}; +export default redirectBinding; diff --git a/build/src/binding-redirect.js b/build/src/binding-redirect.js new file mode 100644 index 00000000..e1e7900c --- /dev/null +++ b/build/src/binding-redirect.js @@ -0,0 +1,214 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @file binding-redirect.ts + * @author tngan + * @desc Binding-level API, declare the functions using Redirect binding + */ +var utility_1 = require("./utility"); +var libsaml_1 = require("./libsaml"); +var url = require("url"); +var urn_1 = require("./urn"); +var binding = urn_1.wording.binding; +var urlParams = urn_1.wording.urlParams; +/** + * @private + * @desc Helper of generating URL param/value pair + * @param {string} param key + * @param {string} value value of key + * @param {boolean} first determine whether the param is the starting one in order to add query header '?' + * @return {string} + */ +function pvPair(param, value, first) { + return (first === true ? "?" : "&") + param + "=" + value; +} +/** + * @private + * @desc Refractored part of URL generation for login/logout request + * @return {string} + * @param opts type, isSigned, rawSamlRequest, entitySetting + */ +function buildRedirectURL(opts) { + var baseUrl = opts.baseUrl, type = opts.type, isSigned = opts.isSigned, context = opts.context, entitySetting = opts.entitySetting; + var _a = opts.relayState, relayState = _a === void 0 ? "" : _a; + var noParams = (url.parse(baseUrl).query || []).length === 0; + var queryParam = libsaml_1.default.getQueryParamByType(type); + // In general, this xmlstring is required to do deflate -> base64 -> urlencode + var samlRequest = encodeURIComponent(utility_1.default.base64Encode(utility_1.default.deflateString(context))); + if (relayState !== "") { + relayState = pvPair(urlParams.relayState, encodeURIComponent(relayState)); + } + if (isSigned) { + var sigAlg = pvPair(urlParams.sigAlg, encodeURIComponent(entitySetting.requestSignatureAlgorithm)); + var octetString = samlRequest + relayState + sigAlg; + return (baseUrl + + pvPair(queryParam, octetString, noParams) + + pvPair(urlParams.signature, encodeURIComponent(libsaml_1.default.constructMessageSignature(queryParam + "=" + octetString, entitySetting.privateKey, entitySetting.privateKeyPass, undefined, entitySetting.requestSignatureAlgorithm)))); + } + return baseUrl + pvPair(queryParam, samlRequest + relayState, noParams); +} +/** + * @desc Redirect URL for login request + * @param {object} entity object includes both idp and sp + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +function loginRequestRedirectURL(entity, customTagReplacement) { + var metadata = { + idp: entity.idp.entityMeta, + sp: entity.sp.entityMeta, + }; + var spSetting = entity.sp.entitySetting; + var id = ""; + if (metadata && metadata.idp && metadata.sp) { + var base = metadata.idp.getSingleSignOnService(binding.redirect); + var rawSamlRequest = void 0; + if (spSetting.loginRequestTemplate && customTagReplacement) { + var info = customTagReplacement(spSetting.loginRequestTemplate); + id = utility_1.get(info, "id", null); + rawSamlRequest = utility_1.get(info, "context", null); + } + else { + var nameIDFormat = spSetting.nameIDFormat; + var selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + id = spSetting.generateID(); + rawSamlRequest = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLoginRequestTemplate.context, { + ID: id, + Destination: base, + Issuer: metadata.sp.getEntityID(), + IssueInstant: new Date().toISOString(), + NameIDFormat: selectedNameIDFormat, + AssertionConsumerServiceURL: metadata.sp.getAssertionConsumerService(binding.post), + EntityID: metadata.sp.getEntityID(), + AllowCreate: spSetting.allowCreate, + }); + } + return { + id: id, + context: buildRedirectURL({ + context: rawSamlRequest, + type: urlParams.samlRequest, + isSigned: metadata.sp.isAuthnRequestSigned(), + entitySetting: spSetting, + baseUrl: base, + relayState: spSetting.relayState, + }), + }; + } + throw new Error("ERR_GENERATE_REDIRECT_LOGIN_REQUEST_MISSING_METADATA"); +} +/** + * @desc Redirect URL for logout request + * @param {object} user current logged user (e.g. req.user) + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + * @return {string} redirect URL + */ +function logoutRequestRedirectURL(user, entity, relayState, customTagReplacement) { + var metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; + var initSetting = entity.init.entitySetting; + var id = initSetting.generateID(); + var nameIDFormat = initSetting.nameIDFormat; + var selectedNameIDFormat = Array.isArray(nameIDFormat) + ? nameIDFormat[0] + : nameIDFormat; + if (metadata && metadata.init && metadata.target) { + var base = metadata.target.getSingleLogoutService(binding.redirect); + var rawSamlRequest = void 0; + var requiredTags = { + ID: id, + Destination: base, + EntityID: metadata.init.getEntityID(), + Issuer: metadata.init.getEntityID(), + IssueInstant: new Date().toISOString(), + NameIDFormat: selectedNameIDFormat, + NameID: user.logoutNameID, + SessionIndex: user.sessionIndex, + }; + if (initSetting.logoutRequestTemplate && customTagReplacement) { + var info = customTagReplacement(initSetting.logoutRequestTemplate, requiredTags); + id = utility_1.get(info, "id", null); + rawSamlRequest = utility_1.get(info, "context", null); + } + else { + rawSamlRequest = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLogoutRequestTemplate.context, requiredTags); + } + return { + id: id, + context: buildRedirectURL({ + context: rawSamlRequest, + relayState: relayState, + type: urlParams.logoutRequest, + isSigned: entity.target.entitySetting.wantLogoutRequestSigned, + entitySetting: initSetting, + baseUrl: base, + }), + }; + } + throw new Error("ERR_GENERATE_REDIRECT_LOGOUT_REQUEST_MISSING_METADATA"); +} +/** + * @desc Redirect URL for logout response + * @param requestInfo + * @param {object} entity object includes both idp and sp + * @param relayState + * @param {function} customTagReplacement used when developers have their own login response template + */ +function logoutResponseRedirectURL(requestInfo, entity, relayState, customTagReplacement) { + var metadata = { + init: entity.init.entityMeta, + target: entity.target.entityMeta, + }; + var initSetting = entity.init.entitySetting; + var id = initSetting.generateID(); + if (metadata && metadata.init && metadata.target) { + var base = metadata.target.getSingleLogoutService(binding.redirect); + var rawSamlResponse = void 0; + if (initSetting.logoutResponseTemplate && customTagReplacement) { + var template = customTagReplacement(initSetting.logoutResponseTemplate); + id = utility_1.get(template, "id", null); + rawSamlResponse = utility_1.get(template, "context", null); + } + else { + var tvalue = { + ID: id, + Destination: base, + Issuer: metadata.init.getEntityID(), + EntityID: metadata.init.getEntityID(), + IssueInstant: new Date().toISOString(), + StatusCode: urn_1.namespace.statusCode.success, + }; + if (requestInfo && + requestInfo.extract && + requestInfo.extract.logoutRequest) { + tvalue.InResponseTo = requestInfo.extract.logoutRequest.id; + } + rawSamlResponse = libsaml_1.default.replaceTagsByValue(libsaml_1.default.defaultLogoutResponseTemplate.context, tvalue); + } + return { + id: id, + context: buildRedirectURL({ + baseUrl: base, + type: urlParams.logoutResponse, + isSigned: entity.target.entitySetting.wantLogoutResponseSigned, + context: rawSamlResponse, + entitySetting: initSetting, + relayState: relayState, + }), + }; + } + throw new Error("ERR_GENERATE_REDIRECT_LOGOUT_RESPONSE_MISSING_METADATA"); +} +var redirectBinding = { + loginRequestRedirectURL: loginRequestRedirectURL, + logoutRequestRedirectURL: logoutRequestRedirectURL, + logoutResponseRedirectURL: logoutResponseRedirectURL, +}; +exports.default = redirectBinding; +//# sourceMappingURL=binding-redirect.js.map \ No newline at end of file diff --git a/build/src/binding-redirect.js.map b/build/src/binding-redirect.js.map new file mode 100644 index 00000000..916d3322 --- /dev/null +++ b/build/src/binding-redirect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"binding-redirect.js","sourceRoot":"","sources":["../../src/binding-redirect.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,qCAAyC;AACzC,qCAAgC;AAIhC,yBAA2B;AAC3B,6BAA2C;AAE3C,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAChC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AAWpC;;;;;;;GAO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IAAI;gBACjB,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE;gBACnC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE;gBACrC,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACtC,UAAU,EAAE,eAAS,CAAC,UAAU,CAAC,OAAO;aACzC,CAAC;YACF,IACE,WAAW;gBACX,WAAW,CAAC,OAAO;gBACnB,WAAW,CAAC,OAAO,CAAC,aAAa,EACjC;gBACA,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;aAC5D;YACD,eAAe,GAAG,iBAAO,CAAC,kBAAkB,CAC1C,iBAAO,CAAC,6BAA6B,CAAC,OAAO,EAC7C,MAAM,CACP,CAAC;SACH;QACD,OAAO;YACL,EAAE,IAAA;YACF,OAAO,EAAE,gBAAgB,CAAC;gBACxB,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,SAAS,CAAC,cAAc;gBAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,wBAAwB;gBAC9D,OAAO,EAAE,eAAe;gBACxB,aAAa,EAAE,WAAW;gBAC1B,UAAU,YAAA;aACX,CAAC;SACH,CAAC;KACH;IACD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;AAC5E,CAAC;AAED,IAAM,eAAe,GAAG;IACtB,uBAAuB,yBAAA;IACvB,wBAAwB,0BAAA;IACxB,yBAAyB,2BAAA;CAC1B,CAAC;AAEF,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/build/src/entity-idp.d.ts b/build/src/entity-idp.d.ts new file mode 100644 index 00000000..2167ad02 --- /dev/null +++ b/build/src/entity-idp.d.ts @@ -0,0 +1,44 @@ +/** + * @file entity-idp.ts + * @author tngan + * @desc Declares the actions taken by identity provider + */ +import Entity, { BindingContext, ESamlHttpRequest } from "./entity"; +import { IdentityProviderMetadata, IdentityProviderSettings, ServiceProviderConstructor as ServiceProvider } from "./types"; +/** + * Identity prvider can be configured using either metadata importing or idpSetting + */ +export default function (props: IdentityProviderSettings): IdentityProvider; +/** + * Identity prvider can be configured using either metadata importing or idpSetting + */ +export declare class IdentityProvider extends Entity { + entityMeta: IdentityProviderMetadata; + constructor(idpSetting: IdentityProviderSettings); + /** + * @desc Generates the login response for developers to design their own method + * @param sp object of service provider + * @param requestInfo corresponding request, used to obtain the id + * @param binding protocol binding + * @param user current logged user (e.g. req.user) + * @param customTagReplacement used when developers have their own login response template + * @param encryptThenSign whether or not to encrypt then sign first (if signing) + */ + createLoginResponse(sp: ServiceProvider, requestInfo: { + [key: string]: any; + }, binding: string, user: { + [key: string]: any; + }, customTagReplacement?: (template: string) => BindingContext, encryptThenSign?: boolean): Promise<{ + entityEndpoint: string | string[]; + type: string; + context: string; + id: string; + }>; + /** + * Validation of the parsed URL parameters + * @param sp ServiceProvider instance + * @param binding Protocol binding + * @param req RequesmessageSigningOrderst + */ + parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest): Promise; +} diff --git a/build/src/entity-idp.js b/build/src/entity-idp.js new file mode 100644 index 00000000..e874cb7e --- /dev/null +++ b/build/src/entity-idp.js @@ -0,0 +1,162 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdentityProvider = void 0; +/** + * @file entity-idp.ts + * @author tngan + * @desc Declares the actions taken by identity provider + */ +var entity_1 = require("./entity"); +var libsaml_1 = require("./libsaml"); +var urn_1 = require("./urn"); +var binding_post_1 = require("./binding-post"); +var flow_1 = require("./flow"); +var utility_1 = require("./utility"); +/** + * Identity prvider can be configured using either metadata importing or idpSetting + */ +function default_1(props) { + return new IdentityProvider(props); +} +exports.default = default_1; +/** + * Identity prvider can be configured using either metadata importing or idpSetting + */ +var IdentityProvider = /** @class */ (function (_super) { + __extends(IdentityProvider, _super); + function IdentityProvider(idpSetting) { + var _this = this; + var defaultIdpEntitySetting = { + wantAuthnRequestsSigned: false, + tagPrefix: { + encryptedAssertion: "saml", + }, + }; + var entitySetting = Object.assign(defaultIdpEntitySetting, idpSetting); + // build attribute part + if (idpSetting.loginResponseTemplate) { + if (utility_1.isString(idpSetting.loginResponseTemplate.context) && + Array.isArray(idpSetting.loginResponseTemplate.attributes)) { + var replacement = { + AttributeStatement: libsaml_1.default.attributeStatementBuilder(idpSetting.loginResponseTemplate.attributes), + }; + entitySetting.loginResponseTemplate = __assign(__assign({}, entitySetting.loginResponseTemplate), { context: libsaml_1.default.replaceTagsByValue(entitySetting.loginResponseTemplate.context, replacement) }); + } + else { + console.warn("Invalid login response template"); + } + } + _this = _super.call(this, entitySetting, "idp") || this; + return _this; + } + /** + * @desc Generates the login response for developers to design their own method + * @param sp object of service provider + * @param requestInfo corresponding request, used to obtain the id + * @param binding protocol binding + * @param user current logged user (e.g. req.user) + * @param customTagReplacement used when developers have their own login response template + * @param encryptThenSign whether or not to encrypt then sign first (if signing) + */ + IdentityProvider.prototype.createLoginResponse = function (sp, requestInfo, binding, user, customTagReplacement, encryptThenSign) { + return __awaiter(this, void 0, void 0, function () { + var protocol, context; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + protocol = urn_1.namespace.binding[binding]; + if (!(protocol === urn_1.namespace.binding.post)) return [3 /*break*/, 2]; + return [4 /*yield*/, binding_post_1.default.base64LoginResponse(requestInfo, { + idp: this, + sp: sp, + }, user, customTagReplacement, encryptThenSign)]; + case 1: + context = _a.sent(); + return [2 /*return*/, __assign(__assign({}, context), { entityEndpoint: sp.entityMeta.getAssertionConsumerService(binding), type: "SAMLResponse" })]; + case 2: throw new Error("ERR_CREATE_RESPONSE_UNDEFINED_BINDING"); + } + }); + }); + }; + /** + * Validation of the parsed URL parameters + * @param sp ServiceProvider instance + * @param binding Protocol binding + * @param req RequesmessageSigningOrderst + */ + IdentityProvider.prototype.parseLoginRequest = function (sp, binding, req) { + var self = this; + return flow_1.flow({ + from: sp, + self: self, + checkSignature: self.entityMeta.isWantAuthnRequestsSigned(), + parserType: "SAMLRequest", + type: "login", + binding: binding, + request: req, + }); + }; + return IdentityProvider; +}(entity_1.default)); +exports.IdentityProvider = IdentityProvider; +//# sourceMappingURL=entity-idp.js.map \ No newline at end of file diff --git a/build/src/entity-idp.js.map b/build/src/entity-idp.js.map new file mode 100644 index 00000000..afc8485d --- /dev/null +++ b/build/src/entity-idp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity-idp.js","sourceRoot":"","sources":["../../src/entity-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAAoE;AAOpE,qCAAgC;AAChC,6BAAkC;AAClC,+CAAyC;AACzC,+BAA8B;AAC9B,qCAAqC;AAErC;;GAEG;AACH,mBAAyB,KAA+B;IACtD,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAFD,4BAEC;AAED;;GAEG;AACH;IAAsC,oCAAM;IAG1C,0BAAY,UAAoC;QAAhD,iBA+BC;QA9BC,IAAM,uBAAuB,GAAG;YAC9B,uBAAuB,EAAE,KAAK;YAC9B,SAAS,EAAE;gBACT,kBAAkB,EAAE,MAAM;aAC3B;SACF,CAAC;QACF,IAAM,aAAa,GA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B;4BAEJ,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;;;;KAC1D;IAED;;;;;OAKG;IACH,4CAAiB,GAAjB,UACE,EAAmB,EACnB,OAAe,EACf,GAAqB;QAErB,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,yBAAyB,EAAE;YAC3D,UAAU,EAAE,aAAa;YACzB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,GAAG;SACb,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAnGD,CAAsC,gBAAM,GAmG3C;AAnGY,4CAAgB"} \ No newline at end of file diff --git a/build/src/entity-sp.d.ts b/build/src/entity-sp.d.ts new file mode 100644 index 00000000..542f2382 --- /dev/null +++ b/build/src/entity-sp.d.ts @@ -0,0 +1,35 @@ +/** + * @file entity-sp.ts + * @author tngan + * @desc Declares the actions taken by service provider + */ +import Entity, { BindingContext, ESamlHttpRequest, PostBindingContext } from "./entity"; +import { IdentityProviderConstructor as IdentityProvider, ServiceProviderMetadata, ServiceProviderSettings } from "./types"; +export default function (props: ServiceProviderSettings): ServiceProvider; +/** + * @desc Service provider can be configured using either metadata importing or spSetting + * @param {object} spSettingimport { FlowResult } from '../types/src/flow.d'; + + */ +export declare class ServiceProvider extends Entity { + entityMeta: ServiceProviderMetadata; + /** + * @desc Inherited from Entity + * @param {object} spSetting setting of service provider + */ + constructor(spSetting: ServiceProviderSettings); + /** + * @desc Generates the login request for developers to design their own method + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ + createLoginRequest(idp: IdentityProvider, binding?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext | PostBindingContext; + /** + * @desc Validation of the parsed the URL parameters + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param request + */ + parseLoginResponse(idp: any, binding: any, request: ESamlHttpRequest): Promise; +} diff --git a/build/src/entity-sp.js b/build/src/entity-sp.js new file mode 100644 index 00000000..ec777ae2 --- /dev/null +++ b/build/src/entity-sp.js @@ -0,0 +1,111 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ServiceProvider = void 0; +/** + * @file entity-sp.ts + * @author tngan + * @desc Declares the actions taken by service provider + */ +var entity_1 = require("./entity"); +var urn_1 = require("./urn"); +var binding_redirect_1 = require("./binding-redirect"); +var binding_post_1 = require("./binding-post"); +var flow_1 = require("./flow"); +/* + * @desc interface function + */ +function default_1(props) { + return new ServiceProvider(props); +} +exports.default = default_1; +/** + * @desc Service provider can be configured using either metadata importing or spSetting + * @param {object} spSettingimport { FlowResult } from '../types/src/flow.d'; + + */ +var ServiceProvider = /** @class */ (function (_super) { + __extends(ServiceProvider, _super); + /** + * @desc Inherited from Entity + * @param {object} spSetting setting of service provider + */ + function ServiceProvider(spSetting) { + var _this = this; + var entitySetting = Object.assign({ + authnRequestsSigned: false, + wantAssertionsSigned: false, + wantMessageSigned: false, + }, spSetting); + _this = _super.call(this, entitySetting, "sp") || this; + return _this; + } + /** + * @desc Generates the login request for developers to design their own method + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ + ServiceProvider.prototype.createLoginRequest = function (idp, binding, customTagReplacement) { + if (binding === void 0) { binding = "redirect"; } + var nsBinding = urn_1.namespace.binding; + var protocol = nsBinding[binding]; + if (this.entityMeta.isAuthnRequestSigned() !== + idp.entityMeta.isWantAuthnRequestsSigned()) { + throw new Error("ERR_METADATA_CONFLICT_REQUEST_SIGNED_FLAG"); + } + if (protocol === nsBinding.redirect) { + return binding_redirect_1.default.loginRequestRedirectURL({ idp: idp, sp: this }, customTagReplacement); + } + if (protocol === nsBinding.post) { + var context = binding_post_1.default.base64LoginRequest("/*[local-name(.)='AuthnRequest']", { idp: idp, sp: this }, customTagReplacement); + return __assign(__assign({}, context), { relayState: this.entitySetting.relayState, entityEndpoint: idp.entityMeta.getSingleSignOnService(binding), type: "SAMLRequest" }); + } + // Will support artifact in the next release + throw new Error("ERR_SP_LOGIN_REQUEST_UNDEFINED_BINDING"); + }; + /** + * @desc Validation of the parsed the URL parameters + * @param {IdentityProvider} idp object of identity provider + * @param {string} binding protocol binding + * @param request + */ + ServiceProvider.prototype.parseLoginResponse = function (idp, binding, request) { + var self = this; + return flow_1.flow({ + from: idp, + self: self, + checkSignature: true, + parserType: "SAMLResponse", + type: "login", + binding: binding, + request: request, + }); + }; + return ServiceProvider; +}(entity_1.default)); +exports.ServiceProvider = ServiceProvider; +//# sourceMappingURL=entity-sp.js.map \ No newline at end of file diff --git a/build/src/entity-sp.js.map b/build/src/entity-sp.js.map new file mode 100644 index 00000000..10d8e8ec --- /dev/null +++ b/build/src/entity-sp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity-sp.js","sourceRoot":"","sources":["../../src/entity-sp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAIkB;AAMlB,6BAAkC;AAClC,uDAAiD;AACjD,+CAAyC;AACzC,+BAA8B;AA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U,CAAC,sBAAsB,CACnD,OAAO,CACE,EACX,IAAI,EAAE,aAAa,IACnB;SACH;QACD,4CAA4C;QAC5C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACI,4CAAkB,GAAzB,UAA0B,GAAG,EAAE,OAAO,EAAE,OAAyB;QAC/D,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,cAAc;YAC1B,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IACH,sBAAC;AAAD,CAAC,AAnFD,CAAqC,gBAAM,GAmF1C;AAnFY,0CAAe"} \ No newline at end of file diff --git a/build/src/entity.d.ts b/build/src/entity.d.ts new file mode 100644 index 00000000..a2d4c316 --- /dev/null +++ b/build/src/entity.d.ts @@ -0,0 +1,90 @@ +/// +import { IdpMetadata as IdpMetadataConstructor } from "./metadata-idp"; +import { SpMetadata as SpMetadataConstructor } from "./metadata-sp"; +import { EntitySetting, MetadataIdpConstructor, MetadataSpConstructor } from "./types"; +export interface ESamlHttpRequest { + query?: any; + body?: any; + octetString?: string; +} +export interface BindingContext { + context: string; + id: string; +} +export interface PostBindingContext extends BindingContext { + relayState?: string; + entityEndpoint: string; + type: string; +} +export interface ParseResult { + samlContent: string; + extract: any; + sigAlg: string; +} +export declare type EntityConstructor = (MetadataIdpConstructor | MetadataSpConstructor) & { + metadata?: string | Buffer; +}; +export default class Entity { + entitySetting: EntitySetting; + entityType: string; + entityMeta: IdpMetadataConstructor | SpMetadataConstructor; + /** + * @param entitySetting + * @param entityType + */ + constructor(entitySetting: EntityConstructor, entityType: "idp" | "sp"); + /** + * @desc Returns the setting of entity + * @return {object} + */ + getEntitySetting(): EntitySetting; + /** + * @desc Returns the xml string of entity metadata + * @return {string} + */ + getMetadata(): string; + /** + * @desc Exports the entity metadata into specified folder + * @param {string} exportFile indicates the file name + */ + exportMetadata(exportFile: string): void; + /** * @desc Verify fields with the one specified in metadata + * @param {string/[string]} field is a string or an array of string indicating the field value in SAML message + * @param {string} metaField is a string indicating the same field specified in metadata + * @return {boolean} True/False + */ + verifyFields(field: string | string[], metaField: string): boolean; + /** @desc Generates the logout request for developers to design their own method + * @param targetEntity + * @param {string} binding protocol binding + * @param {object} user current logged user (e.g. user) + * @param {string} relayState the URL to which to redirect the user when logout is complete + * @param {function} customTagReplacement used when developers have their own login response template + */ + createLogoutRequest(targetEntity: any, binding: any, user: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext; + /** + * @desc Generates the logout response for developers to design their own method + * @param target + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {string} relayState the URL to which to redirect the user when logout is complete. + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ + createLogoutResponse(target: any, requestInfo: any, binding: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext; + /** + * @desc Validation of the parsed the URL parameters + * @param from + * @param {string} binding protocol binding + * @param request + * @return {Promise} + */ + parseLogoutRequest(from: any, binding: any, request: ESamlHttpRequest): Promise; + /** + * @desc Validation of the parsed the URL parameters + * @param from + * @param {string} binding protocol binding + * @param request + * @return {Promise} + */ + parseLogoutResponse(from: any, binding: any, request: ESamlHttpRequest): Promise; +} diff --git a/build/src/entity.js b/build/src/entity.js new file mode 100644 index 00000000..c223e80a --- /dev/null +++ b/build/src/entity.js @@ -0,0 +1,204 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @file entity.ts + * @author tngan + * @desc An abstraction for identity provider and service provider. + */ +var utility_1 = require("./utility"); +var urn_1 = require("./urn"); +var uuid_1 = require("uuid"); +var metadata_idp_1 = require("./metadata-idp"); +var metadata_sp_1 = require("./metadata-sp"); +var binding_redirect_1 = require("./binding-redirect"); +var binding_post_1 = require("./binding-post"); +var flow_1 = require("./flow"); +var dataEncryptionAlgorithm = urn_1.algorithms.encryption.data; +var keyEncryptionAlgorithm = urn_1.algorithms.encryption.key; +var signatureAlgorithms = urn_1.algorithms.signature; +var messageSigningOrders = urn_1.messageConfigurations.signingOrder; +var defaultEntitySetting = { + wantLogoutResponseSigned: false, + messageSigningOrder: messageSigningOrders.SIGN_THEN_ENCRYPT, + wantLogoutRequestSigned: false, + allowCreate: false, + isAssertionEncrypted: false, + requestSignatureAlgorithm: signatureAlgorithms.RSA_SHA256, + dataEncryptionAlgorithm: dataEncryptionAlgorithm.AES_256, + keyEncryptionAlgorithm: keyEncryptionAlgorithm.RSA_1_5, + generateID: function () { return "_" + uuid_1.v4(); }, + relayState: "", +}; +var Entity = /** @class */ (function () { + /** + * @param entitySetting + * @param entityType + */ + function Entity(entitySetting, entityType) { + this.entitySetting = Object.assign({}, defaultEntitySetting, entitySetting); + var metadata = entitySetting.metadata || entitySetting; + switch (entityType) { + case "idp": + this.entityMeta = metadata_idp_1.default(metadata); + // setting with metadata has higher precedence + this.entitySetting.wantAuthnRequestsSigned = this.entityMeta.isWantAuthnRequestsSigned(); + this.entitySetting.nameIDFormat = + this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; + break; + case "sp": + this.entityMeta = metadata_sp_1.default(metadata); + // setting with metadata has higher precedence + this.entitySetting.authnRequestsSigned = this.entityMeta.isAuthnRequestSigned(); + this.entitySetting.wantAssertionsSigned = this.entityMeta.isWantAssertionsSigned(); + this.entitySetting.nameIDFormat = + this.entityMeta.getNameIDFormat() || this.entitySetting.nameIDFormat; + break; + default: + throw new Error("ERR_UNDEFINED_ENTITY_TYPE"); + } + } + /** + * @desc Returns the setting of entity + * @return {object} + */ + Entity.prototype.getEntitySetting = function () { + return this.entitySetting; + }; + /** + * @desc Returns the xml string of entity metadata + * @return {string} + */ + Entity.prototype.getMetadata = function () { + return this.entityMeta.getMetadata(); + }; + /** + * @desc Exports the entity metadata into specified folder + * @param {string} exportFile indicates the file name + */ + Entity.prototype.exportMetadata = function (exportFile) { + return this.entityMeta.exportMetadata(exportFile); + }; + /** * @desc Verify fields with the one specified in metadata + * @param {string/[string]} field is a string or an array of string indicating the field value in SAML message + * @param {string} metaField is a string indicating the same field specified in metadata + * @return {boolean} True/False + */ + Entity.prototype.verifyFields = function (field, metaField) { + if (utility_1.isString(field)) { + return field === metaField; + } + if (utility_1.isNonEmptyArray(field)) { + var res_1 = true; + field.forEach(function (f) { + if (f !== metaField) { + res_1 = false; + return; + } + }); + return res_1; + } + return false; + }; + /** @desc Generates the logout request for developers to design their own method + * @param targetEntity + * @param {string} binding protocol binding + * @param {object} user current logged user (e.g. user) + * @param {string} relayState the URL to which to redirect the user when logout is complete + * @param {function} customTagReplacement used when developers have their own login response template + */ + Entity.prototype.createLogoutRequest = function (targetEntity, binding, user, relayState, customTagReplacement) { + if (relayState === void 0) { relayState = ""; } + if (binding === urn_1.wording.binding.redirect) { + return binding_redirect_1.default.logoutRequestRedirectURL(user, { + init: this, + target: targetEntity, + }, relayState, customTagReplacement); + } + if (binding === urn_1.wording.binding.post) { + var entityEndpoint = targetEntity.entityMeta.getSingleLogoutService(binding); + var context = binding_post_1.default.base64LogoutRequest(user, "/*[local-name(.)='LogoutRequest']", { init: this, target: targetEntity }, customTagReplacement); + return __assign(__assign({}, context), { relayState: relayState, + entityEndpoint: entityEndpoint, type: "SAMLRequest" }); + } + // Will support artifact in the next release + throw new Error("ERR_UNDEFINED_BINDING"); + }; + /** + * @desc Generates the logout response for developers to design their own method + * @param target + * @param {object} requestInfo corresponding request, used to obtain the id + * @param {string} relayState the URL to which to redirect the user when logout is complete. + * @param {string} binding protocol binding + * @param {function} customTagReplacement used when developers have their own login response template + */ + Entity.prototype.createLogoutResponse = function (target, requestInfo, binding, relayState, customTagReplacement) { + if (relayState === void 0) { relayState = ""; } + var protocol = urn_1.namespace.binding[binding]; + if (protocol === urn_1.namespace.binding.redirect) { + return binding_redirect_1.default.logoutResponseRedirectURL(requestInfo, { + init: this, + target: target, + }, relayState, customTagReplacement); + } + if (protocol === urn_1.namespace.binding.post) { + var context = binding_post_1.default.base64LogoutResponse(requestInfo, { + init: this, + target: target, + }, customTagReplacement); + return __assign(__assign({}, context), { relayState: relayState, entityEndpoint: target.entityMeta.getSingleLogoutService(binding), type: "SAMLResponse" }); + } + throw new Error("ERR_CREATE_LOGOUT_RESPONSE_UNDEFINED_BINDING"); + }; + /** + * @desc Validation of the parsed the URL parameters + * @param from + * @param {string} binding protocol binding + * @param request + * @return {Promise} + */ + Entity.prototype.parseLogoutRequest = function (from, binding, request) { + var self = this; + return flow_1.flow({ + from: from, + self: self, + type: "logout", + parserType: "LogoutRequest", + checkSignature: this.entitySetting.wantLogoutRequestSigned, + binding: binding, + request: request, + }); + }; + /** + * @desc Validation of the parsed the URL parameters + * @param from + * @param {string} binding protocol binding + * @param request + * @return {Promise} + */ + Entity.prototype.parseLogoutResponse = function (from, binding, request) { + var self = this; + return flow_1.flow({ + from: from, + self: self, + type: "logout", + parserType: "LogoutResponse", + checkSignature: self.entitySetting.wantLogoutResponseSigned, + binding: binding, + request: request, + }); + }; + return Entity; +}()); +exports.default = Entity; +//# sourceMappingURL=entity.js.map \ No newline at end of file diff --git a/build/src/entity.js.map b/build/src/entity.js.map new file mode 100644 index 00000000..437af174 --- /dev/null +++ b/build/src/entity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;GAIG;AACH,qCAAsD;AACtD,6BAA8E;AAC9E,6BAAoC;AACpC,+CAEwB;AACxB,6CAAgF;AAChF,uDAAiD;AACjD,+CAA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AAE;YACvC,IAAM,OAAO,GAAG,sBAAW,CAAC,oBAAoB,CAC9C,WAAW,EACX;gBACE,IAAI,EAAE,IAAI;gBACV,MAAM,QAAA;aACP,EACD,oBAAoB,CACrB,CAAC;YACF,6BACK,OAAO,KACV,UAAU,YAAA,EACV,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,sBAAsB,CAAC,OAAO,CAAC,EACjE,IAAI,EAAE,cAAc,IACpB;SACH;QACD,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;OAMG;IACH,mCAAkB,GAAlB,UAAmB,IAAI,EAAE,OAAO,EAAE,OAAyB;QACzD,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,eAAe;YAC3B,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,uBAAuB;YAC1D,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,oCAAmB,GAAnB,UAAoB,IAAI,EAAE,OAAO,EAAE,OAAyB;QAC1D,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,gBAAgB;YAC5B,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,wBAAwB;YAC3D,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AAlND,IAkNC"} \ No newline at end of file diff --git a/build/src/extractor.d.ts b/build/src/extractor.d.ts new file mode 100644 index 00000000..6b5932a4 --- /dev/null +++ b/build/src/extractor.d.ts @@ -0,0 +1,25 @@ +interface ExtractorField { + key: string; + localPath: string[] | string[][]; + attributes: string[]; + index?: string[]; + attributePath?: string[]; + context?: boolean; +} +export declare type ExtractorFields = ExtractorField[]; +export declare const loginRequestFields: ExtractorFields; +export declare const loginResponseStatusFields: { + key: string; + localPath: string[]; + attributes: string[]; +}[]; +export declare const logoutResponseStatusFields: { + key: string; + localPath: string[]; + attributes: string[]; +}[]; +export declare const loginResponseFields: (assertion: any) => ExtractorFields; +export declare const logoutRequestFields: ExtractorFields; +export declare const logoutResponseFields: ExtractorFields; +export declare function extract(context: string, fields: any): any; +export {}; diff --git a/build/src/extractor.js b/build/src/extractor.js new file mode 100644 index 00000000..e37064e0 --- /dev/null +++ b/build/src/extractor.js @@ -0,0 +1,366 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extract = exports.logoutResponseFields = exports.logoutRequestFields = exports.loginResponseFields = exports.logoutResponseStatusFields = exports.loginResponseStatusFields = exports.loginRequestFields = void 0; +var xmldom_1 = require("xmldom"); +var xpath_1 = require("xpath"); +var utility_1 = require("./utility"); +var camelcase_1 = require("camelcase"); +var dom = xmldom_1.DOMParser; +function buildAbsoluteXPath(paths) { + return paths.reduce(function (currentPath, name) { + var appendedPath = currentPath; + var isWildcard = name.startsWith("~"); + if (isWildcard) { + var pathName = name.replace("~", ""); + appendedPath = currentPath + ("/*[contains(local-name(), '" + pathName + "')]"); + } + if (!isWildcard) { + appendedPath = currentPath + ("/*[local-name(.)='" + name + "']"); + } + return appendedPath; + }, ""); +} +function buildAttributeXPath(attributes) { + if (attributes.length === 0) { + return "/text()"; + } + if (attributes.length === 1) { + return "/@" + attributes[0]; + } + var filters = attributes + .map(function (attribute) { return "name()='" + attribute + "'"; }) + .join(" or "); + return "/@*[" + filters + "]"; +} +exports.loginRequestFields = [ + { + key: "request", + localPath: ["AuthnRequest"], + attributes: [ + "ID", + "IssueInstant", + "Destination", + "AssertionConsumerServiceURL", + ], + }, + { + key: "issuer", + localPath: ["AuthnRequest", "Issuer"], + attributes: [], + }, + { + key: "nameIDPolicy", + localPath: ["AuthnRequest", "NameIDPolicy"], + attributes: ["Format", "AllowCreate"], + }, + { + key: "authnContextClassRef", + localPath: ["AuthnRequest", "AuthnContextClassRef"], + attributes: [], + }, + { + key: "signature", + localPath: ["AuthnRequest", "Signature"], + attributes: [], + context: true, + }, +]; +// support two-tiers status code +exports.loginResponseStatusFields = [ + { + key: "top", + localPath: ["Response", "Status", "StatusCode"], + attributes: ["Value"], + }, + { + key: "second", + localPath: ["Response", "Status", "StatusCode", "StatusCode"], + attributes: ["Value"], + }, +]; +// support two-tiers status code +exports.logoutResponseStatusFields = [ + { + key: "top", + localPath: ["LogoutResponse", "Status", "StatusCode"], + attributes: ["Value"], + }, + { + key: "second", + localPath: ["LogoutResponse", "Status", "StatusCode", "StatusCode"], + attributes: ["Value"], + }, +]; +exports.loginResponseFields = function (assertion) { return [ + { + key: "conditions", + localPath: ["Assertion", "Conditions"], + attributes: ["NotBefore", "NotOnOrAfter"], + shortcut: assertion, + }, + { + key: "response", + localPath: ["Response"], + attributes: ["ID", "IssueInstant", "Destination", "InResponseTo"], + }, + { + key: "audience", + localPath: ["Assertion", "Conditions", "AudienceRestriction", "Audience"], + attributes: [], + shortcut: assertion, + }, + // { + // key: 'issuer', + // localPath: ['Response', 'Issuer'], + // attributes: [] + // }, + { + key: "issuer", + localPath: ["Assertion", "Issuer"], + attributes: [], + shortcut: assertion, + }, + { + key: "nameID", + localPath: ["Assertion", "Subject", "NameID"], + attributes: [], + shortcut: assertion, + }, + { + key: "sessionIndex", + localPath: ["Assertion", "AuthnStatement"], + attributes: ["AuthnInstant", "SessionNotOnOrAfter", "SessionIndex"], + shortcut: assertion, + }, + { + key: "attributes", + localPath: ["Assertion", "AttributeStatement", "Attribute"], + index: ["Name"], + attributePath: ["AttributeValue"], + attributes: [], + shortcut: assertion, + }, +]; }; +exports.logoutRequestFields = [ + { + key: "request", + localPath: ["LogoutRequest"], + attributes: ["ID", "IssueInstant", "Destination"], + }, + { + key: "issuer", + localPath: ["LogoutRequest", "Issuer"], + attributes: [], + }, + { + key: "nameID", + localPath: ["LogoutRequest", "NameID"], + attributes: [], + }, + { + key: "signature", + localPath: ["LogoutRequest", "Signature"], + attributes: [], + context: true, + }, +]; +exports.logoutResponseFields = [ + { + key: "response", + localPath: ["LogoutResponse"], + attributes: ["ID", "Destination", "InResponseTo"], + }, + { + key: "issuer", + localPath: ["LogoutResponse", "Issuer"], + attributes: [], + }, + { + key: "signature", + localPath: ["LogoutResponse", "Signature"], + attributes: [], + context: true, + }, +]; +function extract(context, fields) { + var rootDoc = new dom().parseFromString(context); + return fields.reduce(function (result, field) { + var _a, _b, _c, _d, _e, _f; + // get essential fields + var key = field.key; + var localPath = field.localPath; + var attributes = field.attributes; + var isEntire = field.context; + var shortcut = field.shortcut; + // get optional fields + var index = field.index; + var attributePath = field.attributePath; + // set allowing overriding if there is a shortcut injected + var targetDoc = rootDoc; + // if shortcut is used, then replace the doc + // it's a design for overriding the doc used during runtime + if (shortcut) { + targetDoc = new dom().parseFromString(shortcut); + } + // special case: multiple path + /* + { + key: 'issuer', + localPath: [ + ['Response', 'Issuer'], + ['Response', 'Assertion', 'Issuer'] + ], + attributes: [] + } + */ + if (localPath.every(function (path) { return Array.isArray(path); })) { + var multiXPaths = localPath + .map(function (path) { + // not support attribute yet, so ignore it + return buildAbsoluteXPath(path) + "/text()"; + }) + .join(" | "); + return __assign(__assign({}, result), (_a = {}, _a[key] = utility_1.uniq(xpath_1.select(multiXPaths, targetDoc) + .map(function (n) { return n.nodeValue; }) + .filter(utility_1.notEmpty)), _a)); + } + // eo special case: multiple path + var baseXPath = buildAbsoluteXPath(localPath); + var attributeXPath = buildAttributeXPath(attributes); + // special case: get attributes where some are in child, some are in parent + /* + { + key: 'attributes', + localPath: ['Response', 'Assertion', 'AttributeStatement', 'Attribute'], + index: ['Name'], + attributePath: ['AttributeValue'], + attributes: [] + } + */ + if (index && attributePath) { + // find the index in localpath + var indexPath = buildAttributeXPath(index); + var fullLocalXPath = "" + baseXPath + indexPath; + var parentNodes = xpath_1.select(baseXPath, targetDoc); + // [uid, mail, edupersonaffiliation], ready for aggregate + var parentAttributes = xpath_1.select(fullLocalXPath, targetDoc).map(function (n) { return n.value; }); + // [attribute, attributevalue] + var childXPath = buildAbsoluteXPath([utility_1.last(localPath)].concat(attributePath)); + var childAttributeXPath = buildAttributeXPath(attributes); + var fullChildXPath_1 = "" + childXPath + childAttributeXPath; + // [ 'test', 'test@example.com', [ 'users', 'examplerole1' ] ] + var childAttributes = parentNodes.map(function (node) { + var nodeDoc = new dom().parseFromString(node.toString()); + if (attributes.length === 0) { + var childValues = xpath_1.select(fullChildXPath_1, nodeDoc).map(function (n) { return n.nodeValue; }); + if (childValues.length === 1) { + return childValues[0]; + } + return childValues; + } + if (attributes.length > 0) { + var childValues = xpath_1.select(fullChildXPath_1, nodeDoc).map(function (n) { return n.value; }); + if (childValues.length === 1) { + return childValues[0]; + } + return childValues; + } + return null; + }); + // aggregation + var obj = utility_1.zipObject(parentAttributes, childAttributes, false); + return __assign(__assign({}, result), (_b = {}, _b[key] = obj, _b)); + } + // case: fetch entire content, only allow one existence + /* + { + key: 'signature', + localPath: ['AuthnRequest', 'Signature'], + attributes: [], + context: true + } + */ + if (isEntire) { + var node = xpath_1.select(baseXPath, targetDoc); + var value = null; + if (node.length === 1) { + value = node[0].toString(); + } + if (node.length > 1) { + value = node.map(function (n) { return n.toString(); }); + } + return __assign(__assign({}, result), (_c = {}, _c[key] = value, _c)); + } + // case: multiple attribute + /* + { + key: 'nameIDPolicy', + localPath: ['AuthnRequest', 'NameIDPolicy'], + attributes: ['Format', 'AllowCreate'] + } + */ + if (attributes.length > 1) { + var baseNode = xpath_1.select(baseXPath, targetDoc).map(function (n) { + return n.toString(); + }); + var childXPath_1 = "" + buildAbsoluteXPath([ + utility_1.last(localPath), + ]) + attributeXPath; + var attributeValues = baseNode.map(function (node) { + var nodeDoc = new dom().parseFromString(node); + return xpath_1.select(childXPath_1, nodeDoc).reduce(function (r, n) { + r[camelcase_1.default(n.name)] = n.value; + return r; + }, {}); + }); + return __assign(__assign({}, result), (_d = {}, _d[key] = attributeValues.length === 1 ? attributeValues[0] : attributeValues, _d)); + } + // case: single attribute + /* + { + key: 'statusCode', + localPath: ['Response', 'Status', 'StatusCode'], + attributes: ['Value'], + } + */ + if (attributes.length === 1) { + var fullPath = "" + baseXPath + attributeXPath; + var attributeValues = xpath_1.select(fullPath, targetDoc).map(function (n) { return n.value; }); + return __assign(__assign({}, result), (_e = {}, _e[key] = attributeValues[0], _e)); + } + // case: zero attribute + /* + { + key: 'issuer', + localPath: ['AuthnRequest', 'Issuer'], + attributes: [] + } + */ + if (attributes.length === 0) { + var attributeValue = null; + var node = xpath_1.select(baseXPath, targetDoc); + if (node.length === 1) { + var fullPath = "string(" + baseXPath + attributeXPath + ")"; + attributeValue = xpath_1.select(fullPath, targetDoc); + } + if (node.length > 1) { + attributeValue = node.map(function (n) { return n.firstChild.nodeValue; }); + } + return __assign(__assign({}, result), (_f = {}, _f[key] = attributeValue, _f)); + } + return result; + }, {}); +} +exports.extract = extract; +//# sourceMappingURL=extractor.js.map \ No newline at end of file diff --git a/build/src/extractor.js.map b/build/src/extractor.js.map new file mode 100644 index 00000000..bd8732cb --- /dev/null +++ b/build/src/extractor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,+BAA8C;AAC9C,qCAA4D;AAC5D,uCAAkC;AAElC,IAAM,GAAG,GAAG,kBAAS,CAAC;AAatB,SAAS,kBAAkB,CAAC,KAAK;IAC/B,OAAO,KAAK,CAAC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OACrB;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA/MD,0BA+MC"} \ No newline at end of file diff --git a/build/src/flow.d.ts b/build/src/flow.d.ts new file mode 100644 index 00000000..73d74a2b --- /dev/null +++ b/build/src/flow.d.ts @@ -0,0 +1,5 @@ +export interface FlowResult { + samlContent: string; + extract: any; +} +export declare function flow(options: any): Promise; diff --git a/build/src/flow.js b/build/src/flow.js new file mode 100644 index 00000000..ad087e3f --- /dev/null +++ b/build/src/flow.js @@ -0,0 +1,275 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.flow = void 0; +var utility_1 = require("./utility"); +var validator_1 = require("./validator"); +var libsaml_1 = require("./libsaml"); +var extractor_1 = require("./extractor"); +var urn_1 = require("./urn"); +var bindDict = urn_1.wording.binding; +var urlParams = urn_1.wording.urlParams; +// get the default extractor fields based on the parserType +function getDefaultExtractorFields(parserType, assertion) { + switch (parserType) { + case urn_1.ParserType.SAMLRequest: + return extractor_1.loginRequestFields; + case urn_1.ParserType.SAMLResponse: + if (!assertion) { + // unexpected hit + throw new Error("ERR_EMPTY_ASSERTION"); + } + return extractor_1.loginResponseFields(assertion); + case urn_1.ParserType.LogoutRequest: + return extractor_1.logoutRequestFields; + case urn_1.ParserType.LogoutResponse: + return extractor_1.logoutResponseFields; + default: + throw new Error("ERR_UNDEFINED_PARSERTYPE"); + } +} +// proceed the redirect binding flow +function redirectFlow(options) { + return __awaiter(this, void 0, void 0, function () { + var request, parserType, _a, checkSignature, from, query, octetString, sigAlg, signature, targetEntityMetadata, direction, content, xmlString, e_1, extractorFields, parseResult, base64Signature, decodeSigAlg, verified; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + request = options.request, parserType = options.parserType, _a = options.checkSignature, checkSignature = _a === void 0 ? true : _a, from = options.from; + query = request.query, octetString = request.octetString; + sigAlg = query.SigAlg, signature = query.Signature; + targetEntityMetadata = from.entityMeta; + direction = libsaml_1.default.getQueryParamByType(parserType); + content = query[direction]; + // query must contain the saml content + if (content === undefined) { + return [2 /*return*/, Promise.reject("ERR_REDIRECT_FLOW_BAD_ARGS")]; + } + xmlString = utility_1.inflateString(decodeURIComponent(content)); + if (!(parserType === urlParams.samlRequest || + parserType === urlParams.logoutRequest || + parserType === urlParams.logoutResponse)) return [3 /*break*/, 4]; + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + return [4 /*yield*/, libsaml_1.default.isValidXml(xmlString)]; + case 2: + _b.sent(); + return [3 /*break*/, 4]; + case 3: + e_1 = _b.sent(); + return [2 /*return*/, Promise.reject("ERR_INVALID_XML")]; + case 4: + extractorFields = getDefaultExtractorFields(parserType); + parseResult = { + samlContent: xmlString, + sigAlg: null, + extract: extractor_1.extract(xmlString, extractorFields), + }; + // check status based on different scenarios + return [4 /*yield*/, checkStatus(xmlString, parserType)]; + case 5: + // check status based on different scenarios + _b.sent(); + // see if signature check is required + // only verify message signature is enough + if (checkSignature) { + if (!signature || !sigAlg) { + return [2 /*return*/, Promise.reject("ERR_MISSING_SIG_ALG")]; + } + base64Signature = Buffer.from(decodeURIComponent(signature), "base64"); + decodeSigAlg = decodeURIComponent(sigAlg); + verified = libsaml_1.default.verifyMessageSignature(targetEntityMetadata, octetString, base64Signature, sigAlg); + if (!verified) { + // Fail to verify message signature + return [2 /*return*/, Promise.reject("ERR_FAILED_MESSAGE_SIGNATURE_VERIFICATION")]; + } + parseResult.sigAlg = decodeSigAlg; + } + return [2 /*return*/, Promise.resolve(parseResult)]; + } + }); + }); +} +// proceed the post flow +function postFlow(options) { + return __awaiter(this, void 0, void 0, function () { + var request, from, self, parserType, _a, checkSignature, body, direction, encodedRequest, samlContent, verificationOptions, decryptRequired, extractorFields, _b, verified, verifiedAssertionNode, result, _c, verified, verifiedAssertionNode, parseResult, targetEntityMetadata, issuer, extractedProperties; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + request = options.request, from = options.from, self = options.self, parserType = options.parserType, _a = options.checkSignature, checkSignature = _a === void 0 ? true : _a; + body = request.body; + direction = libsaml_1.default.getQueryParamByType(parserType); + encodedRequest = body[direction]; + samlContent = String(utility_1.base64Decode(encodedRequest)); + verificationOptions = { + metadata: from.entityMeta, + signatureAlgorithm: from.entitySetting.requestSignatureAlgorithm, + }; + decryptRequired = from.entitySetting.isAssertionEncrypted; + extractorFields = []; + // validate the xml first + return [4 /*yield*/, libsaml_1.default.isValidXml(samlContent)]; + case 1: + // validate the xml first + _d.sent(); + if (parserType !== urlParams.samlResponse) { + extractorFields = getDefaultExtractorFields(parserType, null); + } + // check status based on different scenarios + return [4 /*yield*/, checkStatus(samlContent, parserType)]; + case 2: + // check status based on different scenarios + _d.sent(); + // verify the signatures (the repsonse is encrypted then signed, then verify first then decrypt) + if (checkSignature && + from.entitySetting.messageSigningOrder === urn_1.MessageSignatureOrder.ETS) { + _b = __read(libsaml_1.default.verifySignature(samlContent, verificationOptions), 2), verified = _b[0], verifiedAssertionNode = _b[1]; + if (!verified) { + return [2 /*return*/, Promise.reject("ERR_FAIL_TO_VERIFY_ETS_SIGNATURE")]; + } + if (!decryptRequired) { + extractorFields = getDefaultExtractorFields(parserType, verifiedAssertionNode); + } + } + if (!(parserType === "SAMLResponse" && decryptRequired)) return [3 /*break*/, 4]; + return [4 /*yield*/, libsaml_1.default.decryptAssertion(self, samlContent)]; + case 3: + result = _d.sent(); + samlContent = result[0]; + extractorFields = getDefaultExtractorFields(parserType, result[1]); + _d.label = 4; + case 4: + // verify the signatures (the repsonse is signed then encrypted, then decrypt first then verify) + if (checkSignature && + from.entitySetting.messageSigningOrder === urn_1.MessageSignatureOrder.STE) { + _c = __read(libsaml_1.default.verifySignature(samlContent, verificationOptions), 2), verified = _c[0], verifiedAssertionNode = _c[1]; + if (verified) { + extractorFields = getDefaultExtractorFields(parserType, verifiedAssertionNode); + } + else { + return [2 /*return*/, Promise.reject("ERR_FAIL_TO_VERIFY_STE_SIGNATURE")]; + } + } + parseResult = { + samlContent: samlContent, + extract: extractor_1.extract(samlContent, extractorFields), + }; + targetEntityMetadata = from.entityMeta; + issuer = targetEntityMetadata.getEntityID(); + extractedProperties = parseResult.extract; + // unmatched issuer + if ((parserType === "LogoutResponse" || parserType === "SAMLResponse") && + extractedProperties && + extractedProperties.issuer !== issuer) { + return [2 /*return*/, Promise.reject("ERR_UNMATCH_ISSUER")]; + } + // invalid session time + // only run the verifyTime when `SessionNotOnOrAfter` exists + if (parserType === "SAMLResponse" && + extractedProperties.sessionIndex.sessionNotOnOrAfter && + !validator_1.verifyTime(undefined, extractedProperties.sessionIndex.sessionNotOnOrAfter, self.entitySetting.clockDrifts)) { + return [2 /*return*/, Promise.reject("ERR_EXPIRED_SESSION")]; + } + // invalid time + // 2.4.1.2 https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf + if (parserType === "SAMLResponse" && + extractedProperties.conditions && + !validator_1.verifyTime(extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts)) { + return [2 /*return*/, Promise.reject("ERR_SUBJECT_UNCONFIRMED")]; + } + return [2 /*return*/, Promise.resolve(parseResult)]; + } + }); + }); +} +function checkStatus(content, parserType) { + // only check response parser + if (parserType !== urlParams.samlResponse && + parserType !== urlParams.logoutResponse) { + return Promise.resolve("SKIPPED"); + } + var fields = parserType === urlParams.samlResponse + ? extractor_1.loginResponseStatusFields + : extractor_1.logoutResponseStatusFields; + var _a = extractor_1.extract(content, fields), top = _a.top, second = _a.second; + // only resolve when top-tier status code is success + if (top === urn_1.StatusCode.Success) { + return Promise.resolve("OK"); + } + if (!top) { + throw new Error("ERR_UNDEFINED_STATUS"); + } + // returns a detailed error for two-tier error code + throw new Error("ERR_FAILED_STATUS with top tier code: " + top + ", second tier code: " + second); +} +function flow(options) { + var binding = options.binding; + var parserType = options.parserType; + options.supportBindings = [urn_1.BindingNamespace.Redirect, urn_1.BindingNamespace.Post]; + // saml response only allows POST + if (parserType === urn_1.ParserType.SAMLResponse) { + options.supportBindings = [urn_1.BindingNamespace.Post]; + } + if (binding === bindDict.post) { + return postFlow(options); + } + if (binding === bindDict.redirect) { + return redirectFlow(options); + } + return Promise.reject("ERR_UNEXPECTED_FLOW"); +} +exports.flow = flow; +//# sourceMappingURL=flow.js.map \ No newline at end of file diff --git a/build/src/flow.js.map b/build/src/flow.js.map new file mode 100644 index 00000000..046aecc9 --- /dev/null +++ b/build/src/flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAwD;AACxD,yCAAyC;AACzC,qCAAgC;AAChC,yCASqB;AAErB,6BAMe;AAEf,IAAM,QAAQ,GAAG,aAAO,CAAC,OAAO,CAAC;AACjC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AAOpC,2DAA2D;AAC3D,SAAS,yBAAyB,CAChC,UAAsB,EACtB,SAAe;IAEf,QAAQ,UAAU,EAAE;QAClB,KAAK,gBAAU,CAAC,WAAW;YACzB,OAAO,8BAAkB,CAAC;QAC5B,KAAK,gBAAU,CAAC,YAAY;YAC1B,IAAI,CAAC,SAAS,EAAE;gBACd,iBAAiB;gBACjB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;aACxC;YACD,OAAO,+BAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,KAAK,gBAAU,CAAC,aAAa;YAC3B,OAAO,+BAAmB,CAAC;QAC7B,KAAK,gBAAU,CAAC,cAAc;YAC5B,OAAO,gCAAoB,CAAC;QAC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AAC,UAAU,CAAC;IAEtC,OAAO,CAAC,eAAe,GAAG,CAAC,sBAAgB,CAAC,QAAQ,EAAE,sBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7E,iCAAiC;IACjC,IAAI,UAAU,KAAK,gBAAU,CAAC,YAAY,EAAE;QAC1C,OAAO,CAAC,eAAe,GAAG,CAAC,sBAAgB,CAAC,IAAI,CAAC,CAAC;KACnD;IAED,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC7B,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;KAC1B;IAED,IAAI,OAAO,KAAK,QAAQ,CAAC,QAAQ,EAAE;QACjC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC/C,CAAC;AAnBD,oBAmBC"} \ No newline at end of file diff --git a/build/src/libsaml.d.ts b/build/src/libsaml.d.ts new file mode 100644 index 00000000..14c3b657 --- /dev/null +++ b/build/src/libsaml.d.ts @@ -0,0 +1,172 @@ +/** + * @file SamlLib.js + * @author tngan + * @desc A simple library including some common functions + */ +/// +import { MetadataInterface } from "./metadata"; +export interface SignatureConstructor { + rawSamlMessage: string; + referenceTagXPath?: string; + privateKey: string; + privateKeyPass?: string; + signatureAlgorithm: string; + signingCert: string | Buffer; + isBase64Output?: boolean; + signatureConfig?: any; + isMessageSigned?: boolean; + transformationAlgorithms?: string[]; +} +export interface SignatureVerifierOptions { + metadata?: MetadataInterface; + keyFile?: string; + signatureAlgorithm?: string; +} +export interface ExtractorResult { + [key: string]: any; + signature?: string | string[]; + issuer?: string | string[]; + nameid?: string; + notexist?: boolean; +} +export interface LoginResponseAttribute { + name: string; + nameFormat: string; + valueXsiType: string; + valueTag: string; + valueXmlnsXs?: string; + valueXmlnsXsi?: string; +} +export interface BaseSamlTemplate { + context: string; +} +export interface LoginResponseTemplate extends BaseSamlTemplate { + attributes?: LoginResponseAttribute[]; +} +export interface LoginRequestTemplate extends BaseSamlTemplate { +} +export interface LogoutRequestTemplate extends BaseSamlTemplate { +} +export interface LogoutResponseTemplate extends BaseSamlTemplate { +} +export declare type KeyUse = "signing" | "encryption"; +export interface KeyComponent { + [key: string]: any; +} +export interface LibSamlInterface { + getQueryParamByType: (type: string) => string; + createXPath: (local: any, isExtractAll?: boolean) => string; + replaceTagsByValue: (rawXML: string, tagValues: any) => string; + attributeStatementBuilder: (attributes: LoginResponseAttribute[]) => string; + constructSAMLSignature: (opts: SignatureConstructor) => string; + verifySignature: (xml: string, opts: any) => [boolean, any]; + createKeySection: (use: KeyUse, cert: string | Buffer) => {}; + constructMessageSignature: (octetString: string, key: string, passphrase?: string, isBase64?: boolean, signingAlgorithm?: string) => string; + verifyMessageSignature: (metadata: any, octetString: string, signature: string | Buffer, verifyAlgorithm?: string) => boolean; + getKeyInfo: (x509Certificate: string, signatureConfig?: any) => void; + encryptAssertion: (sourceEntity: any, targetEntity: any, entireXML: string) => Promise; + decryptAssertion: (here: any, entireXML: string) => Promise<[string, any]>; + getSigningScheme: (sigAlg: string) => string | null; + getDigestMethod: (sigAlg: string) => string | null; + nrsaAliasMapping: any; + defaultLoginRequestTemplate: LoginRequestTemplate; + defaultLoginResponseTemplate: LoginResponseTemplate; + defaultLogoutRequestTemplate: LogoutRequestTemplate; + defaultLogoutResponseTemplate: LogoutResponseTemplate; +} +declare const _default: { + createXPath: (local: any, isExtractAll?: boolean | undefined) => string; + getQueryParamByType: (type: string) => "SAMLRequest" | "SAMLResponse"; + defaultLoginRequestTemplate: { + context: string; + }; + defaultLoginResponseTemplate: { + context: string; + attributes: never[]; + }; + defaultLogoutRequestTemplate: { + context: string; + }; + defaultLogoutResponseTemplate: { + context: string; + }; + /** + * @desc Repalce the tag (e.g. {tag}) inside the raw XML + * @param {string} rawXML raw XML string used to do keyword replacement + * @param {array} tagValues tag values + * @return {string} + */ + replaceTagsByValue(rawXML: string, tagValues: any): string; + /** + * @desc Helper function to build the AttributeStatement tag + * @param {LoginResponseAttribute} attributes an array of attribute configuration + * @return {string} + */ + attributeStatementBuilder(attributes: LoginResponseAttribute[]): string; + /** + * @desc Construct the XML signature for POST binding + * @return {string} base64 encoded string + * @param opts + */ + constructSAMLSignature(opts: SignatureConstructor): string; + /** + * @desc Verify the XML signature + * @param {string} xml xml + * @param {SignatureVerifierOptions} opts cert declares the X509 certificate + * @return {boolean} verification result + */ + verifySignature(xml: string, opts?: SignatureVerifierOptions | undefined): (string | boolean | null)[]; + /** + * @desc Helper function to create the key section in metadata (abstraction for signing and encrypt use) + * @param {string} use type of certificate (e.g. signing, encrypt) + * @param {string} certString declares the certificate String + * @return {object} object used in xml module + */ + createKeySection(use: KeyUse, certString: string | Buffer): KeyComponent; + /** + * @desc Constructs SAML message + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} key declares the pem-formatted private key + * @param {string} passphrase passphrase of private key [optional] + * @param isBase64 + * @param {string} signingAlgorithm signing algorithm + * @return {string} message signature + */ + constructMessageSignature(octetString: string, key: string, passphrase?: string | undefined, isBase64?: boolean | undefined, signingAlgorithm?: string | undefined): string | Buffer; + /** + * @desc Verifies message signature + * @param {Metadata} metadata metadata object of identity provider or service provider + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} signature context of XML signature + * @param {string} verifyAlgorithm algorithm used to verify + * @return {boolean} verification result + */ + verifyMessageSignature(metadata: any, octetString: string, signature: string | Buffer, verifyAlgorithm?: string | undefined): boolean; + /** + * @desc Get the public key in string format + * @param {string} x509Certificate certificate + * @param signatureConfig + * @return {string} public key + */ + getKeyInfo(x509Certificate: string, signatureConfig?: any): void; + /** + * @desc Encrypt the assertion section in Response + * @param {Entity} sourceEntity source entity + * @param {Entity} targetEntity target entity + * @param {string} xml response in xml string format + * @return {Promise} a promise to resolve the finalized xml + */ + encryptAssertion(sourceEntity: any, targetEntity: any, xml?: string | undefined): Promise; + /** + * @desc Decrypt the assertion section in Response + * @param {Entity} here this entity + * @param {string} entireXML response in xml string format + * @return {function} a promise to get back the entire xml with decrypted assertion + */ + decryptAssertion(here: any, entireXML: string): Promise<[string, any]>; + /** + * @desc Check if the xml string is valid and bounded + */ + isValidXml(input: string): Promise; +}; +export default _default; diff --git a/build/src/libsaml.js b/build/src/libsaml.js new file mode 100644 index 00000000..d358f4ae --- /dev/null +++ b/build/src/libsaml.js @@ -0,0 +1,576 @@ +"use strict"; +/** + * @file SamlLib.js + * @author tngan + * @desc A simple library including some common functions + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var xmldom_1 = require("xmldom"); +var utility_1 = require("./utility"); +var urn_1 = require("./urn"); +var xpath_1 = require("xpath"); +var NodeRSA = require("node-rsa"); +var xml_crypto_1 = require("xml-crypto"); +var xmlenc = require("xml-encryption"); +var extractor_1 = require("./extractor"); +var camelcase_1 = require("camelcase"); +var api_1 = require("./api"); +var signatureAlgorithms = urn_1.algorithms.signature; +var digestAlgorithms = urn_1.algorithms.digest; +var certUse = urn_1.wording.certUse; +var urlParams = urn_1.wording.urlParams; +var dom = xmldom_1.DOMParser; +var libSaml = function () { + /** + * @desc helper function to get back the query param for redirect binding for SLO/SSO + * @type {string} + */ + function getQueryParamByType(type) { + if ([urlParams.logoutRequest, urlParams.samlRequest].indexOf(type) !== -1) { + return "SAMLRequest"; + } + if ([urlParams.logoutResponse, urlParams.samlResponse].indexOf(type) !== -1) { + return "SAMLResponse"; + } + throw new Error("ERR_UNDEFINED_QUERY_PARAMS"); + } + /** + * + */ + var nrsaAliasMapping = { + "http://www.w3.org/2000/09/xmldsig#rsa-sha1": "sha1", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": "sha256", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": "sha512", + }; + /** + * @desc Default login request template + * @type {LoginRequestTemplate} + */ + var defaultLoginRequestTemplate = { + context: '{Issuer}', + }; + /** + * @desc Default logout request template + * @type {LogoutRequestTemplate} + */ + var defaultLogoutRequestTemplate = { + context: '{Issuer}{NameID}', + }; + /** + * @desc Default login response template + * @type {LoginResponseTemplate} + */ + var defaultLoginResponseTemplate = { + context: '{Issuer}{Issuer}{NameID}{Audience}{AuthnStatement}{AttributeStatement}', + attributes: [], + }; + /** + * @desc Default logout response template + * @type {LogoutResponseTemplate} + */ + var defaultLogoutResponseTemplate = { + context: '{Issuer}', + }; + /** + * @private + * @desc Get the signing scheme alias by signature algorithms, used by the node-rsa module + * @param {string} sigAlg signature algorithm + * @return {string/null} signing algorithm short-hand for the module node-rsa + */ + function getSigningScheme(sigAlg) { + if (sigAlg) { + var algAlias = nrsaAliasMapping[sigAlg]; + if (!(algAlias === undefined)) { + return algAlias; + } + } + return nrsaAliasMapping[signatureAlgorithms.RSA_SHA1]; // default value + } + /** + * @private + * @desc Get the digest algorithms by signature algorithms + * @param {string} sigAlg signature algorithm + * @return {string/null} digest algorithm + */ + function getDigestMethod(sigAlg) { + var digestAlg = digestAlgorithms[sigAlg]; + if (!(digestAlg === undefined)) { + return digestAlg; + } + return undefined; // default value + } + /** + * @public + * @desc Create XPath + * @param {string/object} local parameters to create XPath + * @param {boolean} isExtractAll define whether returns whole content according to the XPath + * @return {string} xpath + */ + function createXPath(local, isExtractAll) { + if (utility_1.isString(local)) { + return isExtractAll === true + ? "//*[local-name(.)='" + local + "']/text()" + : "//*[local-name(.)='" + local + "']"; + } + return "//*[local-name(.)='" + local.name + "']/@" + local.attr; + } + /** + * @private + * @desc Tag normalization + * @param {string} prefix prefix of the tag + * @param {content} content normalize it to capitalized camel case + * @return {string} + */ + function tagging(prefix, content) { + var camelContent = camelcase_1.default(content); + return (prefix + camelContent.charAt(0).toUpperCase() + camelContent.slice(1)); + } + return { + createXPath: createXPath, + getQueryParamByType: getQueryParamByType, + defaultLoginRequestTemplate: defaultLoginRequestTemplate, + defaultLoginResponseTemplate: defaultLoginResponseTemplate, + defaultLogoutRequestTemplate: defaultLogoutRequestTemplate, + defaultLogoutResponseTemplate: defaultLogoutResponseTemplate, + /** + * @desc Repalce the tag (e.g. {tag}) inside the raw XML + * @param {string} rawXML raw XML string used to do keyword replacement + * @param {array} tagValues tag values + * @return {string} + */ + replaceTagsByValue: function (rawXML, tagValues) { + Object.keys(tagValues).forEach(function (t) { + rawXML = rawXML.replace(new RegExp("{" + t + "}", "g"), tagValues[t]); + }); + return rawXML; + }, + /** + * @desc Helper function to build the AttributeStatement tag + * @param {LoginResponseAttribute} attributes an array of attribute configuration + * @return {string} + */ + attributeStatementBuilder: function (attributes) { + var attr = attributes + .map(function (_a) { + var name = _a.name, nameFormat = _a.nameFormat, valueTag = _a.valueTag, valueXsiType = _a.valueXsiType, valueXmlnsXs = _a.valueXmlnsXs, valueXmlnsXsi = _a.valueXmlnsXsi; + var defaultValueXmlnsXs = "http://www.w3.org/2001/XMLSchema"; + var defaultValueXmlnsXsi = "http://www.w3.org/2001/XMLSchema-instance"; + return "{" + tagging("attr", valueTag) + "}"; + }) + .join(""); + return "" + attr + ""; + }, + /** + * @desc Construct the XML signature for POST binding + * @return {string} base64 encoded string + * @param opts + */ + constructSAMLSignature: function (opts) { + var rawSamlMessage = opts.rawSamlMessage, referenceTagXPath = opts.referenceTagXPath, privateKey = opts.privateKey, privateKeyPass = opts.privateKeyPass, _a = opts.signatureAlgorithm, signatureAlgorithm = _a === void 0 ? signatureAlgorithms.RSA_SHA256 : _a, _b = opts.transformationAlgorithms, transformationAlgorithms = _b === void 0 ? [ + "http://www.w3.org/2000/09/xmldsig#enveloped-signature", + "http://www.w3.org/2001/10/xml-exc-c14n#", + ] : _b, signingCert = opts.signingCert, signatureConfig = opts.signatureConfig, _c = opts.isBase64Output, isBase64Output = _c === void 0 ? true : _c, _d = opts.isMessageSigned, isMessageSigned = _d === void 0 ? false : _d; + var sig = new xml_crypto_1.SignedXml(); + // Add assertion sections as reference + if (referenceTagXPath) { + sig.addReference(referenceTagXPath, opts.transformationAlgorithms, getDigestMethod(signatureAlgorithm)); + } + if (isMessageSigned) { + sig.addReference( + // reference to the root node + "/*", transformationAlgorithms, getDigestMethod(signatureAlgorithm), "", "", "", false); + } + sig.signatureAlgorithm = signatureAlgorithm; + sig.keyInfoProvider = new this.getKeyInfo(signingCert, signatureConfig); + sig.signingKey = utility_1.default.readPrivateKey(privateKey, privateKeyPass, true); + if (signatureConfig) { + sig.computeSignature(rawSamlMessage, signatureConfig); + } + else { + sig.computeSignature(rawSamlMessage); + } + return isBase64Output + ? utility_1.default.base64Encode(sig.getSignedXml()) + : sig.getSignedXml(); + }, + /** + * @desc Verify the XML signature + * @param {string} xml xml + * @param {SignatureVerifierOptions} opts cert declares the X509 certificate + * @return {boolean} verification result + */ + verifySignature: function (xml, opts) { + var _this = this; + var doc = new dom().parseFromString(xml); + // In order to avoid the wrapping attack, we have changed to use absolute xpath instead of naively fetching the signature element + // message signature (logout response / saml response) + var messageSignatureXpath = "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Signature']"; + // assertion signature (logout response / saml response) + var assertionSignatureXpath = "/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']/*[local-name(.)='Signature']"; + // check if there is a potential malicious wrapping signature + var wrappingElementsXPath = "/*[contains(local-name(), 'Response')]/*[local-name(.)='Assertion']/*[local-name(.)='Subject']/*[local-name(.)='SubjectConfirmation']/*[local-name(.)='SubjectConfirmationData']//*[local-name(.)='Assertion' or local-name(.)='Signature']"; + // select the signature node + var selection = []; + var assertionNode = null; + var messageSignatureNode = xpath_1.select(messageSignatureXpath, doc); + var assertionSignatureNode = xpath_1.select(assertionSignatureXpath, doc); + var wrappingElementNode = xpath_1.select(wrappingElementsXPath, doc); + selection = selection.concat(messageSignatureNode); + selection = selection.concat(assertionSignatureNode); + // try to catch potential wrapping attack + if (wrappingElementNode.length !== 0) { + throw new Error("ERR_POTENTIAL_WRAPPING_ATTACK"); + } + // guarantee to have a signature in saml response + if (selection.length === 0) { + throw new Error("ERR_ZERO_SIGNATURE"); + } + var sig = new xml_crypto_1.SignedXml(); + var verified = true; + // need to refactor later on + selection.forEach(function (signatureNode) { + if (opts && opts.signatureAlgorithm) { + sig.signatureAlgorithm = opts.signatureAlgorithm; + } + if (opts && !opts.keyFile && !opts.metadata) { + throw new Error("ERR_UNDEFINED_SIGNATURE_VERIFIER_OPTIONS"); + } + if (opts && opts.keyFile) { + sig.keyInfoProvider = new xml_crypto_1.FileKeyInfo(opts.keyFile); + } + if (opts && opts.metadata) { + var certificateNode = xpath_1.select(".//*[local-name(.)='X509Certificate']", signatureNode); + // certificate in metadata + var metadataCert = opts.metadata.getX509Certificate(certUse.signing); + // flattens the nested array of Certificates from each KeyDescriptor + if (Array.isArray(metadataCert)) { + metadataCert = utility_1.flattenDeep(metadataCert); + } + else if (typeof metadataCert === "string") { + metadataCert = [metadataCert]; + } + // normalise the certificate string + metadataCert = metadataCert.map(utility_1.default.normalizeCerString); + if (certificateNode.length === 0) { + throw new Error("NO_SELECTED_CERTIFICATE"); + } + // no certificate node in response + if (certificateNode.length !== 0) { + var x509CertificateData = certificateNode[0].firstChild.data; + var x509Certificate_1 = utility_1.default.normalizeCerString(x509CertificateData); + if (metadataCert.length >= 1 && + !metadataCert.find(function (cert) { return cert.trim() === x509Certificate_1.trim(); })) { + // keep this restriction for rolling certificate usage + // to make sure the response certificate is one of those specified in metadata + throw new Error("ERROR_UNMATCH_CERTIFICATE_DECLARATION_IN_METADATA"); + } + sig.keyInfoProvider = new _this.getKeyInfo(x509Certificate_1); + } + } + sig.loadSignature(signatureNode); + doc.removeChild(signatureNode); + verified = verified && sig.checkSignature(doc.toString()); + // immediately throw error when any one of the signature is failed to get verified + if (!verified) { + throw new Error("ERR_FAILED_TO_VERIFY_SIGNATURE"); + } + }); + // response must be signed, either entire document or assertion + // default we will take the assertion section under root + if (messageSignatureNode.length === 1) { + var node = xpath_1.select("/*[contains(local-name(), 'Response') or contains(local-name(), 'Request')]/*[local-name(.)='Assertion']", doc); + if (node.length === 1) { + assertionNode = node[0].toString(); + } + } + if (assertionSignatureNode.length === 1) { + var verifiedAssertionInfo = extractor_1.extract(assertionSignatureNode[0].toString(), [ + { + key: "refURI", + localPath: ["Signature", "SignedInfo", "Reference"], + attributes: ["URI"], + }, + ]); + // get the assertion supposed to be the one should be verified + var desiredAssertionInfo = extractor_1.extract(doc.toString(), [ + { + key: "id", + localPath: ["~Response", "Assertion"], + attributes: ["ID"], + }, + ]); + // 5.4.2 References + // SAML assertions and protocol messages MUST supply a value for the ID attribute on the root element of + // the assertion or protocol message being signed. The assertion’s or protocol message's root element may + // or may not be the root element of the actual XML document containing the signed assertion or protocol + // message (e.g., it might be contained within a SOAP envelope). + // Signatures MUST contain a single containing a same-document reference to the ID + // attribute value of the root element of the assertion or protocol message being signed. For example, if the + // ID attribute value is "foo", then the URI attribute in the element MUST be "#foo". + if (verifiedAssertionInfo.refURI !== "#" + desiredAssertionInfo.id) { + throw new Error("ERR_POTENTIAL_WRAPPING_ATTACK"); + } + var verifiedDoc = extractor_1.extract(doc.toString(), [ + { + key: "assertion", + localPath: ["~Response", "Assertion"], + attributes: [], + context: true, + }, + ]); + assertionNode = verifiedDoc.assertion.toString(); + } + return [verified, assertionNode]; + }, + /** + * @desc Helper function to create the key section in metadata (abstraction for signing and encrypt use) + * @param {string} use type of certificate (e.g. signing, encrypt) + * @param {string} certString declares the certificate String + * @return {object} object used in xml module + */ + createKeySection: function (use, certString) { + var _a, _b, _c; + return _a = {}, + _a["KeyDescriptor"] = [ + { + _attr: { use: use }, + }, + (_b = {}, + _b["ds:KeyInfo"] = [ + { + _attr: { + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", + }, + }, + (_c = {}, + _c["ds:X509Data"] = [ + { + "ds:X509Certificate": utility_1.default.normalizeCerString(certString), + }, + ], + _c), + ], + _b), + ], + _a; + }, + /** + * @desc Constructs SAML message + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} key declares the pem-formatted private key + * @param {string} passphrase passphrase of private key [optional] + * @param isBase64 + * @param {string} signingAlgorithm signing algorithm + * @return {string} message signature + */ + constructMessageSignature: function (octetString, key, passphrase, isBase64, signingAlgorithm) { + // Default returning base64 encoded signature + // Embed with node-rsa module + var decryptedKey = new NodeRSA(utility_1.default.readPrivateKey(key, passphrase), undefined, { + signingScheme: getSigningScheme(signingAlgorithm), + }); + var signature = decryptedKey.sign(octetString); + // Use private key to sign data + return isBase64 !== false + ? signature.toString("base64") + : signature; + }, + /** + * @desc Verifies message signature + * @param {Metadata} metadata metadata object of identity provider or service provider + * @param {string} octetString see "Bindings for the OASIS Security Assertion Markup Language (SAML V2.0)" P.17/46 + * @param {string} signature context of XML signature + * @param {string} verifyAlgorithm algorithm used to verify + * @return {boolean} verification result + */ + verifyMessageSignature: function (metadata, octetString, signature, verifyAlgorithm) { + var signCert = metadata.getX509Certificate(certUse.signing); + var signingScheme = getSigningScheme(verifyAlgorithm); + var key = new NodeRSA(utility_1.default.getPublicKeyPemFromCertificate(signCert), undefined, { signingScheme: signingScheme }); + return key.verify(new Buffer(octetString), Buffer.from(signature)); + }, + /** + * @desc Get the public key in string format + * @param {string} x509Certificate certificate + * @param signatureConfig + * @return {string} public key + */ + getKeyInfo: function (x509Certificate, signatureConfig) { + if (signatureConfig === void 0) { signatureConfig = {}; } + this.getKeyInfo = function () { + var prefix = signatureConfig.prefix + ? signatureConfig.prefix + ":" + : ""; + return "<" + prefix + "X509Data><" + prefix + "X509Certificate>" + x509Certificate + ""; + }; + this.getKey = function (keyInfo) { + return utility_1.default + .getPublicKeyPemFromCertificate(x509Certificate) + .toString(); + }; + }, + /** + * @desc Encrypt the assertion section in Response + * @param {Entity} sourceEntity source entity + * @param {Entity} targetEntity target entity + * @param {string} xml response in xml string format + * @return {Promise} a promise to resolve the finalized xml + */ + encryptAssertion: function (sourceEntity, targetEntity, xml) { + // Implement encryption after signature if it has + return new Promise(function (resolve, reject) { + if (!xml) { + return reject(new Error("ERR_UNDEFINED_ASSERTION")); + } + var sourceEntitySetting = sourceEntity.entitySetting; + var targetEntityMetadata = targetEntity.entityMeta; + var doc = new dom().parseFromString(xml); + var assertions = xpath_1.select("//*[local-name(.)='Assertion']", doc); + if (!Array.isArray(assertions)) { + throw new Error("ERR_NO_ASSERTION"); + } + if (assertions.length !== 1) { + throw new Error("ERR_MULTIPLE_ASSERTION"); + } + // Perform encryption depends on the setting, default is false + if (sourceEntitySetting.isAssertionEncrypted) { + xmlenc.encrypt(assertions[0].toString(), { + // use xml-encryption module + rsa_pub: Buffer.from(utility_1.default + .getPublicKeyPemFromCertificate(targetEntityMetadata.getX509Certificate(certUse.encrypt)) + .replace(/\r?\n|\r/g, "")), + pem: Buffer.from("-----BEGIN CERTIFICATE-----" + + targetEntityMetadata.getX509Certificate(certUse.encrypt) + + "-----END CERTIFICATE-----"), + encryptionAlgorithm: sourceEntitySetting.dataEncryptionAlgorithm, + keyEncryptionAlgorithm: sourceEntitySetting.keyEncryptionAlgorithm, + }, function (err, res) { + if (err) { + console.error(err); + return reject(new Error("ERR_EXCEPTION_OF_ASSERTION_ENCRYPTION")); + } + if (!res) { + return reject(new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION")); + } + var encAssertionPrefix = sourceEntitySetting.tagPrefix.encryptedAssertion; + var encryptAssertionNode = new dom().parseFromString("<" + encAssertionPrefix + ":EncryptedAssertion xmlns:" + encAssertionPrefix + "=\"" + urn_1.namespace.names.assertion + "\">" + res + ""); + doc.replaceChild(encryptAssertionNode, assertions[0]); + return resolve(utility_1.default.base64Encode(doc.toString())); + }); + } + else { + return resolve(utility_1.default.base64Encode(xml)); // No need to do encrpytion + } + }); + }, + /** + * @desc Decrypt the assertion section in Response + * @param {Entity} here this entity + * @param {string} entireXML response in xml string format + * @return {function} a promise to get back the entire xml with decrypted assertion + */ + decryptAssertion: function (here, entireXML) { + return new Promise(function (resolve, reject) { + // Implement decryption first then check the signature + if (!entireXML) { + return reject(new Error("ERR_UNDEFINED_ASSERTION")); + } + // Perform encryption depends on the setting of where the message is sent, default is false + var hereSetting = here.entitySetting; + var xml = new dom().parseFromString(entireXML); + var encryptedAssertions = xpath_1.select("/*[contains(local-name(), 'Response')]/*[local-name(.)='EncryptedAssertion']", xml); + if (!Array.isArray(encryptedAssertions)) { + throw new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION"); + } + if (encryptedAssertions.length !== 1) { + throw new Error("ERR_MULTIPLE_ASSERTION"); + } + return xmlenc.decrypt(encryptedAssertions[0].toString(), { + key: utility_1.default.readPrivateKey(hereSetting.encPrivateKey, hereSetting.encPrivateKeyPass), + }, function (err, res) { + if (err) { + console.error(err); + return reject(new Error("ERR_EXCEPTION_OF_ASSERTION_DECRYPTION")); + } + if (!res) { + return reject(new Error("ERR_UNDEFINED_ENCRYPTED_ASSERTION")); + } + var assertionNode = new dom().parseFromString(res); + xml.replaceChild(assertionNode, encryptedAssertions[0]); + return resolve([xml.toString(), res]); + }); + }); + }, + /** + * @desc Check if the xml string is valid and bounded + */ + isValidXml: function (input) { + return __awaiter(this, void 0, void 0, function () { + var validate, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + validate = api_1.getContext().validate; + /** + * user can write a validate function that always returns + * a resolved promise and skip the validator even in + * production, user will take the responsibility if + * they intend to skip the validation + */ + if (!validate) { + // otherwise, an error will be thrown + return [2 /*return*/, Promise.reject("Your application is potentially vulnerable because no validation function found. Please read the documentation on how to setup the validator. (https://github.com/tngan/samlify#installation)")]; + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, validate(input)]; + case 2: return [2 /*return*/, _a.sent()]; + case 3: + e_1 = _a.sent(); + throw e_1; + case 4: return [2 /*return*/]; + } + }); + }); + }, + }; +}; +exports.default = libSaml(); +//# sourceMappingURL=libsaml.js.map \ No newline at end of file diff --git a/build/src/libsaml.js.map b/build/src/libsaml.js.map new file mode 100644 index 00000000..cf193707 --- /dev/null +++ b/build/src/libsaml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"libsaml.js","sourceRoot":"","sources":["../../src/libs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oBACD,IAAI,CAAC,GAAG,EAAE;wBACR,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;qBAC/D;oBACD,IAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;oBACrD,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxD,OAAO,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACxC,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;WAEG;QACG,UAAU,EAAhB,UAAiB,KAAa;;;;;;4BAEpB,QAAQ,GAAK,gBAAU,EAAE,SAAjB,CAAkB;4BAElC;;;;;+BAKG;4BACH,IAAI,CAAC,QAAQ,EAAE;gCACb,qCAAqC;gCACrC,sBAAO,OAAO,CAAC,MAAM,CACnB,+LAA+L,CAChM,EAAC;6BACH;;;;4BAGQ,qBAAM,QAAQ,CAAC,KAAK,CAAC,EAAA;gCAA5B,sBAAO,SAAqB,EAAC;;;4BAE7B,MAAM,GAAC,CAAC;;;;;SAEX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/build/src/metadata-idp.d.ts b/build/src/metadata-idp.d.ts new file mode 100644 index 00000000..edc103b7 --- /dev/null +++ b/build/src/metadata-idp.d.ts @@ -0,0 +1,24 @@ +/** + * @file metadata-idp.ts + * @author tngan + * @desc Metadata of identity provider + */ +import Metadata, { MetadataInterface } from "./metadata"; +import { MetadataIdpConstructor } from "./types"; +export interface IdpMetadataInterface extends MetadataInterface { +} +export default function (meta: MetadataIdpConstructor): IdpMetadata; +export declare class IdpMetadata extends Metadata { + constructor(meta: MetadataIdpConstructor); + /** + * @desc Get the preference whether it wants a signed request + * @return {boolean} WantAuthnRequestsSigned + */ + isWantAuthnRequestsSigned(): boolean; + /** + * @desc Get the entity endpoint for single sign on service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/object} location + */ + getSingleSignOnService(binding: string): string | object; +} diff --git a/build/src/metadata-idp.js b/build/src/metadata-idp.js new file mode 100644 index 00000000..fef1cedd --- /dev/null +++ b/build/src/metadata-idp.js @@ -0,0 +1,161 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdpMetadata = void 0; +/** + * @file metadata-idp.ts + * @author tngan + * @desc Metadata of identity provider + */ +var metadata_1 = require("./metadata"); +var urn_1 = require("./urn"); +var libsaml_1 = require("./libsaml"); +var utility_1 = require("./utility"); +var xml = require("xml"); +/* + * @desc interface function + */ +function default_1(meta) { + return new IdpMetadata(meta); +} +exports.default = default_1; +var IdpMetadata = /** @class */ (function (_super) { + __extends(IdpMetadata, _super); + function IdpMetadata(meta) { + var _this = this; + var isFile = utility_1.isString(meta) || meta instanceof Buffer; + if (!isFile) { + var _a = meta, entityID = _a.entityID, signingCert = _a.signingCert, encryptCert = _a.encryptCert, _b = _a.wantAuthnRequestsSigned, wantAuthnRequestsSigned = _b === void 0 ? false : _b, _c = _a.nameIDFormat, nameIDFormat = _c === void 0 ? [] : _c, _d = _a.singleSignOnService, singleSignOnService = _d === void 0 ? [] : _d, _e = _a.singleLogoutService, singleLogoutService = _e === void 0 ? [] : _e; + var IDPSSODescriptor_1 = [ + { + _attr: { + WantAuthnRequestsSigned: String(wantAuthnRequestsSigned), + protocolSupportEnumeration: urn_1.namespace.names.protocol, + }, + }, + ]; + if (signingCert) { + IDPSSODescriptor_1.push(libsaml_1.default.createKeySection("signing", signingCert)); + } + else { + //console.warn('Construct identity provider - missing signing certificate'); + } + if (encryptCert) { + IDPSSODescriptor_1.push(libsaml_1.default.createKeySection("encryption", encryptCert)); + } + else { + //console.warn('Construct identity provider - missing encrypt certificate'); + } + if (utility_1.isNonEmptyArray(nameIDFormat)) { + nameIDFormat.forEach(function (f) { + return IDPSSODescriptor_1.push({ NameIDFormat: f }); + }); + } + if (utility_1.isNonEmptyArray(singleSignOnService)) { + singleSignOnService.forEach(function (a) { + var attr = { + Binding: a.Binding, + Location: a.Location, + }; + if (a.isDefault) { + attr.isDefault = true; + } + IDPSSODescriptor_1.push({ SingleSignOnService: [{ _attr: attr }] }); + }); + } + else { + throw new Error("ERR_IDP_METADATA_MISSING_SINGLE_SIGN_ON_SERVICE"); + } + if (utility_1.isNonEmptyArray(singleLogoutService)) { + singleLogoutService.forEach(function (a) { + var attr = {}; + if (a.isDefault) { + attr.isDefault = true; + } + attr.Binding = a.Binding; + attr.Location = a.Location; + IDPSSODescriptor_1.push({ SingleLogoutService: [{ _attr: attr }] }); + }); + } + else { + console.warn("Construct identity provider - missing endpoint of SingleLogoutService"); + } + // Create a new metadata by setting + meta = xml([ + { + EntityDescriptor: [ + { + _attr: { + xmlns: urn_1.namespace.names.metadata, + "xmlns:assertion": urn_1.namespace.names.assertion, + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", + entityID: entityID, + }, + }, + { IDPSSODescriptor: IDPSSODescriptor_1 }, + ], + }, + ]); + } + _this = _super.call(this, meta, [ + { + key: "wantAuthnRequestsSigned", + localPath: ["EntityDescriptor", "IDPSSODescriptor"], + attributes: ["WantAuthnRequestsSigned"], + }, + { + key: "singleSignOnService", + localPath: [ + "EntityDescriptor", + "IDPSSODescriptor", + "SingleSignOnService", + ], + index: ["Binding"], + attributePath: [], + attributes: ["Location"], + }, + ]) || this; + return _this; + } + /** + * @desc Get the preference whether it wants a signed request + * @return {boolean} WantAuthnRequestsSigned + */ + IdpMetadata.prototype.isWantAuthnRequestsSigned = function () { + var was = this.meta.wantAuthnRequestsSigned; + if (was === undefined) { + return false; + } + return String(was) === "true"; + }; + /** + * @desc Get the entity endpoint for single sign on service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/object} location + */ + IdpMetadata.prototype.getSingleSignOnService = function (binding) { + if (utility_1.isString(binding)) { + var bindName = urn_1.namespace.binding[binding]; + var service = this.meta.singleSignOnService[bindName]; + if (service) { + return service; + } + } + return this.meta.singleSignOnService; + }; + return IdpMetadata; +}(metadata_1.default)); +exports.IdpMetadata = IdpMetadata; +//# sourceMappingURL=metadata-idp.js.map \ No newline at end of file diff --git a/build/src/metadata-idp.js.map b/build/src/metadata-idp.js.map new file mode 100644 index 00000000..2d48dad8 --- /dev/null +++ b/build/src/metadata-idp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata-idp.js","sourceRoot":"","sources":["../../src/metadata-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyD;AAEzD,6BAAkC;AAClC,qCAAgC;AAChC,qCAAsD;AACtD,yBAA2B;AAI3B;;GAEG;AACH,mBAAyB,IAA4B;IACnD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAFD,4BAEC;AAED;IAAiC,+BAAQ;IACvC,qBAAY,IAA4B;QAAxC,iBA6GC;QA5GC,IAAM,MAAM,GAAG,kBAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,YAAY,MAAM,CAAC;QAExD,IAAI,CAAC,MAAM,EAAE;YACL,IAAA,KAQF,IAA0B,EAP5B,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,+BAA+B,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAC/B,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EACjB,2BAAwB,EAAxB,mBAAmB,mBAAG,EAAE,K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AAU,CAAC;aACzB;SACF,CAAC,SAAC;;IACL,CAAC;IAED;;;OAGG;IACH,+CAAyB,GAAzB;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;QAC9C,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,KAAK,CAAC;SACd;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,4CAAsB,GAAtB,UAAuB,OAAe;QACpC,IAAI,kBAAQ,CAAC,OAAO,CAAC,EAAE;YACrB,IAAM,QAAQ,GAAG,eAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACxD,IAAI,OAAO,EAAE;gBACX,OAAO,OAAO,CAAC;aAChB;SACF;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC,CAAC;IACH,kBAAC;AAAD,CAAC,AA3ID,CAAiC,kBAAQ,GA2IxC;AA3IY,kCAAW"} \ No newline at end of file diff --git a/build/src/metadata-sp.d.ts b/build/src/metadata-sp.d.ts new file mode 100644 index 00000000..45f1cee9 --- /dev/null +++ b/build/src/metadata-sp.d.ts @@ -0,0 +1,36 @@ +/** + * @file metadata-sp.ts + * @author tngan + * @desc Metadata of service provider + */ +import Metadata, { MetadataInterface } from "./metadata"; +import { MetadataSpConstructor } from "./types"; +export interface SpMetadataInterface extends MetadataInterface { +} +export default function (meta: MetadataSpConstructor): SpMetadata; +/** + * @desc SP Metadata is for creating Service Provider, provides a set of API to manage the actions in SP. + */ +export declare class SpMetadata extends Metadata { + /** + * @param {object/string} meta (either xml string or configuation in object) + * @return {object} prototypes including public functions + */ + constructor(meta: MetadataSpConstructor); + /** + * @desc Get the preference whether it wants a signed assertion response + * @return {boolean} Wantassertionssigned + */ + isWantAssertionsSigned(): boolean; + /** + * @desc Get the preference whether it signs request + * @return {boolean} Authnrequestssigned + */ + isAuthnRequestSigned(): boolean; + /** + * @desc Get the entity endpoint for assertion consumer service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/[string]} URL of endpoint(s) + */ + getAssertionConsumerService(binding: string): string | string[]; +} diff --git a/build/src/metadata-sp.js b/build/src/metadata-sp.js new file mode 100644 index 00000000..e96cbbd9 --- /dev/null +++ b/build/src/metadata-sp.js @@ -0,0 +1,205 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SpMetadata = void 0; +/** + * @file metadata-sp.ts + * @author tngan + * @desc Metadata of service provider + */ +var metadata_1 = require("./metadata"); +var urn_1 = require("./urn"); +var libsaml_1 = require("./libsaml"); +var utility_1 = require("./utility"); +var xml = require("xml"); +/* + * @desc interface function + */ +function default_1(meta) { + return new SpMetadata(meta); +} +exports.default = default_1; +/** + * @desc SP Metadata is for creating Service Provider, provides a set of API to manage the actions in SP. + */ +var SpMetadata = /** @class */ (function (_super) { + __extends(SpMetadata, _super); + /** + * @param {object/string} meta (either xml string or configuation in object) + * @return {object} prototypes including public functions + */ + function SpMetadata(meta) { + var _this = this; + var isFile = utility_1.isString(meta) || meta instanceof Buffer; + // use object configuation instead of importing metadata file directly + if (!isFile) { + var _a = meta, _b = _a.elementsOrder, elementsOrder = _b === void 0 ? urn_1.elementsOrder.default : _b, entityID = _a.entityID, signingCert = _a.signingCert, encryptCert = _a.encryptCert, _c = _a.authnRequestsSigned, authnRequestsSigned = _c === void 0 ? false : _c, _d = _a.wantAssertionsSigned, wantAssertionsSigned = _d === void 0 ? false : _d, _e = _a.wantMessageSigned, wantMessageSigned = _e === void 0 ? false : _e, signatureConfig = _a.signatureConfig, _f = _a.nameIDFormat, nameIDFormat = _f === void 0 ? [] : _f, _g = _a.singleLogoutService, singleLogoutService = _g === void 0 ? [] : _g, _h = _a.assertionConsumerService, assertionConsumerService = _h === void 0 ? [] : _h; + var descriptors_1 = { + KeyDescriptor: [], + NameIDFormat: [], + SingleLogoutService: [], + AssertionConsumerService: [], + AttributeConsumingService: [], + }; + var SPSSODescriptor_1 = [ + { + _attr: { + AuthnRequestsSigned: String(authnRequestsSigned), + WantAssertionsSigned: String(wantAssertionsSigned), + protocolSupportEnumeration: urn_1.namespace.names.protocol, + }, + }, + ]; + if (wantMessageSigned && signatureConfig === undefined) { + console.warn("Construct service provider - missing signatureConfig"); + } + if (signingCert) { + descriptors_1.KeyDescriptor.push(libsaml_1.default.createKeySection("signing", signingCert).KeyDescriptor); + } + else { + //console.warn('Construct service provider - missing signing certificate'); + } + if (encryptCert) { + descriptors_1.KeyDescriptor.push(libsaml_1.default.createKeySection("encryption", encryptCert).KeyDescriptor); + } + else { + //console.warn('Construct service provider - missing encrypt certificate'); + } + if (utility_1.isNonEmptyArray(nameIDFormat)) { + nameIDFormat.forEach(function (f) { return descriptors_1.NameIDFormat.push(f); }); + } + else { + // default value + descriptors_1.NameIDFormat.push(urn_1.namespace.format.emailAddress); + } + if (utility_1.isNonEmptyArray(singleLogoutService)) { + singleLogoutService.forEach(function (a) { + var attr = { + Binding: a.Binding, + Location: a.Location, + }; + if (a.isDefault) { + attr.isDefault = true; + } + descriptors_1.SingleLogoutService.push([{ _attr: attr }]); + }); + } + if (utility_1.isNonEmptyArray(assertionConsumerService)) { + var indexCount_1 = 0; + assertionConsumerService.forEach(function (a) { + var attr = { + index: String(indexCount_1++), + Binding: a.Binding, + Location: a.Location, + }; + if (a.isDefault) { + attr.isDefault = true; + } + descriptors_1.AssertionConsumerService.push([{ _attr: attr }]); + }); + } + else { + // console.warn('Missing endpoint of AssertionConsumerService'); + } + // handle element order + var existedElements = elementsOrder.filter(function (name) { + return utility_1.isNonEmptyArray(descriptors_1[name]); + }); + existedElements.forEach(function (name) { + descriptors_1[name].forEach(function (e) { + var _a; + return SPSSODescriptor_1.push((_a = {}, _a[name] = e, _a)); + }); + }); + // Re-assign the meta reference as a XML string|Buffer for use with the parent constructor + meta = xml([ + { + EntityDescriptor: [ + { + _attr: { + entityID: entityID, + xmlns: urn_1.namespace.names.metadata, + "xmlns:assertion": urn_1.namespace.names.assertion, + "xmlns:ds": "http://www.w3.org/2000/09/xmldsig#", + }, + }, + { SPSSODescriptor: SPSSODescriptor_1 }, + ], + }, + ]); + } + // Use the re-assigned meta object reference here + _this = _super.call(this, meta, [ + { + key: "spSSODescriptor", + localPath: ["EntityDescriptor", "SPSSODescriptor"], + attributes: ["WantAssertionsSigned", "AuthnRequestsSigned"], + }, + { + key: "assertionConsumerService", + localPath: [ + "EntityDescriptor", + "SPSSODescriptor", + "AssertionConsumerService", + ], + attributes: ["Binding", "Location", "isDefault", "index"], + }, + ]) || this; + return _this; + } + /** + * @desc Get the preference whether it wants a signed assertion response + * @return {boolean} Wantassertionssigned + */ + SpMetadata.prototype.isWantAssertionsSigned = function () { + return this.meta.spSSODescriptor.wantAssertionsSigned === "true"; + }; + /** + * @desc Get the preference whether it signs request + * @return {boolean} Authnrequestssigned + */ + SpMetadata.prototype.isAuthnRequestSigned = function () { + return this.meta.spSSODescriptor.authnRequestsSigned === "true"; + }; + /** + * @desc Get the entity endpoint for assertion consumer service + * @param {string} binding protocol binding (e.g. redirect, post) + * @return {string/[string]} URL of endpoint(s) + */ + SpMetadata.prototype.getAssertionConsumerService = function (binding) { + if (utility_1.isString(binding)) { + var location_1; + var bindName_1 = urn_1.namespace.binding[binding]; + if (utility_1.isNonEmptyArray(this.meta.assertionConsumerService)) { + this.meta.assertionConsumerService.forEach(function (obj) { + if (obj.binding === bindName_1) { + location_1 = obj.location; + return; + } + }); + } + else { + if (this.meta.assertionConsumerService.binding === bindName_1) { + location_1 = this.meta.assertionConsumerService.location; + } + } + return location_1; + } + return this.meta.assertionConsumerService; + }; + return SpMetadata; +}(metadata_1.default)); +exports.SpMetadata = SpMetadata; +//# sourceMappingURL=metadata-sp.js.map \ No newline at end of file diff --git a/build/src/metadata-sp.js.map b/build/src/metadata-sp.js.map new file mode 100644 index 00000000..5bb488fc --- /dev/null +++ b/build/src/metadata-sp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata-sp.js","sourceRoot":"","sources":["../../src/metadata-sp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyD;AAEzD,6BAA0D;AAC1D,qCAAgC;AAChC,qCAAsD;AACtD,yBAA2B;AAa3B;;GAEG;AACH,mBAAyB,IAA2B;IAClD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAFD,4BAEC;AAED;;GAEG;AACH;IAAgC,8BAAQ;IACtC;;;OAGG;IACH,oBAAY,IAA2B;QAAvC,iBA2IC;QA1IC,IAAM,MAAM,GAAG,kBAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,YAAY,MAAM,CAAC;QAExD,sEAAsE;QACtE,IAAI,CAAC,MAAM,EAAE;YACL,IAAA,KAYF,IAAyB,EAX3B,qBAA6B,EAA7B,aAAa,mBAAG,mBAAK,CAAC,OAAO,KAAA,EAC7B,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,2BAA2B,EAA3B,mBAAmB,mBAAG,KAAK,KAAA,EAC3B,4BAA4B,EAA5B,oBAAoB,mBAAG,KAAK,KAAA,EAC5B,yBAAyB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EACzB,eAAe,qBAAA,EACf,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EACjB,2BAAwB,EAAxB,mBAAmB,mBAAG,EAAE,KAAA,EACxB,gCA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AC;YAC5C,IAAI,yBAAe,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,EAAE;gBACvD,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,UAAC,GAAQ;oBAClD,IAAI,GAAG,CAAC,OAAO,KAAK,UAAQ,EAAE;wBAC5B,UAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;wBACxB,OAAO;qBACR;gBACH,CAAC,CAAC,CAAC;aACJ;iBAAM;gBACL,IAAI,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,OAAO,KAAK,UAAQ,EAAE;oBAC3D,UAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC;iBACxD;aACF;YACD,OAAO,UAAQ,CAAC;SACjB;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAC5C,CAAC;IACH,iBAAC;AAAD,CAAC,AA3LD,CAAgC,kBAAQ,GA2LvC;AA3LY,gCAAU"} \ No newline at end of file diff --git a/build/src/metadata.d.ts b/build/src/metadata.d.ts new file mode 100644 index 00000000..dc4fc29a --- /dev/null +++ b/build/src/metadata.d.ts @@ -0,0 +1,58 @@ +/// +export interface MetadataInterface { + xmlString: string; + getMetadata: () => string; + exportMetadata: (exportFile: string) => void; + getEntityID: () => string; + getX509Certificate: (certType: string) => string | string[]; + getNameIDFormat: () => any[]; + getSingleLogoutService: (binding: string | undefined) => string | object; + getSupportBindings: (services: string[]) => string[]; +} +export default class Metadata implements MetadataInterface { + xmlString: string; + meta: any; + /** + * @param xml + * @param {object} extraParse for custom metadata extractor + */ + constructor(xml: string | Buffer, extraParse?: any); + /** + * @desc Get the metadata in xml format + * @return {string} metadata in xml format + */ + getMetadata(): string; + /** + * @desc Export the metadata to specific file + * @param {string} exportFile is the output file path + */ + exportMetadata(exportFile: string): void; + /** + * @desc Get the entityID in metadata + * @return {string} entityID + */ + getEntityID(): string; + /** + * @desc Get the x509 certificate declared in entity metadata + * @param {string} use declares the type of certificate + * @return {string} certificate in string format + */ + getX509Certificate(use: string): string | string[]; + /** + * @desc Get the support NameID format declared in entity metadata + * @return {array} support NameID format + */ + getNameIDFormat(): any; + /** + * @desc Get the entity endpoint for single logout service + * @param {string} binding e.g. redirect, post + * @return {string/object} location + */ + getSingleLogoutService(binding: string | undefined): string | object; + /** + * @desc Get the support bindings + * @param {[string]} services + * @return {[string]} support bindings + */ + getSupportBindings(services: string[]): string[]; +} diff --git a/build/src/metadata.js b/build/src/metadata.js new file mode 100644 index 00000000..3a4db6eb --- /dev/null +++ b/build/src/metadata.js @@ -0,0 +1,155 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * @file metadata.ts + * @author tngan + * @desc An abstraction for metadata of identity provider and service provider + */ +var fs = require("fs"); +var urn_1 = require("./urn"); +var extractor_1 = require("./extractor"); +var utility_1 = require("./utility"); +var Metadata = /** @class */ (function () { + /** + * @param xml + * @param {object} extraParse for custom metadata extractor + */ + function Metadata(xml, extraParse) { + if (extraParse === void 0) { extraParse = []; } + this.xmlString = xml.toString(); + this.meta = extractor_1.extract(this.xmlString, extraParse.concat([ + { + key: "entityDescriptor", + localPath: ["EntityDescriptor"], + attributes: [], + context: true, + }, + { + key: "entityID", + localPath: ["EntityDescriptor"], + attributes: ["entityID"], + }, + { + // shared certificate for both encryption and signing + key: "sharedCertificate", + localPath: [ + "EntityDescriptor", + "~SSODescriptor", + "KeyDescriptor", + "KeyInfo", + "X509Data", + "X509Certificate", + ], + attributes: [], + }, + { + // explicit certificate declaration for encryption and signing + key: "certificate", + localPath: ["EntityDescriptor", "~SSODescriptor", "KeyDescriptor"], + index: ["use"], + attributePath: ["KeyInfo", "X509Data", "X509Certificate"], + attributes: [], + }, + { + key: "singleLogoutService", + localPath: [ + "EntityDescriptor", + "~SSODescriptor", + "SingleLogoutService", + ], + attributes: ["Binding", "Location"], + }, + { + key: "nameIDFormat", + localPath: ["EntityDescriptor", "~SSODescriptor", "NameIDFormat"], + attributes: [], + }, + ])); + // get shared certificate + var sharedCertificate = this.meta.sharedCertificate; + if (typeof sharedCertificate === "string") { + this.meta.certificate = { + signing: sharedCertificate, + encryption: sharedCertificate, + }; + delete this.meta.sharedCertificate; + } + if (Array.isArray(this.meta.entityDescriptor) && + this.meta.entityDescriptor.length > 1) { + throw new Error("ERR_MULTIPLE_METADATA_ENTITYDESCRIPTOR"); + } + } + /** + * @desc Get the metadata in xml format + * @return {string} metadata in xml format + */ + Metadata.prototype.getMetadata = function () { + return this.xmlString; + }; + /** + * @desc Export the metadata to specific file + * @param {string} exportFile is the output file path + */ + Metadata.prototype.exportMetadata = function (exportFile) { + fs.writeFileSync(exportFile, this.xmlString); + }; + /** + * @desc Get the entityID in metadata + * @return {string} entityID + */ + Metadata.prototype.getEntityID = function () { + return this.meta.entityID; + }; + /** + * @desc Get the x509 certificate declared in entity metadata + * @param {string} use declares the type of certificate + * @return {string} certificate in string format + */ + Metadata.prototype.getX509Certificate = function (use) { + return this.meta.certificate[use] || null; + }; + /** + * @desc Get the support NameID format declared in entity metadata + * @return {array} support NameID format + */ + Metadata.prototype.getNameIDFormat = function () { + return this.meta.nameIDFormat; + }; + /** + * @desc Get the entity endpoint for single logout service + * @param {string} binding e.g. redirect, post + * @return {string/object} location + */ + Metadata.prototype.getSingleLogoutService = function (binding) { + if (binding && utility_1.isString(binding)) { + var bindType_1 = urn_1.namespace.binding[binding]; + var singleLogoutService = this.meta.singleLogoutService; + if (!(singleLogoutService instanceof Array)) { + singleLogoutService = [singleLogoutService]; + } + var service = singleLogoutService.find(function (obj) { return obj.binding === bindType_1; }); + if (service) { + return service.location; + } + } + return this.meta.singleLogoutService; + }; + /** + * @desc Get the support bindings + * @param {[string]} services + * @return {[string]} support bindings + */ + Metadata.prototype.getSupportBindings = function (services) { + var supportBindings = []; + if (services) { + supportBindings = services.reduce(function (acc, service) { + var supportBinding = Object.keys(service)[0]; + return acc.push(supportBinding); + }, []); + } + return supportBindings; + }; + return Metadata; +}()); +exports.default = Metadata; +//# sourceMappingURL=metadata.js.map \ No newline at end of file diff --git a/build/src/metadata.js.map b/build/src/metadata.js.map new file mode 100644 index 00000000..375698de --- /dev/null +++ b/build/src/metadata.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,uBAAyB;AACzB,6BAAkC;AAClC,yCAAsC;AACtC,qCAAqC;AAarC;IAIE;;;OAGG;IACH,kBAAY,GAAoB,EAAE,UAAoB;QAApB,2BAAA,EAAA,eAAoB;QACpD,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,mBAAO,CACjB,IAAI,CAAC,SAAS,EACd,UAAU,CAAC,MAAM,CAAC;YAChB;gBACE,GAAG,EAAE,kBAAkB;gBACvB,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI;aACd;YACD;gBACE,GAAG,EAAE,UAAU;gBACf,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;YACD;gBACE,qDAAqD;gBACrD,GAAG,EAAE,mBAAmB;gBACxB,SAAS,EAAE;oBACT,kBAAkB;oBAClB,gBAAgB;oBAChB,eAAe;oBACf,SAAS;oBACT,UAAU;oBACV,iBAAiB;iBAClB;gBACD,UAAU,EAAE,EAAE;aACf;YACD;gBACE,8DAA8D;gBAC9D,GAAG,EAAE,aAAa;gBAClB,SAAS,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,CAAC;gBAClE,KAAK,EAAE,CAAC,KAAK,CAAC;gBACd,aAAa,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,iBAAiB,CAAC;gBACzD,UAAU,EAAE,EAAE;aACf;YACD;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,SAAS,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AtB;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,yCAAsB,GAA7B,UAA8B,OAA2B;QACvD,IAAI,OAAO,IAAI,kBAAQ,CAAC,OAAO,CAAC,EAAE;YAChC,IAAM,UAAQ,GAAG,eAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACxD,IAAI,CAAC,CAAC,mBAAmB,YAAY,KAAK,CAAC,EAAE;gBAC3C,mBAAmB,GAAG,CAAC,mBAAmB,CAAC,CAAC;aAC7C;YACD,IAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CACtC,UAAC,GAAQ,IAAK,OAAA,GAAG,CAAC,OAAO,KAAK,UAAQ,EAAxB,CAAwB,CACvC,CAAC;YACF,IAAI,OAAO,EAAE;gBACX,OAAO,OAAO,CAAC,QAAQ,CAAC;aACzB;SACF;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACI,qCAAkB,GAAzB,UAA0B,QAAkB;QAC1C,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,QAAQ,EAAE;YACZ,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAC,GAAQ,EAAE,OAAO;gBAClD,IAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/C,OAAO,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC,EAAE,EAAE,CAAC,CAAC;SACR;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACH,eAAC;AAAD,CAAC,AA9JD,IA8JC"} \ No newline at end of file diff --git a/build/src/types.d.ts b/build/src/types.d.ts new file mode 100644 index 00000000..2c51544d --- /dev/null +++ b/build/src/types.d.ts @@ -0,0 +1,108 @@ +/// +import { LoginResponseTemplate } from "./libsaml"; +export { IdentityProvider as IdentityProviderConstructor } from "./entity-idp"; +export { IdpMetadata as IdentityProviderMetadata } from "./metadata-idp"; +export { ServiceProvider as ServiceProviderConstructor } from "./entity-sp"; +export { SpMetadata as ServiceProviderMetadata } from "./metadata-sp"; +export declare type MetadataFile = string | Buffer; +declare type SSOService = { + isDefault?: boolean; + Binding: string; + Location: string; +}; +export interface MetadataIdpOptions { + entityID?: string; + signingCert?: string | Buffer; + encryptCert?: string | Buffer; + wantAuthnRequestsSigned?: boolean; + nameIDFormat?: string[]; + singleSignOnService?: SSOService[]; + singleLogoutService?: SSOService[]; + requestSignatureAlgorithm?: string; +} +export declare type MetadataIdpConstructor = MetadataIdpOptions | MetadataFile; +export interface MetadataSpOptions { + entityID?: string; + signingCert?: string | Buffer; + encryptCert?: string | Buffer; + authnRequestsSigned?: boolean; + wantAssertionsSigned?: boolean; + wantMessageSigned?: boolean; + signatureConfig?: { + [key: string]: any; + }; + nameIDFormat?: string[]; + singleSignOnService?: SSOService[]; + singleLogoutService?: SSOService[]; + assertionConsumerService?: SSOService[]; + elementsOrder?: string[]; +} +export declare type MetadataSpConstructor = MetadataSpOptions | MetadataFile; +export declare type EntitySetting = ServiceProviderSettings & IdentityProviderSettings; +export interface SignatureConfig { + prefix?: string; + location?: { + reference?: string; + action?: "append" | "prepend" | "before" | "after"; + }; +} +export interface SAMLDocumentTemplate { + context?: string; +} +export declare type ServiceProviderSettings = { + metadata?: string | Buffer; + entityID?: string; + authnRequestsSigned?: boolean; + wantAssertionsSigned?: boolean; + wantMessageSigned?: boolean; + wantLogoutResponseSigned?: boolean; + wantLogoutRequestSigned?: boolean; + privateKey?: string | Buffer; + privateKeyPass?: string; + isAssertionEncrypted?: boolean; + requestSignatureAlgorithm?: string; + encPrivateKey?: string | Buffer; + encPrivateKeyPass?: string | Buffer; + assertionConsumerService?: SSOService[]; + singleLogoutService?: SSOService[]; + signatureConfig?: SignatureConfig; + loginRequestTemplate?: SAMLDocumentTemplate; + logoutRequestTemplate?: SAMLDocumentTemplate; + signingCert?: string | Buffer; + encryptCert?: string | Buffer; + transformationAlgorithms?: string[]; + nameIDFormat?: string[]; + allowCreate?: boolean; + relayState?: string; + clockDrifts?: [number, number]; +}; +export declare type IdentityProviderSettings = { + metadata?: string | Buffer; + /** signature algorithm */ + requestSignatureAlgorithm?: string; + /** template of login response */ + loginResponseTemplate?: LoginResponseTemplate; + /** template of logout request */ + logoutRequestTemplate?: SAMLDocumentTemplate; + /** customized function used for generating request ID */ + generateID?: () => string; + entityID?: string; + privateKey?: string | Buffer; + privateKeyPass?: string; + signingCert?: string | Buffer; + encryptCert?: string | Buffer /** todo */; + nameIDFormat?: string[]; + singleSignOnService?: SSOService[]; + singleLogoutService?: SSOService[]; + isAssertionEncrypted?: boolean; + encPrivateKey?: string | Buffer; + encPrivateKeyPass?: string; + messageSigningOrder?: string; + wantLogoutRequestSigned?: boolean; + wantLogoutResponseSigned?: boolean; + wantAuthnRequestsSigned?: boolean; + wantLogoutRequestSignedResponseSigned?: boolean; + tagPrefix?: { + [key: string]: string; + }; +}; diff --git a/build/src/types.js b/build/src/types.js new file mode 100644 index 00000000..511ddcce --- /dev/null +++ b/build/src/types.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var entity_idp_1 = require("./entity-idp"); +Object.defineProperty(exports, "IdentityProviderConstructor", { enumerable: true, get: function () { return entity_idp_1.IdentityProvider; } }); +var metadata_idp_1 = require("./metadata-idp"); +Object.defineProperty(exports, "IdentityProviderMetadata", { enumerable: true, get: function () { return metadata_idp_1.IdpMetadata; } }); +var entity_sp_1 = require("./entity-sp"); +Object.defineProperty(exports, "ServiceProviderConstructor", { enumerable: true, get: function () { return entity_sp_1.ServiceProvider; } }); +var metadata_sp_1 = require("./metadata-sp"); +Object.defineProperty(exports, "ServiceProviderMetadata", { enumerable: true, get: function () { return metadata_sp_1.SpMetadata; } }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/build/src/types.js.map b/build/src/types.js.map new file mode 100644 index 00000000..e2309b60 --- /dev/null +++ b/build/src/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;AAEA,2CAA+E;AAAtE,yHAAA,gBAAgB,OAA+B;AACxD,+CAAyE;AAAhE,wHAAA,WAAW,OAA4B;AAEhD,yCAA4E;AAAnE,uHAAA,eAAe,OAA8B;AACtD,6CAAsE;AAA7D,sHAAA,UAAU,OAA2B"} \ No newline at end of file diff --git a/build/src/urn.d.ts b/build/src/urn.d.ts new file mode 100644 index 00000000..85f630cc --- /dev/null +++ b/build/src/urn.d.ts @@ -0,0 +1,189 @@ +/** + * @file urn.ts + * @author tngan + * @desc Includes all keywords need in samlify + */ +export declare enum BindingNamespace { + Redirect = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + Post = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + Artifact = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" +} +export declare enum MessageSignatureOrder { + STE = "sign-then-encrypt", + ETS = "encrypt-then-sign" +} +export declare enum StatusCode { + Success = "urn:oasis:names:tc:SAML:2.0:status:Success", + Requester = "urn:oasis:names:tc:SAML:2.0:status:Requester", + Responder = "urn:oasis:names:tc:SAML:2.0:status:Responder", + VersionMismatch = "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch", + AuthFailed = "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed", + InvalidAttrNameOrValue = "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue", + InvalidNameIDPolicy = "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", + NoAuthnContext = "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext", + NoAvailableIDP = "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP", + NoPassive = "urn:oasis:names:tc:SAML:2.0:status:NoPassive", + NoSupportedIDP = "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP", + PartialLogout = "urn:oasis:names:tc:SAML:2.0:status:PartialLogout", + ProxyCountExceeded = "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded", + RequestDenied = "urn:oasis:names:tc:SAML:2.0:status:RequestDenied", + RequestUnsupported = "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported", + RequestVersionDeprecated = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated", + RequestVersionTooHigh = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh", + RequestVersionTooLow = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow", + ResourceNotRecognized = "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized", + TooManyResponses = "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses", + UnknownAttrProfile = "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile", + UnknownPrincipal = "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal", + UnsupportedBinding = "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding" +} +declare const namespace: { + binding: { + redirect: string; + post: string; + artifact: string; + }; + names: { + protocol: string; + assertion: string; + metadata: string; + userLogout: string; + adminLogout: string; + }; + authnContextClassRef: { + password: string; + passwordProtectedTransport: string; + }; + format: { + emailAddress: string; + persistent: string; + transient: string; + entity: string; + unspecified: string; + kerberos: string; + windowsDomainQualifiedName: string; + x509SubjectName: string; + }; + statusCode: { + success: string; + requester: string; + responder: string; + versionMismatch: string; + authFailed: string; + invalidAttrNameOrValue: string; + invalidNameIDPolicy: string; + noAuthnContext: string; + noAvailableIDP: string; + noPassive: string; + noSupportedIDP: string; + partialLogout: string; + proxyCountExceeded: string; + requestDenied: string; + requestUnsupported: string; + requestVersionDeprecated: string; + requestVersionTooHigh: string; + requestVersionTooLow: string; + resourceNotRecognized: string; + tooManyResponses: string; + unknownAttrProfile: string; + unknownPrincipal: string; + unsupportedBinding: string; + }; +}; +declare const tags: { + request: { + AllowCreate: string; + AssertionConsumerServiceURL: string; + AuthnContextClassRef: string; + AssertionID: string; + Audience: string; + AuthnStatement: string; + AttributeStatement: string; + ConditionsNotBefore: string; + ConditionsNotOnOrAfter: string; + Destination: string; + EntityID: string; + ID: string; + Issuer: string; + IssueInstant: string; + InResponseTo: string; + NameID: string; + NameIDFormat: string; + ProtocolBinding: string; + SessionIndex: string; + SubjectRecipient: string; + SubjectConfirmationDataNotOnOrAfter: string; + StatusCode: string; + }; + xmlTag: { + loginRequest: string; + logoutRequest: string; + loginResponse: string; + logoutResponse: string; + }; +}; +declare const messageConfigurations: { + signingOrder: { + SIGN_THEN_ENCRYPT: string; + ENCRYPT_THEN_SIGN: string; + }; +}; +declare const algorithms: { + signature: { + RSA_SHA1: string; + RSA_SHA256: string; + RSA_SHA512: string; + }; + encryption: { + data: { + AES_128: string; + AES_256: string; + TRI_DEC: string; + }; + key: { + RSA_OAEP_MGF1P: string; + RSA_1_5: string; + }; + }; + digest: { + "http://www.w3.org/2000/09/xmldsig#rsa-sha1": string; + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": string; + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": string; + }; +}; +export declare enum ParserType { + SAMLRequest = "SAMLRequest", + SAMLResponse = "SAMLResponse", + LogoutRequest = "LogoutRequest", + LogoutResponse = "LogoutResponse" +} +declare const wording: { + urlParams: { + samlRequest: string; + samlResponse: string; + logoutRequest: string; + logoutResponse: string; + sigAlg: string; + signature: string; + relayState: string; + }; + binding: { + redirect: string; + post: string; + artifact: string; + }; + certUse: { + signing: string; + encrypt: string; + }; + metadata: { + sp: string; + idp: string; + }; +}; +declare const elementsOrder: { + default: string[]; + onelogin: string[]; + shibboleth: string[]; +}; +export { namespace, tags, algorithms, wording, elementsOrder, messageConfigurations, }; diff --git a/build/src/urn.js b/build/src/urn.js new file mode 100644 index 00000000..184985e7 --- /dev/null +++ b/build/src/urn.js @@ -0,0 +1,224 @@ +"use strict"; +/** + * @file urn.ts + * @author tngan + * @desc Includes all keywords need in samlify + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.messageConfigurations = exports.elementsOrder = exports.wording = exports.algorithms = exports.tags = exports.namespace = exports.ParserType = exports.StatusCode = exports.MessageSignatureOrder = exports.BindingNamespace = void 0; +var BindingNamespace; +(function (BindingNamespace) { + BindingNamespace["Redirect"] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"; + BindingNamespace["Post"] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"; + BindingNamespace["Artifact"] = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"; +})(BindingNamespace = exports.BindingNamespace || (exports.BindingNamespace = {})); +var MessageSignatureOrder; +(function (MessageSignatureOrder) { + MessageSignatureOrder["STE"] = "sign-then-encrypt"; + MessageSignatureOrder["ETS"] = "encrypt-then-sign"; +})(MessageSignatureOrder = exports.MessageSignatureOrder || (exports.MessageSignatureOrder = {})); +var StatusCode; +(function (StatusCode) { + // top-tier + StatusCode["Success"] = "urn:oasis:names:tc:SAML:2.0:status:Success"; + StatusCode["Requester"] = "urn:oasis:names:tc:SAML:2.0:status:Requester"; + StatusCode["Responder"] = "urn:oasis:names:tc:SAML:2.0:status:Responder"; + StatusCode["VersionMismatch"] = "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"; + // second-tier to provide more information + StatusCode["AuthFailed"] = "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed"; + StatusCode["InvalidAttrNameOrValue"] = "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue"; + StatusCode["InvalidNameIDPolicy"] = "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"; + StatusCode["NoAuthnContext"] = "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext"; + StatusCode["NoAvailableIDP"] = "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP"; + StatusCode["NoPassive"] = "urn:oasis:names:tc:SAML:2.0:status:NoPassive"; + StatusCode["NoSupportedIDP"] = "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP"; + StatusCode["PartialLogout"] = "urn:oasis:names:tc:SAML:2.0:status:PartialLogout"; + StatusCode["ProxyCountExceeded"] = "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded"; + StatusCode["RequestDenied"] = "urn:oasis:names:tc:SAML:2.0:status:RequestDenied"; + StatusCode["RequestUnsupported"] = "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported"; + StatusCode["RequestVersionDeprecated"] = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated"; + StatusCode["RequestVersionTooHigh"] = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh"; + StatusCode["RequestVersionTooLow"] = "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow"; + StatusCode["ResourceNotRecognized"] = "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized"; + StatusCode["TooManyResponses"] = "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses"; + StatusCode["UnknownAttrProfile"] = "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile"; + StatusCode["UnknownPrincipal"] = "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal"; + StatusCode["UnsupportedBinding"] = "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding"; +})(StatusCode = exports.StatusCode || (exports.StatusCode = {})); +var namespace = { + binding: { + redirect: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + post: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + artifact: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact", + }, + names: { + protocol: "urn:oasis:names:tc:SAML:2.0:protocol", + assertion: "urn:oasis:names:tc:SAML:2.0:assertion", + metadata: "urn:oasis:names:tc:SAML:2.0:metadata", + userLogout: "urn:oasis:names:tc:SAML:2.0:logout:user", + adminLogout: "urn:oasis:names:tc:SAML:2.0:logout:admin", + }, + authnContextClassRef: { + password: "urn:oasis:names:tc:SAML:2.0:ac:classes:Password", + passwordProtectedTransport: "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", + }, + format: { + emailAddress: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + persistent: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + transient: "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + entity: "urn:oasis:names:tc:SAML:2.0:nameid-format:entity", + unspecified: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + kerberos: "urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos", + windowsDomainQualifiedName: "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", + x509SubjectName: "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", + }, + statusCode: { + // permissible top-level status codes + success: "urn:oasis:names:tc:SAML:2.0:status:Success", + requester: "urn:oasis:names:tc:SAML:2.0:status:Requester", + responder: "urn:oasis:names:tc:SAML:2.0:status:Responder", + versionMismatch: "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch", + // second-level status codes + authFailed: "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed", + invalidAttrNameOrValue: "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue", + invalidNameIDPolicy: "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", + noAuthnContext: "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext", + noAvailableIDP: "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP", + noPassive: "urn:oasis:names:tc:SAML:2.0:status:NoPassive", + noSupportedIDP: "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP", + partialLogout: "urn:oasis:names:tc:SAML:2.0:status:PartialLogout", + proxyCountExceeded: "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded", + requestDenied: "urn:oasis:names:tc:SAML:2.0:status:RequestDenied", + requestUnsupported: "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported", + requestVersionDeprecated: "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated", + requestVersionTooHigh: "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh", + requestVersionTooLow: "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow", + resourceNotRecognized: "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized", + tooManyResponses: "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses", + unknownAttrProfile: "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile", + unknownPrincipal: "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal", + unsupportedBinding: "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding", + }, +}; +exports.namespace = namespace; +var tags = { + request: { + AllowCreate: "{AllowCreate}", + AssertionConsumerServiceURL: "{AssertionConsumerServiceURL}", + AuthnContextClassRef: "{AuthnContextClassRef}", + AssertionID: "{AssertionID}", + Audience: "{Audience}", + AuthnStatement: "{AuthnStatement}", + AttributeStatement: "{AttributeStatement}", + ConditionsNotBefore: "{ConditionsNotBefore}", + ConditionsNotOnOrAfter: "{ConditionsNotOnOrAfter}", + Destination: "{Destination}", + EntityID: "{EntityID}", + ID: "{ID}", + Issuer: "{Issuer}", + IssueInstant: "{IssueInstant}", + InResponseTo: "{InResponseTo}", + NameID: "{NameID}", + NameIDFormat: "{NameIDFormat}", + ProtocolBinding: "{ProtocolBinding}", + SessionIndex: "{SessionIndex}", + SubjectRecipient: "{SubjectRecipient}", + SubjectConfirmationDataNotOnOrAfter: "{SubjectConfirmationDataNotOnOrAfter}", + StatusCode: "{StatusCode}", + }, + xmlTag: { + loginRequest: "AuthnRequest", + logoutRequest: "LogoutRequest", + loginResponse: "Response", + logoutResponse: "LogoutResponse", + }, +}; +exports.tags = tags; +var messageConfigurations = { + signingOrder: { + SIGN_THEN_ENCRYPT: "sign-then-encrypt", + ENCRYPT_THEN_SIGN: "encrypt-then-sign", + }, +}; +exports.messageConfigurations = messageConfigurations; +var algorithms = { + signature: { + RSA_SHA1: "http://www.w3.org/2000/09/xmldsig#rsa-sha1", + RSA_SHA256: "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", + RSA_SHA512: "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", + }, + encryption: { + data: { + AES_128: "http://www.w3.org/2001/04/xmlenc#aes128-cbc", + AES_256: "http://www.w3.org/2001/04/xmlenc#aes256-cbc", + TRI_DEC: "http://www.w3.org/2001/04/xmlenc#tripledes-cbc", + }, + key: { + RSA_OAEP_MGF1P: "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", + RSA_1_5: "http://www.w3.org/2001/04/xmlenc#rsa-1_5", + }, + }, + digest: { + "http://www.w3.org/2000/09/xmldsig#rsa-sha1": "http://www.w3.org/2000/09/xmldsig#sha1", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": "http://www.w3.org/2001/04/xmlenc#sha256", + "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": "http://www.w3.org/2001/04/xmlenc#sha512", + }, +}; +exports.algorithms = algorithms; +var ParserType; +(function (ParserType) { + ParserType["SAMLRequest"] = "SAMLRequest"; + ParserType["SAMLResponse"] = "SAMLResponse"; + ParserType["LogoutRequest"] = "LogoutRequest"; + ParserType["LogoutResponse"] = "LogoutResponse"; +})(ParserType = exports.ParserType || (exports.ParserType = {})); +var wording = { + urlParams: { + samlRequest: "SAMLRequest", + samlResponse: "SAMLResponse", + logoutRequest: "LogoutRequest", + logoutResponse: "LogoutResponse", + sigAlg: "SigAlg", + signature: "Signature", + relayState: "RelayState", + }, + binding: { + redirect: "redirect", + post: "post", + artifact: "artifact", + }, + certUse: { + signing: "signing", + encrypt: "encryption", + }, + metadata: { + sp: "metadata-sp", + idp: "metadata-idp", + }, +}; +exports.wording = wording; +// https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForSP +// some idps restrict the order of elements in entity descriptors +var elementsOrder = { + default: [ + "KeyDescriptor", + "NameIDFormat", + "SingleLogoutService", + "AssertionConsumerService", + ], + onelogin: [ + "KeyDescriptor", + "NameIDFormat", + "SingleLogoutService", + "AssertionConsumerService", + ], + shibboleth: [ + "KeyDescriptor", + "SingleLogoutService", + "NameIDFormat", + "AssertionConsumerService", + "AttributeConsumingService", + ], +}; +exports.elementsOrder = elementsOrder; +//# sourceMappingURL=urn.js.map \ No newline at end of file diff --git a/build/src/urn.js.map b/build/src/urn.js.map new file mode 100644 index 00000000..32831a19 --- /dev/null +++ b/build/src/urn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../src/urn.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mFAA+D,CAAA;IAC/D,2EAAuD,CAAA;IACvD,mFAA+D,CAAA;AACjE,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,kDAAyB,CAAA;IACzB,kDAAyB,CAAA;AAC3B,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAY,UA0BX;AA1BD,WAAY,UAAU;IACpB,WAAW;IACX,oEAAsD,CAAA;IACtD,wEAA0D,CAAA;IAC1D,wEAA0D,CAAA;IAC1D,oFAAsE,CAAA;IACtE,0CAA0C;IAC1C,2EAA6D,CAAA;IAC7D,kGAAoF,CAAA;IACpF,4FAA8E,CAAA;IAC9E,kFAAoE,CAAA;IACpE,kFAAoE,CAAA;IACpE,wEAA0D,CAAA;IAC1D,kFAAoE,CAAA;IACpE,gFAAkE,CAAA;IAClE,0FAA4E,CAAA;IAC5E,gFAAkE,CAAA;IAClE,0FAA4E,CAAA;IAC5E,sGAAwF,CAAA;IACxF,gGAAkF,CAAA;IAClF,8FAAgF,CAAA;IAChF,gGAAkF,CAAA;IAClF,sFAAwE,CAAA;IACxE,0FAA4E,CAAA;IAC5E,sF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AAU,EAAE;QACV,eAAe;QACf,qBAAqB;QACrB,cAAc;QACd,0BAA0B;QAC1B,2BAA2B;KAC5B;CACF,CAAC;AAOA,sCAAa"} \ No newline at end of file diff --git a/build/src/utility.d.ts b/build/src/utility.d.ts new file mode 100644 index 00000000..ff9cf3b7 --- /dev/null +++ b/build/src/utility.d.ts @@ -0,0 +1,137 @@ +/// +/** + * @desc Mimic lodash.zipObject + * @param arr1 {string[]} + * @param arr2 {[]} + * @param skipDuplicated + */ +export declare function zipObject(arr1: string[], arr2: any[], skipDuplicated?: boolean): {}; +/** + * @desc Alternative to lodash.flattenDeep + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep + * @param input {[]} + */ +export declare function flattenDeep(input: any[]): any; +/** + * @desc Alternative to lodash.last + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_last + * @param input {[]} + */ +export declare function last(input: any[]): any; +/** + * @desc Alternative to lodash.uniq + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq + * @param input {string[]} + */ +export declare function uniq(input: string[]): string[]; +/** + * @desc Alternative to lodash.get + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get + * @param obj + * @param path + * @param defaultValue + */ +export declare function get(obj: any, path: any, defaultValue: any): any; +/** + * @desc Check if the input is string + * @param input + */ +export declare function isString(input: any): boolean; +/** + * @desc Encode string with base64 format + * @param {string} message plain-text message + * @return {string} base64 encoded string + */ +declare function base64Encode(message: string | number[]): string; +/** + * @desc Decode string from base64 format + * @param {string} base64Message encoded string + * @param {boolean} isBytes determine the return value type (True: bytes False: string) + * @return {bytes/string} decoded bytes/string depends on isBytes, default is {string} + */ +export declare function base64Decode(base64Message: string, isBytes?: boolean): string | Buffer; +/** + * @desc Compress the string + * @param {string} message + * @return {string} compressed string + */ +declare function deflateString(message: string): number[]; +/** + * @desc Decompress the compressed string + * @param {string} compressedString + * @return {string} decompressed string + */ +export declare function inflateString(compressedString: string): string; +/** + * @desc Parse the .cer to string format without line break, header and footer + * @param {string} certString declares the certificate contents + * @return {string} certificiate in string format + */ +declare function normalizeCerString(certString: string | Buffer): string; +/** + * @desc Normalize the string in .pem format without line break, header and footer + * @param {string} pemString + * @return {string} private key in string format + */ +declare function normalizePemString(pemString: string | Buffer): string; +/** + * @desc Return the complete URL + * @param {object} req HTTP request + * @return {string} URL + */ +declare function getFullURL(req: any): string; +/** + * @desc Parse input string, return default value if it is undefined + * @return {boolean} + * @param str + * @param defaultValue + */ +declare function parseString(str: any, defaultValue?: string): any; +/** + * @desc Override the object by another object (rtl) + * @return {object} result object + * @param obj1 + * @param obj2 + */ +declare function applyDefault(obj1: any, obj2: any): any; +/** + * @desc Get public key in pem format from the certificate included in the metadata + * @return {string} public key fetched from the certificate + * @param x509Certificate + */ +declare function getPublicKeyPemFromCertificate(x509Certificate: string): string; +/** + * @desc Read private key from pem-formatted string + * @param {string | Buffer} keyString pem-formattted string + * @param passphrase + * @param isOutputString + * @return {string} string in pem format + * If passphrase is used to protect the .pem content (recommend) + */ +export declare function readPrivateKey(keyString: string | Buffer, passphrase: string | undefined, isOutputString?: boolean): any; +/** + * @desc Inline syntax sugar + */ +declare function convertToString(input: any, isOutputString: any): any; +/** + * @desc Check if the input is an array with non-zero size + */ +export declare function isNonEmptyArray(a: any): boolean; +export declare function notEmpty(value: TValue | null | undefined): value is TValue; +declare const utility: { + isString: typeof isString; + base64Encode: typeof base64Encode; + base64Decode: typeof base64Decode; + deflateString: typeof deflateString; + inflateString: typeof inflateString; + normalizeCerString: typeof normalizeCerString; + normalizePemString: typeof normalizePemString; + getFullURL: typeof getFullURL; + parseString: typeof parseString; + applyDefault: typeof applyDefault; + getPublicKeyPemFromCertificate: typeof getPublicKeyPemFromCertificate; + readPrivateKey: typeof readPrivateKey; + convertToString: typeof convertToString; + isNonEmptyArray: typeof isNonEmptyArray; +}; +export default utility; diff --git a/build/src/utility.js b/build/src/utility.js new file mode 100644 index 00000000..d615e6cd --- /dev/null +++ b/build/src/utility.js @@ -0,0 +1,268 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.notEmpty = exports.isNonEmptyArray = exports.readPrivateKey = exports.inflateString = exports.base64Decode = exports.isString = exports.get = exports.uniq = exports.last = exports.flattenDeep = exports.zipObject = void 0; +/** + * @file utility.ts + * @author tngan + * @desc Library for some common functions (e.g. de/inflation, en/decoding) + */ +var node_forge_1 = require("node-forge"); +var pako_1 = require("pako"); +var BASE64_STR = "base64"; +/** + * @desc Mimic lodash.zipObject + * @param arr1 {string[]} + * @param arr2 {[]} + * @param skipDuplicated + */ +function zipObject(arr1, arr2, skipDuplicated) { + if (skipDuplicated === void 0) { skipDuplicated = true; } + return arr1.reduce(function (res, l, i) { + if (skipDuplicated) { + res[l] = arr2[i]; + return res; + } + // if key exists, aggregate with array in order to get rid of duplicate key + if (res[l] !== undefined) { + res[l] = Array.isArray(res[l]) + ? res[l].concat(arr2[i]) + : [res[l]].concat(arr2[i]); + return res; + } + res[l] = arr2[i]; + return res; + }, {}); +} +exports.zipObject = zipObject; +/** + * @desc Alternative to lodash.flattenDeep + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep + * @param input {[]} + */ +function flattenDeep(input) { + return Array.isArray(input) + ? input.reduce(function (a, b) { return a.concat(flattenDeep(b)); }, []) + : [input]; +} +exports.flattenDeep = flattenDeep; +/** + * @desc Alternative to lodash.last + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_last + * @param input {[]} + */ +function last(input) { + return input.slice(-1)[0]; +} +exports.last = last; +/** + * @desc Alternative to lodash.uniq + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq + * @param input {string[]} + */ +function uniq(input) { + var set = new Set(input); + return __spread(set); +} +exports.uniq = uniq; +/** + * @desc Alternative to lodash.get + * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get + * @param obj + * @param path + * @param defaultValue + */ +function get(obj, path, defaultValue) { + return path + .split(".") + .reduce(function (a, c) { return (a && a[c] ? a[c] : defaultValue || null); }, obj); +} +exports.get = get; +/** + * @desc Check if the input is string + * @param input + */ +function isString(input) { + return typeof input === "string"; +} +exports.isString = isString; +/** + * @desc Encode string with base64 format + * @param {string} message plain-text message + * @return {string} base64 encoded string + */ +function base64Encode(message) { + return Buffer.from(message).toString(BASE64_STR); +} +/** + * @desc Decode string from base64 format + * @param {string} base64Message encoded string + * @param {boolean} isBytes determine the return value type (True: bytes False: string) + * @return {bytes/string} decoded bytes/string depends on isBytes, default is {string} + */ +function base64Decode(base64Message, isBytes) { + var bytes = Buffer.from(base64Message, BASE64_STR); + return Boolean(isBytes) ? bytes : bytes.toString(); +} +exports.base64Decode = base64Decode; +/** + * @desc Compress the string + * @param {string} message + * @return {string} compressed string + */ +function deflateString(message) { + var input = Array.prototype.map.call(message, function (char) { + return char.charCodeAt(0); + }); + return Array.from(pako_1.deflate(input, { raw: true })); +} +/** + * @desc Decompress the compressed string + * @param {string} compressedString + * @return {string} decompressed string + */ +function inflateString(compressedString) { + var inputBuffer = Buffer.from(compressedString, BASE64_STR); + var input = Array.prototype.map.call(inputBuffer.toString("binary"), function (char) { return char.charCodeAt(0); }); + return Array.from(pako_1.inflate(input, { raw: true })) + .map(function (byte) { return String.fromCharCode(byte); }) + .join(""); +} +exports.inflateString = inflateString; +/** + * @desc Abstract the normalizeCerString and normalizePemString + * @return {string} A formatted certificate string + * @param bin + * @param format + */ +function _normalizeCerString(bin, format) { + return bin + .toString() + .replace(/\n/g, "") + .replace(/\r/g, "") + .replace("-----BEGIN " + format + "-----", "") + .replace("-----END " + format + "-----", "") + .replace(/ /g, ""); +} +/** + * @desc Parse the .cer to string format without line break, header and footer + * @param {string} certString declares the certificate contents + * @return {string} certificiate in string format + */ +function normalizeCerString(certString) { + return _normalizeCerString(certString, "CERTIFICATE"); +} +/** + * @desc Normalize the string in .pem format without line break, header and footer + * @param {string} pemString + * @return {string} private key in string format + */ +function normalizePemString(pemString) { + return _normalizeCerString(pemString.toString(), "RSA PRIVATE KEY"); +} +/** + * @desc Return the complete URL + * @param {object} req HTTP request + * @return {string} URL + */ +function getFullURL(req) { + return req.protocol + "://" + req.get("host") + req.originalUrl; +} +/** + * @desc Parse input string, return default value if it is undefined + * @return {boolean} + * @param str + * @param defaultValue + */ +function parseString(str, defaultValue) { + if (defaultValue === void 0) { defaultValue = ""; } + return str || defaultValue; +} +/** + * @desc Override the object by another object (rtl) + * @return {object} result object + * @param obj1 + * @param obj2 + */ +function applyDefault(obj1, obj2) { + return Object.assign({}, obj1, obj2); +} +/** + * @desc Get public key in pem format from the certificate included in the metadata + * @return {string} public key fetched from the certificate + * @param x509Certificate + */ +function getPublicKeyPemFromCertificate(x509Certificate) { + var certDerBytes = node_forge_1.util.decode64(x509Certificate); + var obj = node_forge_1.asn1.fromDer(certDerBytes); + var cert = node_forge_1.pki.certificateFromAsn1(obj); + return node_forge_1.pki.publicKeyToPem(cert.publicKey); +} +/** + * @desc Read private key from pem-formatted string + * @param {string | Buffer} keyString pem-formattted string + * @param passphrase + * @param isOutputString + * @return {string} string in pem format + * If passphrase is used to protect the .pem content (recommend) + */ +function readPrivateKey(keyString, passphrase, isOutputString) { + return isString(passphrase) + ? this.convertToString(node_forge_1.pki.privateKeyToPem(node_forge_1.pki.decryptRsaPrivateKey(String(keyString), passphrase)), isOutputString) + : keyString; +} +exports.readPrivateKey = readPrivateKey; +/** + * @desc Inline syntax sugar + */ +function convertToString(input, isOutputString) { + return Boolean(isOutputString) ? String(input) : input; +} +/** + * @desc Check if the input is an array with non-zero size + */ +function isNonEmptyArray(a) { + return Array.isArray(a) && a.length > 0; +} +exports.isNonEmptyArray = isNonEmptyArray; +function notEmpty(value) { + return value !== null && value !== undefined; +} +exports.notEmpty = notEmpty; +var utility = { + isString: isString, + base64Encode: base64Encode, + base64Decode: base64Decode, + deflateString: deflateString, + inflateString: inflateString, + normalizeCerString: normalizeCerString, + normalizePemString: normalizePemString, + getFullURL: getFullURL, + parseString: parseString, + applyDefault: applyDefault, + getPublicKeyPemFromCertificate: getPublicKeyPemFromCertificate, + readPrivateKey: readPrivateKey, + convertToString: convertToString, + isNonEmptyArray: isNonEmptyArray, +}; +exports.default = utility; +//# sourceMappingURL=utility.js.map \ No newline at end of file diff --git a/build/src/utility.js.map b/build/src/utility.js.map new file mode 100644 index 00000000..992c0db9 --- /dev/null +++ b/build/src/utility.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,yCAA6C;AAC7C,6BAAwC;AAExC,IAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAc,EAAE,IAAW,EAAE,cAAqB;IAArB,+BAAA,EAAA,qBAAqB;IAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QAC3B,IAAI,cAAc,EAAE;YAClB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,GAAG,CAAC;SACZ;QACD,2EAA2E;QAC3E,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;YACxB,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC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AAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAJD,4BAIC;AAED,IAAM,OAAO,GAAG;IACd,QAAQ,UAAA;IACR,YAAY,cAAA;IACZ,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,aAAa,eAAA;IACb,kBAAkB,oBAAA;IAClB,kBAAkB,oBAAA;IAClB,UAAU,YAAA;IACV,WAAW,aAAA;IACX,YAAY,cAAA;IACZ,8BAA8B,gCAAA;IAC9B,cAAc,gBAAA;IACd,eAAe,iBAAA;IACf,eAAe,iBAAA;CAChB,CAAC;AAEF,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/build/src/validator.d.ts b/build/src/validator.d.ts new file mode 100644 index 00000000..aedb0889 --- /dev/null +++ b/build/src/validator.d.ts @@ -0,0 +1,3 @@ +declare type DriftTolerance = [number, number]; +declare function verifyTime(utcNotBefore: string | undefined, utcNotOnOrAfter: string | undefined, drift?: DriftTolerance): boolean; +export { verifyTime }; diff --git a/build/src/validator.js b/build/src/validator.js new file mode 100644 index 00000000..6497ea2d --- /dev/null +++ b/build/src/validator.js @@ -0,0 +1,45 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.verifyTime = void 0; +function verifyTime(utcNotBefore, utcNotOnOrAfter, drift) { + if (drift === void 0) { drift = [0, 0]; } + var now = new Date(); + if (!utcNotBefore && !utcNotOnOrAfter) { + // show warning because user intends to have time check but the document doesn't include corresponding information + console.warn("You intend to have time validation however the document doesn't include the valid range."); + return true; + } + var notBeforeLocal = null; + var notOnOrAfterLocal = null; + var _a = __read(drift, 2), notBeforeDrift = _a[0], notOnOrAfterDrift = _a[1]; + if (utcNotBefore && !utcNotOnOrAfter) { + notBeforeLocal = new Date(utcNotBefore); + return +notBeforeLocal + notBeforeDrift <= +now; + } + if (!utcNotBefore && utcNotOnOrAfter) { + notOnOrAfterLocal = new Date(utcNotOnOrAfter); + return +now < +notOnOrAfterLocal + notOnOrAfterDrift; + } + notBeforeLocal = new Date(utcNotBefore); + notOnOrAfterLocal = new Date(utcNotOnOrAfter); + return (+notBeforeLocal + notBeforeDrift <= +now && + +now < +notOnOrAfterLocal + notOnOrAfterDrift); +} +exports.verifyTime = verifyTime; +//# sourceMappingURL=validator.js.map \ No newline at end of file diff --git a/build/src/validator.js.map b/build/src/validator.js.map new file mode 100644 index 00000000..b9e5b139 --- /dev/null +++ b/build/src/validator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,SAAS,UAAU,CACjB,YAAgC,EAChC,eAAmC,EACnC,KAA8B;IAA9B,sBAAA,EAAA,SAAyB,CAAC,EAAE,CAAC,CAAC;IAE9B,IAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,EAAE;QACrC,kHAAkH;QAClH,OAAO,CAAC,IAAI,CACV,0FAA0F,CAC3F,CAAC;QACF,OAAO,IAAI,CAAC;KACb;IAED,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,IAAI,iBAAiB,GAAgB,IAAI,CAAC;IAEpC,IAAA,KAAA,OAAsC,KAAK,IAAA,EAA1C,cAAc,QAAA,EAAE,iBAAiB,QAAS,CAAC;IAElD,IAAI,YAAY,IAAI,CAAC,eAAe,EAAE;QACpC,cAAc,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG,CAAC;KACjD;IACD,IAAI,CAAC,YAAY,IAAI,eAAe,EAAE;QACpC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KACtD;IAED,cAAc,GAAG,IAAI,IAAI,CAAC,YAAa,CAAC,CAAC;IACzC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAgB,CAAC,CAAC;IAE/C,OAAO,CACL,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG;QACxC,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAC9C,CAAC;AACJ,CAAC;AAEQ,gCAAU"} \ No newline at end of file diff --git a/build/test/key/idp/README.md b/build/test/key/idp/README.md new file mode 100644 index 00000000..6e789d68 --- /dev/null +++ b/build/test/key/idp/README.md @@ -0,0 +1,4 @@ +## Support the use case of rolling certificate + +- `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` +- `privkey2.pem` - no password protected, it generates `cert2.cer` diff --git a/build/test/key/idp/cert.cer b/build/test/key/idp/cert.cer new file mode 100644 index 00000000..b1b40e6d --- /dev/null +++ b/build/test/key/idp/cert.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV +BAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQ +cm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0x +NTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYD +VQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIG +A1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG +3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZU +tWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3 +pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRA +vr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsb +VUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0O +BBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwd +wK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPN +mHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUw +i1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef +2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0a +zkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWW +k1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4 +yyoWAJDUHiAmvFA= +-----END CERTIFICATE----- diff --git a/build/test/key/idp/cert2.cer b/build/test/key/idp/cert2.cer new file mode 100644 index 00000000..46c90a64 --- /dev/null +++ b/build/test/key/idp/cert2.cer @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFLjCCAxYCCQCqGHhTssya9jANBgkqhkiG9w0BAQsFADBZMQ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Vl+MQ2SLPWi7pC/t/Zv4kc361xP26FAVSSrxgXq9kVLZeJIA +qCwjGHkl/DTUlA8hfLfuZx5z+NI/qIodsXAjCzsCe7paEbjvR6OQjYkR0UY4u/AO +O7x2op2KDFKNuWT9KZNm8bh1mxwNKep1fJP2O5M0nMYAGYbPsLAOn7mzZyufQl8h +sJwIV2s8sbft7s8vmEYZbuueQDOJCMTt+eC08LONrovYChyYmj3i5RIk8kcaodeS +Do811F1B1gDvO/dmVxgrHEgoai7X6LUoiAiLkigP7udNEZxbXsRlOhBRv9w+rRXF +urVFlUPkQ9UF+QB0BoyIcUxo+fZ8vCA4xEVBenVBadpFbwum6+XeTkvDoRc4sSCp +m8v2qtprc8aU/0F82EzxSybYvstc5lDv7wuwCwNwfoAQ+/16kTpJvoYbOXUPv5yC +A3mIuqYeA1woaWPXsE4jNOzTqv1qOZQTvXProEgK5B0FR5ILc4mfNrD2p9VGbiYf +2GjCfeEzDFg174dvSn2MMp1yK5pvZEp7yFE8z1eduYN6W/7qdtss9BGpnyS5X7Lu +YfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwv +ICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA== +-----END CERTIFICATE----- diff --git a/build/test/key/idp/encryptKey.pem b/build/test/key/idp/encryptKey.pem new file mode 100644 index 00000000..de728a44 --- /dev/null +++ b/build/test/key/idp/encryptKey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,FACBF89A697AB50A + +i0RiFM9TTHzN/atuOBWhAfoty7rMEgNVVsyeoAPqQZoGwBTmOSbMZ+3vLR3jc7Xi +GJ4NtXOux2IcNy5rcYnL3SgZIANVakfEUwF6qwBLCGYbOaqWqEv4eHvz9JHIH9iC +0w4PPMzA2Q4daWiRw1UGr4Kik2iqfkDGv4JPdUDY7/KNlD4hpthRk6axUg+Xb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Qb6QICCFE0SRUGutYYuUZm4AYG3JEeI4JGYpE1h9pGXMz +m1hlV8N9EIJiFdEtGifjAcfHSVHm7m4us5qOG0TiVfSDC3RZCJSxm8pAUJXLaemp +BvoHL8MuJX8bNMMB3JpWW3e3HxrmR8nLk+xZiviggfWBVRxM9YAyb6NPezVFAV0H +YTULqiXGZbpe+Bm6MmJ6LryicIf8E3pyGbQEYtO9iLYfXnJDHud4dKZnXqjo68oc +80EeEm149eVGtYFRiWhjnRGyb6Hdql4u5iLZdaBRIm3Jm0qsHioYBi6SH5ucPM+q +8hSEfoIZiRlSsrjzvko+19lM4/JnHpk/7cihRNpgXBQysGLwSSA626cvgjwEJSJB +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/encryptionCert.cer b/build/test/key/idp/encryptionCert.cer new file mode 100644 index 00000000..d4086bd9 --- /dev/null +++ b/build/test/key/idp/encryptionCert.cer @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID6TCCAtGgAwIBAgIJAPQQPsolUypeMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFTATBgNVBAoTDGV4cHJlc3Mtc2Ft +bDEMMAoGA1UECxMDZGV2MQ4wDAYDVQQDEwVlc2FtbDAeFw0xNTEwMDMwMzU3MzRa +Fw0xODEwMDIwMzU3MzRaMFYxCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv +bmcxFTATBgNVBAoTDGV4cHJlc3Mtc2FtbDEMMAoGA1UECxMDZGV2MQ4wDAYDVQQD +EwVlc2FtbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL7dF1gUNu8e +n0fHMSbzf192uB8m2CTeHeEeYrmq5rau6t1WzaHwbSStd9tJ/11Arm8f8zfefFqE +BA0EYbp/DMqHb9ZiLGgIff08679NOYeK/d9EAs5DzvTMTR6QqG7a4vH3jKOksIbj +M35h5RVitVDxo+xWDKyvOpuNE64bJlWHOEiNxvwmcHfJ2hAd1EozaRLcJOojFHg5 +1alUqiNIZ+vpkMAM8s3lUlcYETKqTpcnsE7c1QX60cCrFN4m3SNS98HGBEdotch8 ++2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2 +i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdb +P9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYD +VQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNh +bWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZe +ZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H +7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6 +kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NW +ixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV +8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz +-----END CERTIFICATE----- diff --git a/build/test/key/idp/nocrypt.pem b/build/test/key/idp/nocrypt.pem new file mode 100644 index 00000000..71dff696 --- /dev/null +++ b/build/test/key/idp/nocrypt.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEA4NmxaEJ77IbQ9qVA9NSgPvKSjkxNYwJHEnyFKbaTuYbcSD9j +a/QQF0KZPDuIMJ69GpSZuYWersxE7JXh6uInOH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LQ6CC637Fxyi2suj6B+UuIzedP/8MnPjhxf+zEQ8QtbjD3prmgZRfRV/bIZCl7kt +9MTuam7AxUmqCPUF/JkK2gECgYEA4Y8DF+w7i+EYag/mD8kVah+Hs2Jfc2QEkecs +bMdy5mEy21/Yakj+Kly+BBZa4oplcmy99yYY6dHfZMUqI/6KUd0O2MI8Fiv3y/Aw +7VVUkfllWl/kN0cEDkT0aAS+lZF0Mz15bbVpcjhybymN0at6SqL7iBv5UVVBCX7M +6tpoe70CgYEA5TAEHT77eF8falYD7nYKnPUinfx2p6a3J0UAWI33W3CE6K4MTMSN +Q2AxLj1ImFrmDMiPIFa9GeP9DrE/6eeKVI4q0u7kF58XkCammgIJ9GzyCBWfNpVR +rR2ZD+OyCGiqsrL4PqtHxTwRiYymLOuVKvXxZYlDDPN/RlkBINUX0qk= +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey.pem b/build/test/key/idp/privkey.pem new file mode 100644 index 00000000..b63e3eb2 --- /dev/null +++ b/build/test/key/idp/privkey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,116B0EBB2F2F0A9D + +HMmUsJPVPTsq1e06yrrskfinY21OOHosfRzibLueBg9ByFFZ7+/oW/DKy1GcDeBc +ycL+3gylIoGUYuZ+DPC11ArjdxFqLFnHJb96rwy5h4sTP0lE+qHy+06AwsowUgp3 +pdD2unPFeydpu5h/dqgoDzkGSucz0Ty/spHXNBvns0vJO18B7XlzXUtfH5aHco22 +DyVY6FrJwMts9E4Rzs9JsxJJ7mi/6+Qsc0rOr8/6KKsRo1sKD6cvQIQ05dEvGrE9 +/2fubHkRTl+zBqOVyQvC6iUtocwxlMP4KfmyYrD1wlQAnP/+smq2G+xf7uGc4X4P +8q0jEy2P9n5ASlwZ3XCS9hZgp8VRAcXWOYjzzNouQp3NEP9d5D3wN4aFKa/JW6pk +a6VwraEweuyJqvZ7nnam1emW0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eHZa95z4kX +xvHg+ylzRtKRfpSPzB2IVwgV9/rsOg0OmvwhV8+5IQpdcFr+hf2Bn6AVn6H9aX8A +JjycN6KMcHaFa0EUqagGm9tsQLmf/MGCj8sy9am1IbRmFCz5lB5A7P/YLPM2Csjg +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey2.pem b/build/test/key/idp/privkey2.pem new file mode 100644 index 00000000..333e0cc7 --- /dev/null +++ b/build/test/key/idp/privkey2.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEA0BvmmwHnlo8LDmbeUpHDXMP10iXI0sicpBGxFNooLhK0bjiM +gX4I9KdVFQb997i9ooHmCU9zkl5ko7zDvCr6rWDdrSQI6BY4IRq/DWyBGY2EuLpD +GVG8MXdm0cnA/TjCPYOOAFAdbH0NFMhcMxDrHlt5XFtRZ4XIswPE4CNBjeDaXVa7 +jZaYKFnT98PksobatK1nm2PIPxxha7hCp/FcG1G5TmXT+4zVV7HdWlDEnKbjGtJI +c81zwzfkNK8Je/XzuMnIUnigABEXT1wNVHw324fVu6XGAT9AAV3fdQX/WpKZZm21 +TiLDW7kSHFUu1ry8Aq+tdybifhLRg3FJK0qW7kbw1vOQ0ERwRrqCpXEhvoph0LR6 +kcDMDHPD+eISBAb2hVtEX8D383RTXvMAEbZryHl/OIsKuWHsteS8ta3aKYu7doO6 +shewvwfYGd7Sf4Dyqdja3QhhQXGoZfdy4+ellpiNIzR5+/u2N8eorCdyk0VyJYkq +wMIiu/+1HszpVs7NZPJhkFmUw9wBhirtXAVcLgvq4eMJC7A3h388Wr218VRKJPaf +9T9vDOBoh30tDzhNx5eEU90OgImFp5hWMmfrJmPe0oD8AeLUzWBYwuvvXfwZZTaE +G/MLD46qemQ59TnmOuvIafmQHBNdwBXYkwTFa3HRBAgjy8YNZBZOcGXR6xsCAwEA +AQKCAgBLkOYCgQWLuPMlzpqJ1t3ecFVxckDisO+X78iiLrkKScZ0g1oZpx8vX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me7qjp4 +CsdyFO6ZFLEeI8KGKiewGEv5YzvQIpVqoMZ6ucY/WiSvwHSvZuyLZVLHOLGcZRLJ +49jbfhsvrJqWVDC2CmX2oAuH3GF+LUFhkM36zD1d0FrpaZwL2acWErk/N0CNhnNp +H/08579O5MmSjlWh8Eco2wVD1z/A+LSC0YN+04ZrurB7wAebGCsOoEO7M53aan77 +gP2nLQ/cnYHiPrmUlL5s7EDhKnvpNY1W2ViEydwywvg9m4mxOA1sjrYpoNRg +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/keypass.txt b/build/test/key/keypass.txt new file mode 100644 index 00000000..992b010a --- /dev/null +++ b/build/test/key/keypass.txt @@ -0,0 +1,11 @@ +Private Key Phrase (SP) - signature +VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px + +Private Key Phrase (SP) - encryption +BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU + +Private Key Phrase (IDP) - signature +q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW + +Private Key Phrase (IDP) - encryption +g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN diff --git a/build/test/key/sp/cert.cer b/build/test/key/sp/cert.cer new file mode 100644 index 00000000..5975ac46 --- /dev/null +++ b/build/test/key/sp/cert.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQK +DApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNv +bTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhL +MRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2Rl +LXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZq +ClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPs +tBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15 +qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QB +o7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZ +ApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEA +AaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaA +FEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+ +uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1i +JmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq +2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uL +EpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNr +vk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= +-----END CERTIFICATE----- diff --git a/build/test/key/sp/encryptKey.pem b/build/test/key/sp/encryptKey.pem new file mode 100644 index 00000000..f6660ad6 --- /dev/null +++ b/build/test/key/sp/encryptKey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 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LMP5dpCPlUCOqxbZ0 +ykSuo0M7p/UPY34yi3AMHS9grvQQ1DykMPoqKKEheI6nUGcQ1AFcdr307ILWRsPO +T6gHOLXZaR4+UEeYfkTKsjrMUhozx7JIyuLgTXA9TWC+tZ9WZpbJ7i3bpQ+RNwX2 +AxQSwc9ZOcNxg8YCbGlJgJHnRVhA202kNT5ORplcRKqaOaO9LK7491gaaShjaspg +4THDnH+HHFORmbgwyO9P74wuw+n6tI40Ia3qzRLVz6sJBQMtLEN+cvNoNi3KYkNj +GJM1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS +5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4c +AUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5S +LvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBny +ISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/sp/encryptionCert.cer b/build/test/key/sp/encryptionCert.cer new file mode 100644 index 00000000..719fff80 --- /dev/null +++ b/build/test/key/sp/encryptionCert.cer @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID7TCCAtWgAwIBAgIJANSq1uUtXl4DMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFjAUBgNVBAoTDWV4cHJlc3Mtc2Ft +bDIxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWwwHhcNMTUxMDAzMDM0ODA2 +WhcNMTgxMDAyMDM0ODA2WjBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBL +b25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwN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IFICATE----- diff --git a/build/test/key/sp/knownGoodCert.cer b/build/test/key/sp/knownGoodCert.cer new file mode 100644 index 00000000..690818b6 --- /dev/null +++ b/build/test/key/sp/knownGoodCert.cer @@ -0,0 +1 @@ +MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/key/sp/knownGoodEncryptKey.pem b/build/test/key/sp/knownGoodEncryptKey.pem new file mode 100644 index 00000000..b45a5f0f --- /dev/null +++ b/build/test/key/sp/knownGoodEncryptKey.pem @@ -0,0 +1 @@ +Proc-Type:4,ENCRYPTEDDEK-Info:DES-EDE3-CBC,860FDB9F3BE14699bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRyQCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVlkkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW008OHTouRK33Aifx0A3MWxR0ILvw49E6urtbbIrskEzKzfWQug8gY1TJhI3sbsMsI1bS5Vg88TvilFFBGn0Yv6GEJjgOrsrKDGKtYGhuBfK4fd4rwnQKKvC6gTKeNXIfV7Qm1R20LUJXC8zv35pdKoVk+NdS/MGNXJRFgO3Kkp01aVf3n1oo2+AllS02AYyWt1svHecsRwbibXip8gSQsOtDdpqQrEDyqZlFHXEw/IcJE9vQWEJmpHD5GFhbKtttpE0B3ZtNl6YcyUz0rSf9zjuMx/wReWdRb6H2WoIqoRS7vAUONDRPt7wvfjtLlDRVibc2RTN8yce/57lGnA1n8bxPV5+9VxCJOEipV3io/nrj+uNO8i/0rUpkKdZy8wy2CRksoxq4TxwegONz1HQcJVpJu0iBdu7B+BXVjxQQScvMQlOTbua8k+YdaCeZAb83jJVX89/PFy+Xj7eGyzzBTqz7dV0Xkxq9mpiMYUCoyNL5Iq1jD9Xb5TzVW1Gbh8zCZYXjcZEQKeartaBC4/fRWyxqK3gJRX4SJkl4gYMQrPS2pbTzVCO+WLxSwIh3dOZpoeErXLSrylIv9cE2Xrs0McXAR+hfGrqgtILBWwgbh2NhmUiFfLwUTUxU51eu7QZ2TV1VFBX0QTmn2kM0JLSSC96mDUzbs6qfURUaXbuffF5cqdUjXgtzZj5SFEbIv4UFS0DAS+6i/jTGSz7aAp/uofOxhYkCqK/s2Cex2jQbDpcKXKiWzPdULOCjAh3fdCAp03ua3fdAI7H8PslSDiPFrcY78OxZaWXzazEiun77WKbzrMloLMP5dpCPlUCOqxbZ0ykSuo0M7p/UPY34yi3AMHS9grvQQ1DykMPoqKKEheI6nUGcQ1AFcdr307ILWRsPOT6gHOLXZaR4+UEeYfkTKsjrMUhozx7JIyuLgTXA9TWC+tZ9WZpbJ7i3bpQ+RNwX2AxQSwc9ZOcNxg8YCbGlJgJHnRVhA202kNT5ORplcRKqaOaO9LK7491gaaShjaspg4THDnH+HHFORmbgwyO9P74wuw+n6tI40Ia3qzRLVz6sJBQMtLEN+cvNoNi3KYkNjGJM1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4cAUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5SLvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBnyISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 diff --git a/build/test/key/sp/privkey.pem b/build/test/key/sp/privkey.pem new file mode 100644 index 00000000..c60dfcf1 --- /dev/null +++ b/build/test/key/sp/privkey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,9C86371F0420A091 + +77TqgiK/IYRgO5w3ZMyV81/gk0zN5wPTGWxoztNFjQKXCySFnrL30kUqlGituBxX +VgxwXbkoYMrd5MoDZKL5EJuf0H59hq92O0+3uwJA8QyZjOm4brQcjXKmIrkvihgs +FvpaJiGzp6kS/O7vFBDNTQWr9yY9Y3FBPcmOUWufpRp4Q5nhpSlqnMmIqZyWQUL/ +YJSJETtzJVsk38lCqIxxDT3LtbGySahj0jRuRqspAZQeLTpnJqzNMC4vnJew9luC +R+UffrX7gVsnwOhNtyRzYaMsLnbRfXT8Jqx2gRHg36GxkOVgyU7e62nk9CzeC0WA +kHHCNVqqivRx9/EC0mQkkRgRzo3BZWp0o671sUsGTy57JhktiGfTnWMrl7ZfhAza +SZnjyTwuI1bTQipIkNI3aJBTP/o/gNUE1sj5D5FZlFdpq5ks2Vxww3GNx1FRrvWd +98z5CNt78ZR0ihLmdz/EakEBKBUteQu/5zPLUlwmGuou4wPuEHG2BsjGzb/d5Zfc +ElIjUV+yrMmGHvBfPyPnDUrCUyLn18S1NZiCMCdN5PqCybjhk8oMPYZhWBqp8Ymr +yHIC7BCnTJhIvgQZR6M68NwVv0aBBgH/I/DB0jADo6/B5Eajwus9i6zSv8QIbqhw +fusKtI04vxc91aP0GWRr0J/O4mkxXYNPfa3a/I7sGTXGl0k0CygckE3fLXRy/WEk +ikZt4UHqg5ZQ8vc5NSAM5f5Yx/72CU1I6ehFtxHsyE5yndpZXWp2X2S4l31e8fLs +ddOoybroJgbyLrh7JT3Yac3XOEsKATWIvqU+hNYq6KwqLWev9jInHVgjzfyOKbmF +hkrzDDHaKULYZuTsUq5mLc1SzSu98lXYfXp1WE4XsH0X0VicPzf8ZH4Kutuig0VG +5Kg9HB/Cin65VMm0ffEiTraO6johIlwFGRrtAs38ONKgsPCQUv7ee9SEGOHViNZq +NpWPr1KOzbI4wEB1ueKoZuEQ0a+tzfJgszJrM48bM82J6iEjN/PSOTsdTKJq9e47 +dlUp+tqQsvGkbBOIOt5OOpkr8Z+8qbEd21ojF9Q0p0T4WMThRP6YBRKvt8mmFwRs +DjEhMiPa4L70Eqldfu2lWdI6ietfHrK97WXwQO1gF73LOnA+EdMXNxr1iLd0Tdke +z6fUSw3hKZL+I7nX6O40+KgkhXVSZOsRz5CEvo2iChIUrYGEGDl94K/ofqGu71Y+ +G8KBvbha6EC7xcUrTYP5Gek5wsrw7cGgDZJjMsyXYFBZjQO1N6g9fncLmc5pB5Ix +W3gLfQS/My4daWNTvrYOgfA08J4M4ZWd0v5TglxOSV78psG4J4slppDySNFB2d/3 +7JiwWVm5SMk0StLWwb2azmTvBoinnrZJzPnPlOytxvE5uGJ/i0WAik7C99YgVJkS +9hO3FJGasrOnHeiOvMZEdRuIVspKz9iMFx7hWHpVHTTyjwceEpaiEkhmqLM9QkKh +kCZqeWyVsKBIc0sse+CKNK8ik9eTeUlCklGMV1Q4kKjR6uuHUOLyjk/xhqslV4TS +jnnjCjsK5YzTa4hmbHhPZIW262KoFV9TqxYKkhP5ab7AXRSakrdrY2cwACWN4AMT +-----END RSA PRIVATE KEY----- diff --git a/build/test/misc/attack_response_signed.xml b/build/test/misc/attack_response_signed.xml new file mode 100644 index 00000000..1e05a9a6 --- /dev/null +++ b/build/test/misc/attack_response_signed.xml @@ -0,0 +1 @@ +evil@evil.comhttps://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/h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MAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/dumpes_issuer_response.xml b/build/test/misc/dumpes_issuer_response.xml new file mode 100644 index 00000000..5964bfaf --- /dev/null +++ b/build/test/misc/dumpes_issuer_response.xml @@ -0,0 +1,65 @@ + + + http://www.okta.com/dummyIssuer + + + + + + + + + + + + + Spr+5HzbZxSt8I3vCY4rTBu+glE= + + + + signatureValue + + + + stuff + + + + + + + + + http://www.okta.com/dummyIssuer + + email@email.com + + + + + + + + api.com + + + + + urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient + + + + + + + email@email.com + + + + + diff --git a/build/test/misc/failed_response.xml b/build/test/misc/failed_response.xml new file mode 100644 index 00000000..67b258cd --- /dev/null +++ b/build/test/misc/failed_response.xml @@ -0,0 +1 @@ +https://idp.example.com/metadata \ No newline at end of file diff --git a/build/test/misc/false_signed_request_sha1.xml b/build/test/misc/false_signed_request_sha1.xml new file mode 100644 index 00000000..c640fe36 --- /dev/null +++ b/build/test/misc/false_signed_request_sha1.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwA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KIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha256.xml b/build/test/misc/false_signed_request_sha256.xml new file mode 100644 index 00000000..e385bd29 --- /dev/null +++ b/build/test/misc/false_signed_request_sha256.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjY0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rYP2gwoUYmxU5WS/Cl1QEMlDj46fPpOjEBELGXdKW69zpAHa5jM/FtS8RCixhiMI1dmbL3+zgziEVdx5xrkaakqvpdDD601Eyn0gy1oO+VUmCMPFE6YjsPeFDhw5ZXf7MmJ/fXLeqWmH5Pn+mkyTCZWxi/L+2nG9iayZ41Z3wBl67XTdBL6rwHMcEY7oxwFSZtKTbtTOV6aW11KdAd9peLIsHeqoaMCY/VypS2bTr9FubQCbHhho2vbhX8cuUfpE21OefA7o1rA==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQ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nnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha512.xml b/build/test/misc/false_signed_request_sha512.xml new file mode 100644 index 00000000..3d690ab4 --- /dev/null +++ b/build/test/misc/false_signed_request_sha512.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPWQ6/2guvqw==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/idpmeta.xml b/build/test/misc/idpmeta.xml new file mode 100644 index 00000000..e81c9889 --- /dev/null +++ b/build/test/misc/idpmeta.xml @@ -0,0 +1,34 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxOD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DYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_nosign.xml b/build/test/misc/idpmeta_nosign.xml new file mode 100644 index 00000000..a30a4284 --- /dev/null +++ b/build/test/misc/idpmeta_nosign.xml @@ -0,0 +1,27 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_onelogoutservice.xml b/build/test/misc/idpmeta_onelogoutservice.xml new file mode 100644 index 00000000..c6d3af95 --- /dev/null +++ b/build/test/misc/idpmeta_onelogoutservice.xml @@ -0,0 +1,33 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslG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bdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + diff --git a/build/test/misc/idpmeta_rollingcert.xml b/build/test/misc/idpmeta_rollingcert.xml new file mode 100644 index 00000000..bf8da7dc --- /dev/null +++ b/build/test/misc/idpmeta_rollingcert.xml @@ -0,0 +1,39 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm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YJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL7dF1gUNu8en0fHMSbzf192uB8m2CTeHeEeYrmq5rau6t1WzaHwbSStd9tJ/11Arm8f8zfefFqEBA0EYbp/DMqHb9ZiLGgIff08679NOYeK/d9EAs5DzvTMTR6QqG7a4vH3jKOksIbjM35h5RVitVDxo+xWDKyvOpuNE64bJlWHOEiNxvwmcHfJ2hAd1EozaRLcJOojFHg51alUqiNIZ+vpkMAM8s3lUlcYETKqTpcnsE7c1QX60cCrFN4m3SNS98HGBEdotch8+2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_share_cert.xml b/build/test/misc/idpmeta_share_cert.xml new file mode 100644 index 00000000..33b0d5b3 --- /dev/null +++ b/build/test/misc/idpmeta_share_cert.xml @@ -0,0 +1,27 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/invalid_response.xml b/build/test/misc/invalid_response.xml new file mode 100644 index 00000000..7caf8d0b --- /dev/null +++ b/build/test/misc/invalid_response.xml @@ -0,0 +1,6 @@ + + https://idp.example.com/metadata + + + + diff --git a/build/test/misc/logout_request.xml b/build/test/misc/logout_request.xml new file mode 100644 index 00000000..db678cc7 --- /dev/null +++ b/build/test/misc/logout_request.xml @@ -0,0 +1,4 @@ + + http://sp.example.com/metadata + f92cc1834efc0f73e9c09f482fce80037a6251e7 + diff --git a/build/test/misc/multiple_entitydescriptor.xml b/build/test/misc/multiple_entitydescriptor.xml new file mode 100644 index 00000000..76659103 --- /dev/null +++ b/build/test/misc/multiple_entitydescriptor.xml @@ -0,0 +1,37 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKw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QYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + diff --git a/build/test/misc/request.xml b/build/test/misc/request.xml new file mode 100644 index 00000000..9bafb7d8 --- /dev/null +++ b/build/test/misc/request.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Password diff --git a/build/test/misc/response.xml b/build/test/misc/response.xml new file mode 100644 index 00000000..fd3436ae --- /dev/null +++ b/build/test/misc/response.xml @@ -0,0 +1 @@ +https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 diff --git a/build/test/misc/response_signed.xml b/build/test/misc/response_signed.xml new file mode 100644 index 00000000..ebaa1d16 --- /dev/null +++ b/build/test/misc/response_signed.xml @@ -0,0 +1 @@ +https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest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PovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/response_signed_cert1.xml b/build/test/misc/response_signed_cert1.xml new file mode 100644 index 00000000..e5790248 --- /dev/null +++ b/build/test/misc/response_signed_cert1.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=GZSDF9T0TMTe5nkZspOBlc6+j+lon0eHjViy765ty0tM7F47qgDVWTiC2x326Iz8One12XKKbUHxMvqABnI77aNSJ0/BADFJLoH+mgPuSsgcZygTAWmKdn1bR/3zydMtkMIbP9JXB2VEF7a7KnnnjGcM2OXmdxanhe5J2vtrBWCrxt0QZOLaEsxQmCHosKizVhOnO5JehNqqkf9M4yp7acIsIVhCg21YYqnuAWMsve8qReryF31189TdsV9KO8uB0rufBsxl/dzNnMG74Rgq4mS3QjPI7N/WpXzZZk8vPe38FYEsFA5lmeIsdMxnlbbUEPJFwzWM72xEm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6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/response_signed_cert2.xml b/build/test/misc/response_signed_cert2.xml new file mode 100644 index 00000000..1686dab3 --- /dev/null +++ b/build/test/misc/response_signed_cert2.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=JgrKOwRaj4swHYgLra3MOG92BeekCyRgbDfxAk5KLmzeRk1u0w6AmB/qW32mrlM4bn8LtwTq33PiHk6NMbkOfg5X2jQ8vjRyog+tgxDmwdiVkMMHfTWHcOqI5Gou572GayDLC0M9rOv4iHXUoDaul4ozhkeRolS9peLxydulSLzyXJiMGQ9ChnmxsR1P7y1rU/DOJ4O/zWzY2M9GoKBXWwG5C9RuoiO7FfOQn4za7InoQ+pBAtGWeh3mXwKLYpd+dhWL73vLa2sr5OmOQUlnFDSuFoAzhnT9eJEJCcedfmtjTUi724iAcYtFeXYahcCe/n4H2JjQYhE0ovG4JpEaThRA/sM3C6h3j7t9b+fX86VhH71+0f79VuX9TNeQkSiuYxqbUYvJjNgx3z8W7ixv5WGpHCjq6zd5KKbIwGk2+bWp7xs6ZD8sh9uyqWHNX/7YE096Ovxn4ki9O370MnK/3henA3m/+lwwWaL3Bn6+TmYC5DOWM7WVhy+dokSW6/2ZhgzoehpbDVZfYkKP+SH1w2PEqwtyB60fJpcTHZFANbCzfLJuyuRjiaWl9lzc3s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smY97SgPwB4tTNYFjC6+9d/BllNoQb8wsPjqp6ZDn1OeY668hp+ZAcE13AFdiTBMVrcdEECCPLxg1kFk5wZdHrGwIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQCyA/14hKTqfdeOVl+MQ2SLPWi7pC/t/Zv4kc361xP26FAVSSrxgXq9kVLZeJIAqCwjGHkl/DTUlA8hfLfuZx5z+NI/qIodsXAjCzsCe7paEbjvR6OQjYkR0UY4u/AOO7x2op2KDFKNuWT9KZNm8bh1mxwNKep1fJP2O5M0nMYAGYbPsLAOn7mzZyufQl8hsJwIV2s8sbft7s8vmEYZbuueQDOJCMTt+eC08LONrovYChyYmj3i5RIk8kcaodeSDo811F1B1gDvO/dmVxgrHEgoai7X6LUoiAiLkigP7udNEZxbXsRlOhBRv9w+rRXFurVFlUPkQ9UF+QB0BoyIcUxo+fZ8vCA4xEVBenVBadpFbwum6+XeTkvDoRc4sSCpm8v2qtprc8aU/0F82EzxSybYvstc5lDv7wuwCwNwfoAQ+/16kTpJvoYbOXUPv5yCA3mIuqYeA1woaWPXsE4jNOzTqv1qOZQTvXProEgK5B0FR5ILc4mfNrD2p9VGbiYf2GjCfeEzDFg174dvSn2MMp1yK5pvZEp7yFE8z1eduYN6W/7qdtss9BGpnyS5X7LuYfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwvICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA==https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_request_sha1.xml b/build/test/misc/signed_request_sha1.xml new file mode 100644 index 00000000..7df1a59f --- /dev/null +++ b/build/test/misc/signed_request_sha1.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqT1ok8LXPuq1A== diff --git a/build/test/misc/signed_request_sha256.xml b/build/test/misc/signed_request_sha256.xml new file mode 100644 index 00000000..675b732a --- /dev/null +++ b/build/test/misc/signed_request_sha256.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjCY0hdmiULo0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rYP2gwoUYmxU5WS/Cl1QEMlDj46fPpOjEBELGXdKW69zpAHa5jM/FtS8RCixhiMI1dmbL3+zgziEVdx5xrkaakqvpdDD601Eyn0gy1oO+VUmCMPFE6YjsPeFDhw5ZXf7MmJ/fXLeqWmH5Pn+mkyTCZWxi/L+2nG9iayZ41Z3wBl67XTdBL6rwHMcEY7oxwFSZtKTbtTOV6aW11KdAd9peLIsHeqoaMCY/VypS2bTr9FubQCbHhho2vbhX8cuUfpE21OefA7o1rA==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsL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sha512.xml b/build/test/misc/signed_request_sha512.xml new file mode 100644 index 00000000..49800cb2 --- /dev/null +++ b/build/test/misc/signed_request_sha512.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEUmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPWQ6/2guvqw==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_response_sha1.xml b/build/test/misc/signed_response_sha1.xml new file mode 100644 index 00000000..120a657d --- /dev/null +++ b/build/test/misc/signed_response_sha1.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataCocGj4j5psQ0OfZ1mOlAdQkfwjTqCb95tNqpiFtt6qhTlnn+1IIp9pDpMLubomf9LWwX176PPLWFYxsRmqyEBYlhT53hgAF+z2fEgJdlxXF7FYKsnsn+ujC0ZJP3QkUlWGT9eo74i67JrkAwmiOXPHBJAAN040L/uqmYgjqdnGIFZAyTk4SwplECf1yzVxh4wkETpkf1na1VgTpFC3QDHpXVmCdTbq4FgtgNyfcZmr10d81rmSLjwfHJswV8Qg+cuxXODcn0rxDA5ZA3abpIxGwHUM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Gef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha256.xml b/build/test/misc/signed_response_sha256.xml new file mode 100644 index 00000000..928dcc90 --- /dev/null +++ b/build/test/misc/signed_response_sha256.xml @@ -0,0 +1 @@ +https://idp.example.com/metadata0TJreH5fvSPwTL8cMGtvYkc8mDQDirHL/0KAU0PPjWXKUqyWSVi7FtDhnAuUakJpfPaYowrHBaUkX+SoJC9uQjXNCgvx5Z7DJfNq+h/vFxoSoxMT/1qeKMKWoNQFVmUErIPMCl0Wou/MfDR8qd+0ofUyLF4pEglczqNBVGi23RirDMZGSgS9M6QDlgpTx/CDnWRL6+0T1lNrTLuX6n0VaEziUeHOHY0lK5T0hmT/tVlufZ7LRO10FN7MUrxzIZvIIWVNuPVOmn0hm/4Z33JEK7rT35+MZLq8f7fbA3SS4+4InJOvZZgBRR9BcPjeEXG1n1el7uyf2AfE9+gr3vu6eg==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha512.xml b/build/test/misc/signed_response_sha512.xml new file mode 100644 index 00000000..8f268a99 --- /dev/null +++ b/build/test/misc/signed_response_sha512.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataRkgzPlU7snHmrHTA6tCt0DRqQFyQeNypGIFzaY+2/6OLsNNH0B4gdBWYUWrwMpOGNqHr9Wo+th248ABVoUBtbdQ2pT8M49D0JDGwvl6L8CscTK0xzLGaqaAhHwszmk61WGVOxrbkiZQqOQA8VDiua5bDoXOqiCqEIB6TlSuJ+HH4Lc6u10WSXChI5iC9YwsHoWS8tqFLw6rsx4qPx4hFkZfBUh6JFZNT8hsWiSr4y6d359SIkRgkPUd85+I/3Od//al4HLnIjXaDsahO/YZ9AlvOnBxjUEuk/7kuxZ91LDeI6I8ekno83+ndhk34tnaBc3l1uGeHNhJhpY3eK+LiCw==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/sp_metadata_98.xml b/build/test/misc/sp_metadata_98.xml new file mode 100644 index 00000000..40814588 --- /dev/null +++ b/build/test/misc/sp_metadata_98.xml @@ -0,0 +1,6 @@ + + + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + + + \ No newline at end of file diff --git a/build/test/misc/spmeta.xml b/build/test/misc/spmeta.xml new file mode 100644 index 00000000..81068842 --- /dev/null +++ b/build/test/misc/spmeta.xml @@ -0,0 +1,27 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgx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ggkA1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + + + diff --git a/build/test/misc/spmeta_noassertsign.xml b/build/test/misc/spmeta_noassertsign.xml new file mode 100644 index 00000000..984917ed --- /dev/null +++ b/build/test/misc/spmeta_noassertsign.xml @@ -0,0 +1,32 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjm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git a/build/test/misc/spmeta_noauthnsign.xml b/build/test/misc/spmeta_noauthnsign.xml new file mode 100644 index 00000000..0fc8d2c6 --- /dev/null +++ b/build/test/misc/spmeta_noauthnsign.xml @@ -0,0 +1,25 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + From e5a44c6d1f79cfc4a6d423c3bad7df1d532af351 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:32:44 +0400 Subject: [PATCH 15/26] 2.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7551133d..de9449ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.5", + "version": "2.7.6", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 400952b56b24eaa0404c01976360be21b4cd660f Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:44:10 +0400 Subject: [PATCH 16/26] chore: update --- .npmignore | 1 - LICENSE | 2 +- README.md | 4 ++++ build/{src => }/api.d.ts | 0 build/{src => }/api.js | 0 build/api.js.map | 1 + build/{src => }/binding-post.d.ts | 0 build/{src => }/binding-post.js | 0 build/binding-post.js.map | 1 + build/{src => }/binding-redirect.d.ts | 0 build/{src => }/binding-redirect.js | 0 build/binding-redirect.js.map | 1 + build/{src => }/entity-idp.d.ts | 0 build/{src => }/entity-idp.js | 0 build/entity-idp.js.map | 1 + build/{src => }/entity-sp.d.ts | 0 build/{src => }/entity-sp.js | 0 build/entity-sp.js.map | 1 + build/{src => }/entity.d.ts | 0 build/{src => }/entity.js | 0 build/entity.js.map | 1 + build/{src => }/extractor.d.ts | 0 build/{src => }/extractor.js | 0 build/extractor.js.map | 1 + build/{src => }/flow.d.ts | 0 build/{src => }/flow.js | 0 build/flow.js.map | 1 + build/index.d.ts | 18 +++++++++--------- build/index.js | 18 +++++++++--------- build/index.js.map | 2 +- build/{src => }/libsaml.d.ts | 0 build/{src => }/libsaml.js | 0 build/libsaml.js.map | 1 + build/{src => }/metadata-idp.d.ts | 0 build/{src => }/metadata-idp.js | 0 build/metadata-idp.js.map | 1 + build/{src => }/metadata-sp.d.ts | 0 build/{src => }/metadata-sp.js | 0 build/metadata-sp.js.map | 1 + build/{src => }/metadata.d.ts | 0 build/{src => }/metadata.js | 0 build/metadata.js.map | 1 + build/src/api.js.map | 1 - build/src/binding-post.js.map | 1 - build/src/binding-redirect.js.map | 1 - build/src/entity-idp.js.map | 1 - build/src/entity-sp.js.map | 1 - build/src/entity.js.map | 1 - build/src/extractor.js.map | 1 - build/src/flow.js.map | 1 - build/src/libsaml.js.map | 1 - build/src/metadata-idp.js.map | 1 - build/src/metadata-sp.js.map | 1 - build/src/metadata.js.map | 1 - build/src/types.js.map | 1 - build/src/urn.js.map | 1 - build/src/utility.js.map | 1 - build/src/validator.js.map | 1 - build/{src => }/types.d.ts | 0 build/{src => }/types.js | 0 build/types.js.map | 1 + build/{src => }/urn.d.ts | 0 build/{src => }/urn.js | 0 build/urn.js.map | 1 + build/{src => }/utility.d.ts | 0 build/{src => }/utility.js | 0 build/utility.js.map | 1 + build/{src => }/validator.d.ts | 0 build/{src => }/validator.js | 0 build/validator.js.map | 1 + package.json | 4 ++-- index.ts => src/index.ts | 18 +++++++++--------- src/types.d.ts | 2 ++ test/extractor.ts | 2 +- test/flow.ts | 2 +- test/index.ts | 2 +- test/issues.ts | 2 +- types.d.ts | 2 -- 78 files changed, 57 insertions(+), 54 deletions(-) rename build/{src => }/api.d.ts (100%) rename build/{src => }/api.js (100%) create mode 100644 build/api.js.map rename build/{src => }/binding-post.d.ts (100%) rename build/{src => }/binding-post.js (100%) create mode 100644 build/binding-post.js.map rename build/{src => }/binding-redirect.d.ts (100%) rename build/{src => }/binding-redirect.js (100%) create mode 100644 build/binding-redirect.js.map rename build/{src => }/entity-idp.d.ts (100%) rename build/{src => }/entity-idp.js (100%) create mode 100644 build/entity-idp.js.map rename build/{src => }/entity-sp.d.ts (100%) rename build/{src => }/entity-sp.js (100%) create mode 100644 build/entity-sp.js.map rename build/{src => }/entity.d.ts (100%) rename build/{src => }/entity.js (100%) create mode 100644 build/entity.js.map rename build/{src => }/extractor.d.ts (100%) rename build/{src => }/extractor.js (100%) create mode 100644 build/extractor.js.map rename build/{src => }/flow.d.ts (100%) rename build/{src => }/flow.js (100%) create mode 100644 build/flow.js.map rename build/{src => }/libsaml.d.ts (100%) rename build/{src => }/libsaml.js (100%) create mode 100644 build/libsaml.js.map rename build/{src => }/metadata-idp.d.ts (100%) rename build/{src => }/metadata-idp.js (100%) create mode 100644 build/metadata-idp.js.map rename build/{src => }/metadata-sp.d.ts (100%) rename build/{src => }/metadata-sp.js (100%) create mode 100644 build/metadata-sp.js.map rename build/{src => }/metadata.d.ts (100%) rename build/{src => }/metadata.js (100%) create mode 100644 build/metadata.js.map delete mode 100644 build/src/api.js.map delete mode 100644 build/src/binding-post.js.map delete mode 100644 build/src/binding-redirect.js.map delete mode 100644 build/src/entity-idp.js.map delete mode 100644 build/src/entity-sp.js.map delete mode 100644 build/src/entity.js.map delete mode 100644 build/src/extractor.js.map delete mode 100644 build/src/flow.js.map delete mode 100644 build/src/libsaml.js.map delete mode 100644 build/src/metadata-idp.js.map delete mode 100644 build/src/metadata-sp.js.map delete mode 100644 build/src/metadata.js.map delete mode 100644 build/src/types.js.map delete mode 100644 build/src/urn.js.map delete mode 100644 build/src/utility.js.map delete mode 100644 build/src/validator.js.map rename build/{src => }/types.d.ts (100%) rename build/{src => }/types.js (100%) create mode 100644 build/types.js.map rename build/{src => }/urn.d.ts (100%) rename build/{src => }/urn.js (100%) create mode 100644 build/urn.js.map rename build/{src => }/utility.d.ts (100%) rename build/{src => }/utility.js (100%) create mode 100644 build/utility.js.map rename build/{src => }/validator.d.ts (100%) rename build/{src => }/validator.js (100%) create mode 100644 build/validator.js.map rename index.ts => src/index.ts (54%) create mode 100644 src/types.d.ts delete mode 100644 types.d.ts diff --git a/.npmignore b/.npmignore index ac702bbe..2578d030 100644 --- a/.npmignore +++ b/.npmignore @@ -10,4 +10,3 @@ yarn* .idea .travis.yml .github -!build diff --git a/LICENSE b/LICENSE index c5582ae7..1ab7bcae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-present Tony Ngan +Copyright (c) 2020-present Meabed Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 43f98074..97e73f49 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ [![Coverage Status](https://img.shields.io/coveralls/tngan/samlify/master.svg)](https://coveralls.io/github/tngan/samlify?branch=master) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/samlify) +----- +## Fork with typescript fixes, packages upgrade and faster bug fixes. +----- + Highly configuarable Node.js SAML 2.0 library for Single Sign On ## Welcome PRs diff --git a/build/src/api.d.ts b/build/api.d.ts similarity index 100% rename from build/src/api.d.ts rename to build/api.d.ts diff --git a/build/src/api.js b/build/api.js similarity index 100% rename from build/src/api.js rename to build/api.js diff --git a/build/api.js.map b/build/api.js.map new file mode 100644 index 00000000..1409971e --- /dev/null +++ b/build/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;AAOA,IAAM,OAAO,GAAY;IACvB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAFD,gCAEC;AAED,SAAgB,kBAAkB,CAAC,MAAwB;IACzD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE;QACzC,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;KACH;IAED,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACrC,CAAC;AATD,gDASC"} \ No newline at end of file diff --git a/build/src/binding-post.d.ts b/build/binding-post.d.ts similarity index 100% rename from build/src/binding-post.d.ts rename to build/binding-post.d.ts diff --git a/build/src/binding-post.js b/build/binding-post.js similarity index 100% rename from build/src/binding-post.js rename to build/binding-post.js diff --git a/build/binding-post.js.map b/build/binding-post.js.map new file mode 100644 index 00000000..f8a42831 --- /dev/null +++ b/build/binding-post.js.map @@ -0,0 +1 @@ +{"version":3,"file":"binding-post.js","sourceRoot":"","sources":["../src/binding-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6BAA4C;AAE5C,qCAAgC;AAChC,qCAAyC;AAEzC,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAEhC;;;;;GAKG;AACH,SAAS,kBAAkB,CACzB,iBAAyB,EACzB,MAAW,EACX,oBAA2D;IAE3D,IAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IAC1E,IAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC;IAC1C,IAAI,EAAE,GAAW,EAAE,CAAC;IAEpB,IAAI,QAAQ,IAAI,QAAQ,CAAC,GAAG,IAAI,QAAQ,CAAC,EAAE,EAAE;QAC3C,IAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,cAAc,SAAQ,CAAC;QAC3B,IA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D,CAAC;YACF,eAAe,GAAG,iBAAO,CAAC,kBAAkB,CAC1C,iBAAO,CAAC,6BAA6B,CAAC,OAAO,EAC7C,MAAM,CACP,CAAC;SACH;QACD,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,wBAAwB,EAAE;YAEtD,IAAA,UAAU,GAIR,WAAW,WAJH,EACV,cAAc,GAGZ,WAAW,eAHC,EACa,kBAAkB,GAE3C,WAAW,0BAFgC,EAC7C,wBAAwB,GACtB,WAAW,yBADW,CACV;YAChB,OAAO;gBACL,EAAE,IAAA;gBACF,OAAO,EAAE,iBAAO,CAAC,sBAAsB,CAAC;oBACtC,eAAe,EAAE,IAAI;oBACrB,wBAAwB,EAAE,wBAAwB;oBAClD,UAAU,YAAA;oBACV,cAAc,gBAAA;oBACd,kBAAkB,oBAAA;oBAClB,cAAc,EAAE,eAAe;oBAC/B,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;oBACxD,eAAe,EAAE;wBACf,MAAM,EAAE,IAAI;wBACZ,QAAQ,EAAE;4BACR,SAAS,EACP,8DAA8D;4BAChE,MAAM,EAAE,OAAO;yBAChB;qBACF;iBACF,CAAC;aACH,CAAC;SACH;QACD,OAAO;YACL,EAAE,IAAA;YACF,OAAO,EAAE,iBAAO,CAAC,YAAY,CAAC,eAAe,CAAC;SAC/C,CAAC;KACH;IACD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACxE,CAAC;AAED,IAAM,WAAW,GAAG;IAClB,kBAAkB,oBAAA;IAClB,mBAAmB,qBAAA;IACnB,mBAAmB,qBAAA;IACnB,oBAAoB,sBAAA;CACrB,CAAC;AAEF,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/build/src/binding-redirect.d.ts b/build/binding-redirect.d.ts similarity index 100% rename from build/src/binding-redirect.d.ts rename to build/binding-redirect.d.ts diff --git a/build/src/binding-redirect.js b/build/binding-redirect.js similarity index 100% rename from build/src/binding-redirect.js rename to build/binding-redirect.js diff --git a/build/binding-redirect.js.map b/build/binding-redirect.js.map new file mode 100644 index 00000000..cb67dcba --- /dev/null +++ b/build/binding-redirect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"binding-redirect.js","sourceRoot":"","sources":["../src/binding-redirect.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,qCAAyC;AACzC,qCAAgC;AAIhC,yBAA2B;AAC3B,6BAA2C;AAE3C,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAChC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AAWpC;;;;;;;GAOG;AACH,SAAS,MAAM,CAAC,KAAa,EAAE,KAAa,EAAE,KAAe;IAC3D,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;AAC5D,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,IAAyB;IACzC,IAAA,OAAO,GAA6C,IAAI,QAAjD,EAAE,IAAI,GAAuC,IAAI,KAA3C,EAAE,QAAQ,GAA6B,IAAI,SAAjC,EAAE,OAAO,GAAoB,IAAI,QAAxB,EAAE,aAAa,GAAK,IAAI,cAAT,CAAU;IAC3D,IAAA,KAAoB,IAAI,WAAT,EAAf,UAAU,mBAAG,EAAE,KAAA,CAAU;IAC/B,IAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IAC/D,IAAM,UAAU,GAAG,iBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACrD,8EAA8E;IAC9E,IAAM,WAAW,GAAG,kBAAkB,CACpC,iBAAO,CAAC,YAAY,CAAC,iBAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CACrD,CAAC;IACF,IAAI,UA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,CAAC;AAC5E,CAAC;AAED,IAAM,eAAe,GAAG;IACtB,uBAAuB,yBAAA;IACvB,wBAAwB,0BAAA;IACxB,yBAAyB,2BAAA;CAC1B,CAAC;AAEF,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/build/src/entity-idp.d.ts b/build/entity-idp.d.ts similarity index 100% rename from build/src/entity-idp.d.ts rename to build/entity-idp.d.ts diff --git a/build/src/entity-idp.js b/build/entity-idp.js similarity index 100% rename from build/src/entity-idp.js rename to build/entity-idp.js diff --git a/build/entity-idp.js.map b/build/entity-idp.js.map new file mode 100644 index 00000000..9e72f437 --- /dev/null +++ b/build/entity-idp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity-idp.js","sourceRoot":"","sources":["../src/entity-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAAoE;AAOpE,qCAAgC;AAChC,6BAAkC;AAClC,+CAAyC;AACzC,+BAA8B;AAC9B,qCAAqC;AAErC;;GAEG;AACH,mBAAyB,KAA+B;IACtD,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAFD,4BAEC;AAED;;GAEG;AACH;IAAsC,oCAAM;IAG1C,0BAAY,UAAoC;QAAhD,iBA+BC;QA9BC,IAAM,uBAAuB,GAAG;YAC9B,uBAAuB,EAAE,KAAK;YAC9B,SAAS,EAAE;gBACT,kBAAkB,EAAE,MAAM;aAC3B;SACF,CAAC;QACF,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;QACzE,uBAAuB;QACvB,IAAI,UAAU,CAAC,qBAAqB,EAAE;YACpC,IACE,kBAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,OAAO,CAAC;gBAClD,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC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ACV,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,yBAAyB,EAAE;YAC3D,UAAU,EAAE,aAAa;YACzB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,GAAG;SACb,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAnGD,CAAsC,gBAAM,GAmG3C;AAnGY,4CAAgB"} \ No newline at end of file diff --git a/build/src/entity-sp.d.ts b/build/entity-sp.d.ts similarity index 100% rename from build/src/entity-sp.d.ts rename to build/entity-sp.d.ts diff --git a/build/src/entity-sp.js b/build/entity-sp.js similarity index 100% rename from build/src/entity-sp.js rename to build/entity-sp.js diff --git a/build/entity-sp.js.map b/build/entity-sp.js.map new file mode 100644 index 00000000..92be1f4f --- /dev/null +++ b/build/entity-sp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity-sp.js","sourceRoot":"","sources":["../src/entity-sp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAIkB;AAMlB,6BAAkC;AAClC,uDAAiD;AACjD,+CAAyC;AACzC,+BAA8B;AAE9B;;GAEG;AACH,mBAAyB,KAA8B;IACrD,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAFD,4BAEC;AAED;;;;GAIG;AACH;IAAqC,mCAAM;IAGzC;;;OAGG;IACH,yBAAY,SAAkC;QAA9C,iBAUC;QATC,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC;YACE,mBAAmB,EAAE,KAAK;YAC1B,oBAAoB,EAAE,KAAK;YAC3B,iBAAiB,EAAE,KAAK;SACzB,EACD,SAAS,CACV,CAAC;QACF,QAAA,kBAAM,aAAa,EAAE,IAAI,CAAC,SAAC;;IAC7B,CAAC;IAED;;;;;OAKG;IACI,4CAAkB,GAAzB,UACE,GAAqB,EACrB,OAAoB,EACpB,oBAA2D;QAD3D,wBAAA,EAAA,oBAAoB;QAGpB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AM,GAmF1C;AAnFY,0CAAe"} \ No newline at end of file diff --git a/build/src/entity.d.ts b/build/entity.d.ts similarity index 100% rename from build/src/entity.d.ts rename to build/entity.d.ts diff --git a/build/src/entity.js b/build/entity.js similarity index 100% rename from build/src/entity.js rename to build/entity.js diff --git a/build/entity.js.map b/build/entity.js.map new file mode 100644 index 00000000..787da241 --- /dev/null +++ b/build/entity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entity.js","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;GAIG;AACH,qCAAsD;AACtD,6BAA8E;AAC9E,6BAAoC;AACpC,+CAEwB;AACxB,6CAAgF;AAChF,uDAAiD;AACjD,+CAAyC;AAMzC,+BAA8B;AAE9B,IAAM,uBAAuB,GAAG,gBAAU,CAAC,UAAU,CAAC,IAAI,CAAC;AAC3D,IAAM,sBAAsB,GAAG,gBAAU,CAAC,UAAU,CAAC,GAAG,CAAC;AACzD,IAAM,mBAAmB,GAAG,gBAAU,CAAC,SAAS,CAAC;AACjD,IAAM,oBAAoB,GAAG,2BAAqB,CAAC,YAAY,CAAC;AAEhE,IAAM,oBAAoB,GAAG;IAC3B,wBAAwB,EAAE,KAAK;IAC/B,mBAAmB,EAAE,oBAAoB,CAAC,iBAAiB;IAC3D,uBAAuB,EAAE,KAAK;IAC9B,WAAW,EAAE,KAAK;IAClB,oBAAoB,EAAE,KAAK;IAC3B,yBAAyB,EAAE,mBAAmB,CAAC,UAAU;IACzD,uBAAuB,EAAE,uBAAuB,CAAC,OAAO;IACxD,sBAAsB,EAAE,sBAAsB,CAAC,OAAO;IACtD,UAAU,EAAE,cAAc,OAAA,GAAG,GAAG,SAAM,EAAE,EAAd,CAAc;IACxC,UAAU,EAAE,EAAE;CACf,CAAC;AA8BF;IAKE;;;OAGG;IACH,gBAAY,aAAgC,EAAE,UAAwB;QACpE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBA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AM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,gBAAgB;YAC5B,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,wBAAwB;YAC3D,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AAlND,IAkNC"} \ No newline at end of file diff --git a/build/src/extractor.d.ts b/build/extractor.d.ts similarity index 100% rename from build/src/extractor.d.ts rename to build/extractor.d.ts diff --git a/build/src/extractor.js b/build/extractor.js similarity index 100% rename from build/src/extractor.js rename to build/extractor.js diff --git a/build/extractor.js.map b/build/extractor.js.map new file mode 100644 index 00000000..8e85e6da --- /dev/null +++ b/build/extractor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,+BAA8C;AAC9C,qCAA4D;AAC5D,uCAAkC;AAElC,IAAM,GAAG,GAAG,kBAAS,CAAC;AAatB,SAAS,kBAAkB,CAAC,KAAK;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,UAAC,WAAW,EAAE,IAAI;QACpC,IAAI,YAAY,GAAG,WAAW,CAAC;QAC/B,IAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,UAAU,EAAE;YACd,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACvC,YAAY,GAAG,WAAW,IAAG,gCAA8B,QAAQ,QAAK,CAAA,CAAC;SAC1E;QACD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,GAAG,WAAW,IAAG,uBAAqB,IAAI,OAAI,CAAA,CAAC;SAC5D;QACD,OAAO,YAAY,CAAC;I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YACjD,IAAM,eAAe,GAAG,cAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,GAAG,CACrD,UAAC,CAAO,IAAK,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CACrB,CAAC;YACF,6BACK,MAAM,gBACR,GAAG,IAAG,eAAe,CAAC,CAAC,CAAC,OACzB;SACH;QACD,uBAAuB;QACvB;;;;;;UAME;QACF,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,IAAI,cAAc,GAA+C,IAAI,CAAC;YACtE,IAAM,IAAI,GAAG,cAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBACrB,IAAM,QAAQ,GAAG,YAAU,SAAS,GAAG,cAAc,MAAG,CAAC;gBACzD,cAAc,GAAG,cAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aAC9C;YACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;gBACnB,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,CAAO,IAAK,OAAA,CAAC,CAAC,UAAW,CAAC,SAAS,EAAvB,CAAuB,CAAC,CAAC;aACjE;YACD,6BACK,MAAM,gBACR,GAAG,IAAG,cAAc,OACrB;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA/MD,0BA+MC"} \ No newline at end of file diff --git a/build/src/flow.d.ts b/build/flow.d.ts similarity index 100% rename from build/src/flow.d.ts rename to build/flow.d.ts diff --git a/build/src/flow.js b/build/flow.js similarity index 100% rename from build/src/flow.js rename to build/flow.js diff --git a/build/flow.js.map b/build/flow.js.map new file mode 100644 index 00000000..b2983f39 --- /dev/null +++ b/build/flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flow.js","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 100644 --- a/build/index.d.ts +++ b/build/index.d.ts @@ -1,10 +1,10 @@ -import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from "./src/entity-idp"; -import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from "./src/entity-sp"; -export { default as IdPMetadata } from "./src/metadata-idp"; -export { default as SPMetadata } from "./src/metadata-sp"; -export { default as Utility } from "./src/utility"; -export { default as SamlLib } from "./src/libsaml"; -import * as Constants from "./src/urn"; -import * as Extractor from "./src/extractor"; -import { setSchemaValidator } from "./src/api"; +import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from "./entity-idp"; +import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from "./entity-sp"; +export { default as IdPMetadata } from "./metadata-idp"; +export { default as SPMetadata } from "./metadata-sp"; +export { default as Utility } from "./utility"; +export { default as SamlLib } from "./libsaml"; +import * as Constants from "./urn"; +import * as Extractor from "./extractor"; +import { setSchemaValidator } from "./api"; export { Constants, Extractor, IdentityProvider, IdentityProviderInstance, ServiceProvider, ServiceProviderInstance, setSchemaValidator, }; diff --git a/build/index.js b/build/index.js index 4e1c523a..4dbfb6f0 100644 --- a/build/index.js +++ b/build/index.js @@ -2,27 +2,27 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.setSchemaValidator = exports.ServiceProviderInstance = exports.ServiceProvider = exports.IdentityProviderInstance = exports.IdentityProvider = exports.Extractor = exports.Constants = void 0; // version <= 1.25 -var entity_idp_1 = require("./src/entity-idp"); +var entity_idp_1 = require("./entity-idp"); exports.IdentityProvider = entity_idp_1.default; Object.defineProperty(exports, "IdentityProviderInstance", { enumerable: true, get: function () { return entity_idp_1.IdentityProvider; } }); -var entity_sp_1 = require("./src/entity-sp"); +var entity_sp_1 = require("./entity-sp"); exports.ServiceProvider = entity_sp_1.default; Object.defineProperty(exports, "ServiceProviderInstance", { enumerable: true, get: function () { return entity_sp_1.ServiceProvider; } }); -var metadata_idp_1 = require("./src/metadata-idp"); +var metadata_idp_1 = require("./metadata-idp"); Object.defineProperty(exports, "IdPMetadata", { enumerable: true, get: function () { return metadata_idp_1.default; } }); -var metadata_sp_1 = require("./src/metadata-sp"); +var metadata_sp_1 = require("./metadata-sp"); Object.defineProperty(exports, "SPMetadata", { enumerable: true, get: function () { return metadata_sp_1.default; } }); -var utility_1 = require("./src/utility"); +var utility_1 = require("./utility"); Object.defineProperty(exports, "Utility", { enumerable: true, get: function () { return utility_1.default; } }); -var libsaml_1 = require("./src/libsaml"); +var libsaml_1 = require("./libsaml"); Object.defineProperty(exports, "SamlLib", { enumerable: true, get: function () { return libsaml_1.default; } }); // roadmap // new name convention in version >= 3.0 -var Constants = require("./src/urn"); +var Constants = require("./urn"); exports.Constants = Constants; -var Extractor = require("./src/extractor"); +var Extractor = require("./extractor"); exports.Extractor = Extractor; // exposed methods for customising samlify -var api_1 = require("./src/api"); +var api_1 = require("./api"); Object.defineProperty(exports, "setSchemaValidator", { enumerable: true, get: function () { return api_1.setSchemaValidator; } }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map index 57831e95..6510bf1e 100644 --- a/build/index.js.map +++ b/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,+CAE0B;AAqBxB,2BAvBK,oBAAgB,CAuBL;AAChB,yGAvBoB,6BAAwB,OAuBpB;AArB1B,6CAEyB;AAoBvB,0BAtBK,mBAAe,CAsBL;AACf,wGAtBmB,2BAAuB,OAsBnB;AAnBzB,mDAA4D;AAAnD,2GAAA,OAAO,OAAe;AAC/B,iDAA0D;AAAjD,yGAAA,OAAO,OAAc;AAC9B,yCAAmD;AAA1C,kGAAA,OAAO,OAAW;AAC3B,yCAAmD;AAA1C,kGAAA,OAAO,OAAW;AAC3B,UAAU;AACV,wCAAwC;AACxC,qCAAuC;AAOrC,8BAAS;AANX,2CAA6C;AAO3C,8BAAS;AALX,0CAA0C;AAC1C,iCAA+C;AAW7C,mGAXO,wBAAkB,OAWP"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,2CAEsB;AAqBpB,2BAvBK,oBAAgB,CAuBL;AAChB,yGAvBoB,6BAAwB,OAuBpB;AArB1B,yCAEqB;AAoBnB,0BAtBK,mBAAe,CAsBL;AACf,wGAtBmB,2BAAuB,OAsBnB;AAnBzB,+CAAwD;AAA/C,2GAAA,OAAO,OAAe;AAC/B,6CAAsD;AAA7C,yGAAA,OAAO,OAAc;AAC9B,qCAA+C;AAAtC,kGAAA,OAAO,OAAW;AAC3B,qCAA+C;AAAtC,kGAAA,OAAO,OAAW;AAC3B,UAAU;AACV,wCAAwC;AACxC,iCAAmC;AAOjC,8BAAS;AANX,uCAAyC;AAOvC,8BAAS;AALX,0CAA0C;AAC1C,6BAA2C;AAWzC,mGAXO,wBAAkB,OAWP"} \ No newline at end of file diff --git a/build/src/libsaml.d.ts b/build/libsaml.d.ts similarity index 100% rename from build/src/libsaml.d.ts rename to build/libsaml.d.ts diff --git a/build/src/libsaml.js b/build/libsaml.js similarity index 100% rename from build/src/libsaml.js rename to build/libsaml.js diff --git a/build/libsaml.js.map b/build/libsaml.js.map new file mode 100644 index 00000000..2ab134fb --- /dev/null +++ b/build/libsaml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"libsaml.js","sourceRoot":"","sources":["../src/libsaml.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAAmC;AACnC,qCAA2D;AAC3D,6BAAuD;AACvD,+BAA+B;AAE/B,kCAAoC;AAMpC,yCAAoD;AACpD,uCAAyC;AACzC,yCAAsC;AACtC,uCAAkC;AAClC,6BAAmC;AAEnC,IAAM,mBAAmB,GAAG,gBAAU,CAAC,SAAS,CAAC;AACjD,IAAM,gBAAgB,GAAG,gBAAU,CAAC,MAAM,CAAC;AAC3C,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CAAC,CAAC;gBACxC,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;WAEG;QACG,UAAU,EAAhB,UAAiB,KAAa;;;;;;4BAEpB,QAAQ,GAAK,gBAAU,EAAE,SAAjB,CAAkB;4BAElC;;;;;+BAKG;4BACH,IAAI,CAAC,QAAQ,EAAE;gCACb,qCAAqC;gCACrC,sBAAO,OAAO,CAAC,MAAM,CACnB,+LAA+L,CAChM,EAAC;6BACH;;;;4BAGQ,qBAAM,QAAQ,CAAC,KAAK,CAAC,EAAA;gCAA5B,sBAAO,SAAqB,EAAC;;;4BAE7B,MAAM,GAAC,CAAC;;;;;SAEX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/build/src/metadata-idp.d.ts b/build/metadata-idp.d.ts similarity index 100% rename from build/src/metadata-idp.d.ts rename to build/metadata-idp.d.ts diff --git a/build/src/metadata-idp.js b/build/metadata-idp.js similarity index 100% rename from build/src/metadata-idp.js rename to build/metadata-idp.js diff --git a/build/metadata-idp.js.map b/build/metadata-idp.js.map new file mode 100644 index 00000000..f0f7a1a3 --- /dev/null +++ b/build/metadata-idp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata-idp.js","sourceRoot":"","sources":["../src/metadata-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyD;AAEzD,6BAAkC;AAClC,qCAAgC;AAChC,qCAAsD;AACtD,yBAA2B;AAI3B;;GAEG;AACH,mBAAyB,IAA4B;IACnD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAFD,4BAEC;AAED;IAAiC,+BAAQ;IACvC,qBAAY,IAA4B;QAAxC,iBA6GC;QA5GC,IAAM,MAAM,GAAG,kBAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,YAAY,MAAM,CAAC;QAExD,IAAI,CAAC,MAAM,EAAE;YACL,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AC,yBAAyB,CAAC;aACxC;YACD;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,SAAS,EAAE;oBACT,kBAAkB;oBAClB,kBAAkB;oBAClB,qBAAqB;iBACtB;gBACD,KAAK,EAAE,CAAC,SAAS,CAAC;gBAClB,aAAa,EAAE,EAAE;gBACjB,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;SACF,CAAC,SAAC;;IACL,CAAC;IAED;;;OAGG;IACH,+CAAyB,GAAzB;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;QAC9C,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,KAAK,CAAC;SACd;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,4CAAsB,GAAtB,UAAuB,OAAe;QACpC,IAAI,kBAAQ,CAAC,OAAO,CAAC,EAAE;YACrB,IAAM,QAAQ,GAAG,eAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACxD,IAAI,OAAO,EAAE;gBACX,OAAO,OAAO,CAAC;aAChB;SACF;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC,CAAC;IACH,kBAAC;AAAD,CAAC,AA3ID,CAAiC,kBAAQ,GA2IxC;AA3IY,kCAAW"} \ No newline at end of file diff --git a/build/src/metadata-sp.d.ts b/build/metadata-sp.d.ts similarity index 100% rename from build/src/metadata-sp.d.ts rename to build/metadata-sp.d.ts diff --git a/build/src/metadata-sp.js b/build/metadata-sp.js similarity index 100% rename from build/src/metadata-sp.js rename to build/metadata-sp.js diff --git a/build/metadata-sp.js.map b/build/metadata-sp.js.map new file mode 100644 index 00000000..c02f4467 --- /dev/null +++ b/build/metadata-sp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata-s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B,CAAC,OAAO,KAAK,UAAQ,EAAE;oBAC3D,UAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC;iBACxD;aACF;YACD,OAAO,UAAQ,CAAC;SACjB;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAC5C,CAAC;IACH,iBAAC;AAAD,CAAC,AA3LD,CAAgC,kBAAQ,GA2LvC;AA3LY,gCAAU"} \ No newline at end of file diff --git a/build/src/metadata.d.ts b/build/metadata.d.ts similarity index 100% rename from build/src/metadata.d.ts rename to build/metadata.d.ts diff --git a/build/src/metadata.js b/build/metadata.js similarity index 100% rename from build/src/metadata.js rename to build/metadata.js diff --git a/build/metadata.js.map b/build/metadata.js.map new file mode 100644 index 00000000..e4a90c2e --- /dev/null +++ b/build/metadata.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,uBAAyB;AACzB,6BAAkC;AAClC,yCAAsC;AACtC,qCAAqC;AAarC;IAIE;;;OAGG;IACH,kBAAY,GAAoB,EAAE,UAAoB;QAApB,2BAAA,EAAA,eAAoB;QACpD,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,mBAAO,CACjB,IAAI,CAAC,SAAS,EACd,UAAU,CAAC,MAAM,CAAC;YAChB;gBACE,GAAG,EAAE,kBAAkB;gBACvB,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI;aACd;YACD;gBACE,GAAG,EAAE,UAAU;gBACf,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;YACD;gBACE,qDAAqD;gBACrD,GAAG,EAAE,mBAAmB;gBACxB,SAAS,EAAE;oBACT,kBAAkB;oBAClB,gBA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AE,OAAO;gBAClD,IAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/C,OAAO,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC,EAAE,EAAE,CAAC,CAAC;SACR;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACH,eAAC;AAAD,CAAC,AA9JD,IA8JC"} \ No newline at end of file diff --git a/build/src/api.js.map b/build/src/api.js.map deleted file mode 100644 index f9bebf91..00000000 --- a/build/src/api.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAOA,IAAM,OAAO,GAAY;IACvB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAFD,gCAEC;AAED,SAAgB,kBAAkB,CAAC,MAAwB;IACzD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE;QACzC,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;KACH;IAED,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACrC,CAAC;AATD,gDASC"} \ No newline at end of file diff --git a/build/src/binding-post.js.map b/build/src/binding-post.js.map deleted file mode 100644 index 92dd03bb..00000000 --- a/build/src/binding-post.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding-post.js","sourceRoot":"","sources":["../../src/binding-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6BAA4C;AAE5C,qCAAgC;AAChC,qCAAyC;AAEzC,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAEhC;;;;;GAKG;AACH,SAAS,kBAAkB,CACzB,iBAAyB,EACzB,MAAW,EACX,o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,EAAE,IAAA;YACF,OAAO,EAAE,iBAAO,CAAC,YAAY,CAAC,eAAe,CAAC;SAC/C,CAAC;KACH;IACD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACxE,CAAC;AAED,IAAM,WAAW,GAAG;IAClB,kBAAkB,oBAAA;IAClB,mBAAmB,qBAAA;IACnB,mBAAmB,qBAAA;IACnB,oBAAoB,sBAAA;CACrB,CAAC;AAEF,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/build/src/binding-redirect.js.map b/build/src/binding-redirect.js.map deleted file mode 100644 index 916d3322..00000000 --- a/build/src/binding-redirect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binding-redirect.js","sourceRoot":"","sources":["../../src/binding-redirect.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,qCAAyC;AACzC,qCAAgC;AAIhC,yBAA2B;AAC3B,6BAA2C;AAE3C,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAChC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AAWpC;;;;;;;GAOG;AACH,SAAS,MAAM,CAAC,KAAa,EAAE,KAAa,EAAE,KAAe;IAC3D,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;AAC5D,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,IAAyB;IACzC,IAAA,OAAO,GAA6C,IAAI,QAAjD,EAAE,IAAI,GAAuC,IAAI,KAA3C,EAAE,QAAQ,GAA6B,IAAI,SAAjC,EAAE,OAAO,GAAoB,IAAI,QAAxB,EAAE,aAAa,GAAK,IAAI,cAAT,CAAU;IAC3D,IAAA,KAAoB,IAAI,WAAT,EAAf,UAAU,mBAAG,EAAE,KAAA,CAAU;IAC/B,IAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,KAAK,CAA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AAO,EAAE,gBAAgB,CAAC;gBACxB,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,SAAS,CAAC,cAAc;gBAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,wBAAwB;gBAC9D,OAAO,EAAE,eAAe;gBACxB,aAAa,EAAE,WAAW;gBAC1B,UAAU,YAAA;aACX,CAAC;SACH,CAAC;KACH;IACD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;AAC5E,CAAC;AAED,IAAM,eAAe,GAAG;IACtB,uBAAuB,yBAAA;IACvB,wBAAwB,0BAAA;IACxB,yBAAyB,2BAAA;CAC1B,CAAC;AAEF,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/build/src/entity-idp.js.map b/build/src/entity-idp.js.map deleted file mode 100644 index afc8485d..00000000 --- a/build/src/entity-idp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"entity-idp.js","sourceRoot":"","sources":["../../src/entity-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAAoE;AAOpE,qCAAgC;AAChC,6BAAkC;AAClC,+CAAyC;AACzC,+BAA8B;AAC9B,qCAAqC;AAErC;;GAEG;AACH,mBAAyB,KAA+B;IACtD,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC;AAFD,4BAEC;AAED;;GAEG;AACH;IAAsC,oCAAM;IAG1C,0BAAY,UAAoC;QAAhD,iBA+BC;QA9BC,IAAM,uBAAuB,GAAG;YAC9B,uBAAuB,EAAE,KAAK;YAC9B,SAAS,EAAE;gBACT,kBAAkB,EAAE,MAAM;aAC3B;SACF,CAAC;QACF,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;QACzE,uBAAuB;QACvB,IAAI,UAAU,CAAC,qBAA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ACE,EAAmB,EACnB,OAAe,EACf,GAAqB;QAErB,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,WAAI,CAAC;YACV,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,IAAI;YACV,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,yBAAyB,EAAE;YAC3D,UAAU,EAAE,aAAa;YACzB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,GAAG;SACb,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAnGD,CAAsC,gBAAM,GAmG3C;AAnGY,4CAAgB"} \ No newline at end of file diff --git a/build/src/entity-sp.js.map b/build/src/entity-sp.js.map deleted file mode 100644 index 10d8e8ec..00000000 --- a/build/src/entity-sp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"entity-sp.js","sourceRoot":"","sources":["../../src/entity-sp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAIkB;AAMlB,6BAAkC;AAClC,uDAAiD;AACjD,+CAAyC;AACzC,+BAA8B;AAE9B;;GAEG;AACH,mBAAyB,KAA8B;IACrD,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAFD,4BAEC;AAED;;;;GAIG;AACH;IAAqC,mCAAM;IAGzC;;;OAGG;IACH,yBAAY,SAAkC;QAA9C,iBAUC;QATC,IAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC;YACE,mBAAmB,EAAE,KAAK;YAC1B,oBAAoB,EAAE,KAAK;YAC3B,iBAAiB,EAAE,KAAK;SACzB,EACD,SAAS,CACV,CAAC;QACF,QAAA,kBAAM,aAAa,EAAE,IAAI,CAAC,SAAC;;IAC7B,CAAC;IAED;;;;;OAKG;IACI,4CAAkB,GAAzB,UACE,GAAqB,EACrB,OAAoB,EACpB,oBAA2D;QAD3D,wBAAA,EAAA,oBAAoB;QAGpB,IAAM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mF1C;AAnFY,0CAAe"} \ No newline at end of file diff --git a/build/src/entity.js.map b/build/src/entity.js.map deleted file mode 100644 index 437af174..00000000 --- a/build/src/entity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;GAIG;AACH,qCAAsD;AACtD,6BAA8E;AAC9E,6BAAoC;AACpC,+CAEwB;AACxB,6CAAgF;AAChF,uDAAiD;AACjD,+CAAyC;AAMzC,+BAA8B;AAE9B,IAAM,uBAAuB,GAAG,gBAAU,CAAC,UAAU,CAAC,IAAI,CAAC;AAC3D,IAAM,sBAAsB,GAAG,gBAAU,CAAC,UAAU,CAAC,GAAG,CAAC;AACzD,IAAM,mBAAmB,GAAG,gBAAU,CAAC,SAAS,CAAC;AACjD,IAAM,oBAAoB,GAAG,2BAAqB,CAAC,YAAY,CAAC;AAEhE,IAAM,oBAAoB,GAAG;IAC3B,wBAAwB,EAAE,KAAK;IAC/B,mBAAmB,EAAE,oBAAoB,CAAC,iBAAiB;IAC3D,uBAAuB,EAAE,KAAK;IAC9B,WAAW,EAAE,KAAK;IAClB,oBAAoB,EAAE,KAAK;IAC3B,yBAAyB,EAAE,mBAAmB,CAAC,UAAU;IACzD,uBAAuB,EAAE,uBAAuB,CAAC,OAAO;IACxD,sBAAsB,EAAE,sBAAsB,CAAC,OAAO;IACtD,UAAU,EAAE,cAAc,OAAA,GAAG,GAAG,SAAM,EAAE,EAAd,CAAc;IACxC,UAAU,EAAE,EAAE;CACf,CAAC;AA8BF;IAKE;;;OAGG;IACH,gBAAY,aAAgC,EAAE,UAAwB;QACpE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;QAC5E,IAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,aAAa,CAAC;QACzD,QAAQ,UAAU,EAAE;YAClB,KAA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AAU,EAAE,gBAAgB;YAC5B,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,wBAAwB;YAC3D,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AAlND,IAkNC"} \ No newline at end of file diff --git a/build/src/extractor.js.map b/build/src/extractor.js.map deleted file mode 100644 index bd8732cb..00000000 --- a/build/src/extractor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,+BAA8C;AAC9C,qCAA4D;AAC5D,uCAAkC;AAElC,IAAM,GAAG,GAAG,kBAAS,CAAC;AAatB,SAAS,kBAAkB,CAAC,KAAK;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,UAAC,WAAW,EAAE,IAAI;QACpC,IAAI,YAAY,GAAG,WAAW,CAAC;QAC/B,IAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,UAAU,EAAE;YACd,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACvC,YAAY,GAAG,WAAW,IAAG,gCAA8B,QAAQ,QAAK,CAAA,CAAC;SAC1E;QACD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,GAAG,WAAW,IAAG,uBAAqB,IAAI,OAAI,CAAA,CAAC;SAC5D;QACD,OAAO,YAAY,CAAC;IACtB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,SAAS,mBAAmB,CAAC,UAAU;IACrC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3B,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3B,OAAO,OAAK,UAAU,CAAC,CAAC,CAAG,CAAC;KAC7B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AU,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,IAAI,cAAc,GAA+C,IAAI,CAAC;YACtE,IAAM,IAAI,GAAG,cAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBACrB,IAAM,QAAQ,GAAG,YAAU,SAAS,GAAG,cAAc,MAAG,CAAC;gBACzD,cAAc,GAAG,cAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aAC9C;YACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;gBACnB,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,CAAO,IAAK,OAAA,CAAC,CAAC,UAAW,CAAC,SAAS,EAAvB,CAAuB,CAAC,CAAC;aACjE;YACD,6BACK,MAAM,gBACR,GAAG,IAAG,cAAc,OACrB;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA/MD,0BA+MC"} \ No newline at end of file diff --git a/build/src/flow.js.map b/build/src/flow.js.map deleted file mode 100644 index 046aecc9..00000000 --- a/build/src/flow.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAwD;AACxD,yCAAyC;AACzC,qCAAgC;AAChC,yCASqB;AAErB,6BAMe;AAEf,IAAM,QAAQ,GAAG,aAAO,CAAC,OAAO,CAAC;AACjC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AAOpC,2DAA2D;AAC3D,SAAS,yBAAyB,CAChC,UAAsB,EACtB,SAAe;IAEf,QAAQ,UAAU,EAAE;QAClB,KAAK,gBAAU,CAAC,WAAW;YACzB,OAAO,8BAAkB,CAAC;QAC5B,KAAK,gBAAU,CAAC,YAAY;YAC1B,IAA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MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KACzC;IAED,mDAAmD;IACnD,MAAM,IAAI,KAAK,CACb,2CAAyC,GAAG,4BAAuB,MAAQ,CAC5E,CAAC;AACJ,CAAC;AAED,SAAgB,IAAI,CAAC,OAAO;IAC1B,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAEtC,OAAO,CAAC,eAAe,GAAG,CAAC,sBAAgB,CAAC,QAAQ,EAAE,sBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7E,iCAAiC;IACjC,IAAI,UAAU,KAAK,gBAAU,CAAC,YAAY,EAAE;QAC1C,OAAO,CAAC,eAAe,GAAG,CAAC,sBAAgB,CAAC,IAAI,CAAC,CAAC;KACnD;IAED,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC7B,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;KAC1B;IAED,IAAI,OAAO,KAAK,QAAQ,CAAC,QAAQ,EAAE;QACjC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC/C,CAAC;AAnBD,oBAmBC"} \ No newline at end of file diff --git a/build/src/libsaml.js.map b/build/src/libsaml.js.map deleted file mode 100644 index cf193707..00000000 --- a/build/src/libsaml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"libsaml.js","sourceRoot":"","sources":["../../src/libsaml.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAAmC;AACnC,qCAA2D;AAC3D,6BAAuD;AACvD,+BAA+B;AAE/B,kCAAoC;AAMpC,yCAAoD;AACpD,uCAAyC;AACzC,yCAAsC;AACtC,uCAAkC;AAClC,6BAAmC;AAEnC,IAAM,mBAAmB,GAAG,gBAAU,CAAC,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xD,OAAO,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACxC,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;WAEG;QACG,UAAU,EAAhB,UAAiB,KAAa;;;;;;4BAEpB,QAAQ,GAAK,gBAAU,EAAE,SAAjB,CAAkB;4BAElC;;;;;+BAKG;4BACH,IAAI,CAAC,QAAQ,EAAE;gCACb,qCAAqC;gCACrC,sBAAO,OAAO,CAAC,MAAM,CACnB,+LAA+L,CAChM,EAAC;6BACH;;;;4BAGQ,qBAAM,QAAQ,CAAC,KAAK,CAAC,EAAA;gCAA5B,sBAAO,SAAqB,EAAC;;;4BAE7B,MAAM,GAAC,CAAC;;;;;SAEX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/build/src/metadata-idp.js.map b/build/src/metadata-idp.js.map deleted file mode 100644 index 2d48dad8..00000000 --- a/build/src/metadata-idp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata-idp.js","sourceRoot":"","sources":["../../src/metadata-idp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyD;AAEzD,6BAAkC;AAClC,qCAAgC;AAChC,qCAAsD;AACtD,yBAA2B;AAI3B;;GAEG;AACH,mBAAyB,IAA4B;IACnD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAFD,4BAEC;AAED;IAAiC,+BAAQ;IACvC,qBAAY,IAA4B;QAAxC,iBA6GC;QA5GC,IAAM,MAAM,GAAG,kBAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,YAAY,MAAM,CAAC;QAExD,IAAI,CAAC,MAAM,EAAE;YACL,IAAA,KAQF,IAA0B,EAP5B,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,+BAA+B,EA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BAClB,kBAAkB;oBAClB,qBAAqB;iBACtB;gBACD,KAAK,EAAE,CAAC,SAAS,CAAC;gBAClB,aAAa,EAAE,EAAE;gBACjB,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;SACF,CAAC,SAAC;;IACL,CAAC;IAED;;;OAGG;IACH,+CAAyB,GAAzB;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;QAC9C,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,KAAK,CAAC;SACd;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,4CAAsB,GAAtB,UAAuB,OAAe;QACpC,IAAI,kBAAQ,CAAC,OAAO,CAAC,EAAE;YACrB,IAAM,QAAQ,GAAG,eAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACxD,IAAI,OAAO,EAAE;gBACX,OAAO,OAAO,CAAC;aAChB;SACF;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC,CAAC;IACH,kBAAC;AAAD,CAAC,AA3ID,CAAiC,kBAAQ,GA2IxC;AA3IY,kCAAW"} \ No newline at end of file diff --git a/build/src/metadata-sp.js.map b/build/src/metadata-sp.js.map deleted file mode 100644 index 5bb488fc..00000000 --- a/build/src/metadata-sp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata-sp.js","sourceRoot":"","sources":["../../src/metadata-sp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,uCAAyD;AAEzD,6BAA0D;AAC1D,qCAAgC;AAChC,qCAAsD;AACtD,yBAA2B;AAa3B;;GAEG;AACH,mBAAyB,IAA2B;IAClD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9B,CA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kBAAQ,GA2LvC;AA3LY,gCAAU"} \ No newline at end of file diff --git a/build/src/metadata.js.map b/build/src/metadata.js.map deleted file mode 100644 index 375698de..00000000 --- a/build/src/metadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,uBAAyB;AACzB,6BAAkC;AAClC,yCAAsC;AACtC,qCAAqC;AAarC;IAIE;;;OAGG;IACH,kBAAY,GAAoB,EAAE,UAAoB;QAApB,2BAAA,EAAA,eAAoB;QACpD,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,mBAAO,CACjB,IAAI,CAAC,SAAS,EACd,UAAU,CAAC,MAAM,CAAC;YAChB;gBACE,GAAG,EAAE,kBAAkB;gBACvB,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI;aACd;YACD;gBACE,GAAG,EAAE,UAAU;gBACf,SAAS,EAAE,CAAC,kBAAkB,CAAC;gBAC/B,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;YACD;gBACE,qDAAqD;gBACrD,GAAG,EAAE,mBAAmB;gBACxB,SAAS,EAAE;oBACT,kBAAkB;oBAClB,gBAAgB;oBAChB,eAAe;oBACf,SAAS;oBACT,UAAU;oBACV,iBAAiB;iBAClB;gBACD,UAAU,EAAE,EAAE;aACf;YACD;gBACE,8DAA8D;gBAC9D,GAAG,EAAE,aAAa;gBAClB,SAAS,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,CAAC;gBAClE,KAAK,EAAE,CAAC,KAAK,CAAC;gBACd,aAAa,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,iBAAiB,CAAC;gBACzD,UAAU,EAAE,EAAE;aACf;YACD;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,SAAS,EAAE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QACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,yCAAsB,GAA7B,UAA8B,OAA2B;QACvD,IAAI,OAAO,IAAI,kBAAQ,CAAC,OAAO,CAAC,EAAE;YAChC,IAAM,UAAQ,GAAG,eAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACxD,IAAI,CAAC,CAAC,mBAAmB,YAAY,KAAK,CAAC,EAAE;gBAC3C,mBAAmB,GAAG,CAAC,mBAAmB,CAAC,CAAC;aAC7C;YACD,IAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CACtC,UAAC,GAAQ,IAAK,OAAA,GAAG,CAAC,OAAO,KAAK,UAAQ,EAAxB,CAAwB,CACvC,CAAC;YACF,IAAI,OAAO,EAAE;gBACX,OAAO,OAAO,CAAC,QAAQ,CAAC;aACzB;SACF;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACI,qCAAkB,GAAzB,UAA0B,QAAkB;QAC1C,IAAI,eAAe,GAAG,EAAE,CAAC;QACzB,IAAI,QAAQ,EAAE;YACZ,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAC,GAAQ,EAAE,OAAO;gBAClD,IAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/C,OAAO,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC,EAAE,EAAE,CAAC,CAAC;SACR;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;IACH,eAAC;AAAD,CAAC,AA9JD,IA8JC"} \ No newline at end of file diff --git a/build/src/types.js.map b/build/src/types.js.map deleted file mode 100644 index e2309b60..00000000 --- a/build/src/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;AAEA,2CAA+E;AAAtE,yHAAA,gBAAgB,OAA+B;AACxD,+CAAyE;AAAhE,wHAAA,WAAW,OAA4B;AAEhD,yCAA4E;AAAnE,uHAAA,eAAe,OAA8B;AACtD,6CAAsE;AAA7D,sHAAA,UAAU,OAA2B"} \ No newline at end of file diff --git a/build/src/urn.js.map b/build/src/urn.js.map deleted file mode 100644 index 32831a19..00000000 --- a/build/src/urn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../src/urn.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mFAA+D,CAAA;IAC/D,2EAAuD,CAAA;IACvD,mFAA+D,CAAA;AACjE,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,kDAAyB,CAAA;IACzB,kDAAyB,CAAA;AAC3B,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAY,UA0BX;AA1BD,WAAY,UAAU;IACpB,WAAW;IACX,oEAAsD,CAAA;IACtD,wEAA0D,CAAA;IAC1D,wEAA0D,CAAA;IAC1D,oFAAsE,CAAA;IACtE,0CAA0C;IAC1C,2EAA6D,CAAA;IAC7D,kGAAoF,CAAA;IACpF,4FAA8E,CAAA;IAC9E,kFAAoE,CAAA;IACpE,kFAAoE,CAAA;IACpE,wEAA0D,CAAA;IAC1D,kFAAoE,CAAA;IACpE,gFAAkE,CAAA;IAClE,0FAA4E,CAAA;IAC5E,gFAAkE,CAAA;IAClE,0FAA4E,CAAA;IAC5E,sGAAwF,CAAA;IACxF,gGAAkF,CAAA;IAClF,8FAAgF,CAAA;IAChF,gGAAkF,CAAA;IAClF,sFAAwE,CAAA;IACxE,0FAA4E,CAAA;I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B;IACD,UAAU,EAAE;QACV,eAAe;QACf,qBAAqB;QACrB,cAAc;QACd,0BAA0B;QAC1B,2BAA2B;KAC5B;CACF,CAAC;AAOA,sCAAa"} \ No newline at end of file diff --git a/build/src/utility.js.map b/build/src/utility.js.map deleted file mode 100644 index 992c0db9..00000000 --- a/build/src/utility.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,yCAA6C;AAC7C,6BAAwC;AAExC,IAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAc,EAAE,IAAW,EAAE,cAAqB;IAArB,+BAAA,EAAA,qBAAqB;IAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QAC3B,IAAI,cAAc,EAAE;YAClB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,GAAG,CAAC;SACZ;QACD,2EAA2E;QAC3E,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;YACxB,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC5B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACxB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7B,OAAO,GAAG,CAAC;SACZ;QAED,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAjBD,8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Ae,OAAO,CAAC"} \ No newline at end of file diff --git a/build/src/validator.js.map b/build/src/validator.js.map deleted file mode 100644 index b9e5b139..00000000 --- a/build/src/validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,SAAS,UAAU,CACjB,YAAgC,EAChC,eAAmC,EACnC,KAA8B;IAA9B,sBAAA,EAAA,SAAyB,CAAC,EAAE,CAAC,CAAC;IAE9B,IAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,EAAE;QACrC,kHAAkH;QAClH,OAAO,CAAC,IAAI,CACV,0FAA0F,CAC3F,CAAC;QACF,OAAO,IAAI,CAAC;KACb;IAED,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,IAAI,iBAAiB,GAAgB,IAAI,CAAC;IAEpC,IAAA,KAAA,OAAsC,KAAK,IAAA,EAA1C,cAAc,QAAA,EAAE,iBAAiB,QAAS,CAAC;IAElD,IAAI,YAAY,IAAI,CAAC,eAAe,EAAE;QACpC,cAAc,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG,CAAC;KACjD;IACD,IAAI,CAAC,YAAY,IAAI,eAAe,EAAE;QACpC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KACtD;IAED,cAAc,GAAG,IAAI,IAAI,CAAC,YAAa,CAAC,CAAC;IACzC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAgB,CAAC,CAAC;IAE/C,OAAO,CACL,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG;QACxC,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAC9C,CAAC;AACJ,CAAC;AAEQ,gCAAU"} \ No newline at end of file diff --git a/build/src/types.d.ts b/build/types.d.ts similarity index 100% rename from build/src/types.d.ts rename to build/types.d.ts diff --git a/build/src/types.js b/build/types.js similarity index 100% rename from build/src/types.js rename to build/types.js diff --git a/build/types.js.map b/build/types.js.map new file mode 100644 index 00000000..831e47e9 --- /dev/null +++ b/build/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAEA,2CAA+E;AAAtE,yHAAA,gBAAgB,OAA+B;AACxD,+CAAyE;AAAhE,wHAAA,WAAW,OAA4B;AAEhD,yCAA4E;AAAnE,uHAAA,eAAe,OAA8B;AACtD,6CAAsE;AAA7D,sHAAA,UAAU,OAA2B"} \ No newline at end of file diff --git a/build/src/urn.d.ts b/build/urn.d.ts similarity index 100% rename from build/src/urn.d.ts rename to build/urn.d.ts diff --git a/build/src/urn.js b/build/urn.js similarity index 100% rename from build/src/urn.js rename to build/urn.js diff --git a/build/urn.js.map b/build/urn.js.map new file mode 100644 index 00000000..30ec7d40 --- /dev/null +++ b/build/urn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn.js","sourceRoot":"","sources":["../src/urn.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mFAA+D,CAAA;IAC/D,2EAAuD,CAAA;IACvD,mFAA+D,CAAA;AACjE,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,kDAAyB,CAAA;IACzB,kDAAyB,CAAA;AAC3B,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAY,UA0BX;AA1BD,WAAY,UAAU;IACpB,WAAW;IACX,oEAAsD,CAAA;IACtD,wEAA0D,CAAA;IAC1D,wEAA0D,CA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Z,QAAQ,EAAE,UAAU;KACrB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,YAAY;KACtB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,aAAa;QACjB,GAAG,EAAE,cAAc;KACpB;CACF,CAAC;AA8BA,0BAAO;AA5BT,uEAAuE;AACvE,iEAAiE;AACjE,IAAM,aAAa,GAAG;IACpB,OAAO,EAAE;QACP,eAAe;QACf,cAAc;QACd,qBAAqB;QACrB,0BAA0B;KAC3B;IACD,QAAQ,EAAE;QACR,eAAe;QACf,cAAc;QACd,qBAAqB;QACrB,0BAA0B;KAC3B;IACD,UAAU,EAAE;QACV,eAAe;QACf,qBAAqB;QACrB,cAAc;QACd,0BAA0B;QAC1B,2BAA2B;KAC5B;CACF,CAAC;AAOA,sCAAa"} \ No newline at end of file diff --git a/build/src/utility.d.ts b/build/utility.d.ts similarity index 100% rename from build/src/utility.d.ts rename to build/utility.d.ts diff --git a/build/src/utility.js b/build/utility.js similarity index 100% rename from build/src/utility.js rename to build/utility.js diff --git a/build/utility.js.map b/build/utility.js.map new file mode 100644 index 00000000..a2cda460 --- /dev/null +++ b/build/utility.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,yCAA6C;AAC7C,6BAAwC;AAExC,IAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAc,EAAE,IAAW,EAAE,cAAqB;IAArB,+BAAA,EAAA,qBAAqB;IAC1E,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QAC3B,IAAI,cAAc,EAAE;YAClB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,GAAG,CAAC;SACZ;QACD,2EAA2E;QAC3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OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAC1C,CAAC;AAFD,0CAEC;AAED,SAAgB,QAAQ,CACtB,KAAgC;IAEhC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAJD,4BAIC;AAED,IAAM,OAAO,GAAG;IACd,QAAQ,UAAA;IACR,YAAY,cAAA;IACZ,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,aAAa,eAAA;IACb,kBAAkB,oBAAA;IAClB,kBAAkB,oBAAA;IAClB,UAAU,YAAA;IACV,WAAW,aAAA;IACX,YAAY,cAAA;IACZ,8BAA8B,gCAAA;IAC9B,cAAc,gBAAA;IACd,eAAe,iBAAA;IACf,eAAe,iBAAA;CAChB,CAAC;AAEF,kBAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/build/src/validator.d.ts b/build/validator.d.ts similarity index 100% rename from build/src/validator.d.ts rename to build/validator.d.ts diff --git a/build/src/validator.js b/build/validator.js similarity index 100% rename from build/src/validator.js rename to build/validator.js diff --git a/build/validator.js.map b/build/validator.js.map new file mode 100644 index 00000000..dfe94d29 --- /dev/null +++ b/build/validator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validator.js","sourceRoot":"","sources":["../src/validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,SAAS,UAAU,CACjB,YAAgC,EAChC,eAAmC,EACnC,KAA8B;IAA9B,sBAAA,EAAA,SAAyB,CAAC,EAAE,CAAC,CAAC;IAE9B,IAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,EAAE;QACrC,kHAAkH;QAClH,OAAO,CAAC,IAAI,CACV,0FAA0F,CAC3F,CAAC;QACF,OAAO,IAAI,CAAC;KACb;IAED,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,IAAI,iBAAiB,GAAgB,IAAI,CAAC;IAEpC,IAAA,KAAA,OAAsC,KAAK,IAAA,EAA1C,cAAc,QAAA,EAAE,iBAAiB,QAAS,CAAC;IAElD,IAAI,YAAY,IAAI,CAAC,eAAe,EAAE;QACpC,cAAc,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG,CAAC;KACjD;IACD,IAAI,CAAC,YAAY,IAAI,eAAe,EAAE;QACpC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;KACtD;IAED,cAAc,GAAG,IAAI,IAAI,CAAC,YAAa,CAAC,CAAC;IACzC,iBAAiB,GAAG,IAAI,IAAI,CAAC,eAAgB,CAAC,CAAC;IAE/C,OAAO,CACL,CAAC,cAAc,GAAG,cAAc,IAAI,CAAC,GAAG;QACxC,CAAC,GAAG,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAC9C,CAAC;AACJ,CAAC;AAEQ,gCAAU"} \ No newline at end of file diff --git a/package.json b/package.json index de9449ec..747f5175 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit" }, "contributors": [ - "Tony Ngan " + "Tony Ngan ", + "Mohamed Meabed " ], - "author": "tngan", "repository": { "url": "https://github.com/meabed/samlify-js", "type": "git" diff --git a/index.ts b/src/index.ts similarity index 54% rename from index.ts rename to src/index.ts index 6ccca8ef..2f5db5d1 100644 --- a/index.ts +++ b/src/index.ts @@ -1,22 +1,22 @@ // version <= 1.25 import IdentityProvider, { IdentityProvider as IdentityProviderInstance, -} from "./src/entity-idp"; +} from "./entity-idp"; import ServiceProvider, { ServiceProvider as ServiceProviderInstance, -} from "./src/entity-sp"; +} from "./entity-sp"; -export { default as IdPMetadata } from "./src/metadata-idp"; -export { default as SPMetadata } from "./src/metadata-sp"; -export { default as Utility } from "./src/utility"; -export { default as SamlLib } from "./src/libsaml"; +export { default as IdPMetadata } from "./metadata-idp"; +export { default as SPMetadata } from "./metadata-sp"; +export { default as Utility } from "./utility"; +export { default as SamlLib } from "./libsaml"; // roadmap // new name convention in version >= 3.0 -import * as Constants from "./src/urn"; -import * as Extractor from "./src/extractor"; +import * as Constants from "./urn"; +import * as Extractor from "./extractor"; // exposed methods for customising samlify -import { setSchemaValidator } from "./src/api"; +import { setSchemaValidator } from "./api"; export { Constants, diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 00000000..647774af --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1,2 @@ +export * from "./index"; +export * from "./types"; diff --git a/test/extractor.ts b/test/extractor.ts index 6c264a4b..ce457227 100644 --- a/test/extractor.ts +++ b/test/extractor.ts @@ -89,7 +89,7 @@ const _spmeta: string = String(readFileSync("./test/misc/spmeta.xml")); ]); t.is(result.issuer.length, 1); t.is( - result.issuer.every((i) => i === "https://idp.example.com/metadata"), + result.issuer.every((i:string) => i === "https://idp.example.com/metadata"), true ); }); diff --git a/test/flow.ts b/test/flow.ts index 7287c14a..bf72325e 100644 --- a/test/flow.ts +++ b/test/flow.ts @@ -1,4 +1,4 @@ -import esaml2 = require("../index"); +import esaml2 = require("../src"); import { readFileSync, writeFileSync } from "fs"; import test, { ExecutionContext } from "ava"; import { PostBindingContext } from "../src/entity"; diff --git a/test/index.ts b/test/index.ts index f83223b5..6271cd98 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,4 +1,4 @@ -import esaml2 = require("../index"); +import esaml2 = require("../src"); import { readFileSync } from "fs"; import test, { ExecutionContext } from "ava"; import { verifyTime } from "../src/validator"; diff --git a/test/issues.ts b/test/issues.ts index 19ac1e16..5e8b4f4f 100644 --- a/test/issues.ts +++ b/test/issues.ts @@ -1,4 +1,4 @@ -import esaml2 = require("../index"); +import esaml2 = require("../src"); import * as fs from "fs"; import { readFileSync } from "fs"; import test, { ExecutionContext } from "ava"; diff --git a/types.d.ts b/types.d.ts deleted file mode 100644 index fa716dd5..00000000 --- a/types.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./index"; -export * from "./src/types"; From 33181ede1fdf3dab3a46e1bb9dbea569d0dee167 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Thu, 16 Jul 2020 04:44:22 +0400 Subject: [PATCH 17/26] 2.7.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 747f5175..27c8da74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.6", + "version": "2.7.7", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 1204a2a9106a488b2d99fb4d20345229446785cc Mon Sep 17 00:00:00 2001 From: Mohamed Meabed <45731+meabed@users.noreply.github.com> Date: Thu, 16 Jul 2020 04:55:51 +0400 Subject: [PATCH 18/26] Update README.md --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 97e73f49..7e873559 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# samlify · +# samlify-js · [![Build Status](https://travis-ci.org/tngan/samlify.svg?branch=master)](https://travis-ci.org/tngan/samlify) [![npm version](https://img.shields.io/npm/v/samlify.svg?style=flat)](https://www.npmjs.com/package/samlify) @@ -15,11 +15,6 @@ Highly configuarable Node.js SAML 2.0 library for Single Sign On Welcome all PRs for maintaining this project, or provide a link to the repositories especially for use cases alongside with different frameworks. -### Sponsor - -| |
If you want to quickly implement SAML SSO, feel free to check out Auth0's NodeJS SDK and free plan at [auth0.com/overview](https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=samlify&utm_content=auth).
| -| :----------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - ### Installation @@ -28,7 +23,7 @@ To install the stable version Starting from v2.6, multiple schema validators are now supported. You can simply set the validator via the following global method. We have four validator modules right now, and you can write your own. The `setSchemaValidator` is required since v2.6, it will throw error if you don't set at the beginning. ```js -import * as samlify from "samlify"; +import * as samlify from "samlify-js"; import * as validator from "@authenio/samlify-xsd-schema-validator"; // import * as validator from '@authenio/samlify-validate-with-xmllint'; // import * as validator from '@authenio/samlify-node-xmllint'; @@ -71,7 +66,7 @@ yarn ### Get Started ```javascript -const saml = require("samlify"); +const saml = require("samlify-js"); ``` See full documentation [here](https://samlify.js.org/) From 693b8f2fd9140766464073f43202162b0c056503 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Fri, 17 Jul 2020 04:28:28 +0400 Subject: [PATCH 19/26] chore: update --- README.md | 6 +- build/entity.js.map | 2 +- build/libsaml.js | 4 +- build/libsaml.js.map | 2 +- build/test/key/idp/README.md | 4 -- build/test/key/idp/cert.cer | 22 ------- build/test/key/idp/cert2.cer | 30 --------- build/test/key/idp/encryptKey.pem | 30 --------- build/test/key/idp/encryptionCert.cer | 23 ------- build/test/key/idp/nocrypt.pem | 27 -------- build/test/key/idp/privkey.pem | 30 --------- build/test/key/idp/privkey2.pem | 51 --------------- build/test/key/keypass.txt | 11 ---- build/test/key/sp/cert.cer | 22 ------- build/test/key/sp/encryptKey.pem | 30 --------- build/test/key/sp/encryptionCert.cer | 24 ------- build/test/key/sp/knownGoodCert.cer | 1 - build/test/key/sp/knownGoodEncryptKey.pem | 1 - build/test/key/sp/privkey.pem | 30 --------- build/test/misc/attack_response_signed.xml | 1 - build/test/misc/dumpes_issuer_response.xml | 65 ------------------- build/test/misc/failed_response.xml | 1 - build/test/misc/false_signed_request_sha1.xml | 1 - .../test/misc/false_signed_request_sha256.xml | 1 - .../test/misc/false_signed_request_sha512.xml | 1 - build/test/misc/idpmeta.xml | 34 ---------- build/test/misc/idpmeta_nosign.xml | 27 -------- build/test/misc/idpmeta_onelogoutservice.xml | 33 ---------- build/test/misc/idpmeta_rollingcert.xml | 39 ----------- build/test/misc/idpmeta_share_cert.xml | 27 -------- build/test/misc/invalid_response.xml | 6 -- build/test/misc/logout_request.xml | 4 -- build/test/misc/multiple_entitydescriptor.xml | 37 ----------- build/test/misc/request.xml | 1 - build/test/misc/response.xml | 1 - build/test/misc/response_signed.xml | 1 - build/test/misc/response_signed_cert1.xml | 1 - build/test/misc/response_signed_cert2.xml | 1 - build/test/misc/signed_request_sha1.xml | 1 - build/test/misc/signed_request_sha256.xml | 1 - build/test/misc/signed_request_sha512.xml | 1 - build/test/misc/signed_response_sha1.xml | 1 - build/test/misc/signed_response_sha256.xml | 1 - build/test/misc/signed_response_sha512.xml | 1 - build/test/misc/sp_metadata_98.xml | 6 -- build/test/misc/spmeta.xml | 27 -------- build/test/misc/spmeta_noassertsign.xml | 32 --------- build/test/misc/spmeta_noauthnsign.xml | 25 ------- package.json | 3 +- src/entity.ts | 2 +- src/libsaml.ts | 4 +- test/extractor.ts | 4 +- tsconfig.json | 14 +--- 53 files changed, 20 insertions(+), 735 deletions(-) delete mode 100644 build/test/key/idp/README.md delete mode 100644 build/test/key/idp/cert.cer delete mode 100644 build/test/key/idp/cert2.cer delete mode 100644 build/test/key/idp/encryptKey.pem delete mode 100644 build/test/key/idp/encryptionCert.cer delete mode 100644 build/test/key/idp/nocrypt.pem delete mode 100644 build/test/key/idp/privkey.pem delete mode 100644 build/test/key/idp/privkey2.pem delete mode 100644 build/test/key/keypass.txt delete mode 100644 build/test/key/sp/cert.cer delete mode 100644 build/test/key/sp/encryptKey.pem delete mode 100644 build/test/key/sp/encryptionCert.cer delete mode 100644 build/test/key/sp/knownGoodCert.cer delete mode 100644 build/test/key/sp/knownGoodEncryptKey.pem delete mode 100644 build/test/key/sp/privkey.pem delete mode 100644 build/test/misc/attack_response_signed.xml delete mode 100644 build/test/misc/dumpes_issuer_response.xml delete mode 100644 build/test/misc/failed_response.xml delete mode 100644 build/test/misc/false_signed_request_sha1.xml delete mode 100644 build/test/misc/false_signed_request_sha256.xml delete mode 100644 build/test/misc/false_signed_request_sha512.xml delete mode 100644 build/test/misc/idpmeta.xml delete mode 100644 build/test/misc/idpmeta_nosign.xml delete mode 100644 build/test/misc/idpmeta_onelogoutservice.xml delete mode 100644 build/test/misc/idpmeta_rollingcert.xml delete mode 100644 build/test/misc/idpmeta_share_cert.xml delete mode 100644 build/test/misc/invalid_response.xml delete mode 100644 build/test/misc/logout_request.xml delete mode 100644 build/test/misc/multiple_entitydescriptor.xml delete mode 100644 build/test/misc/request.xml delete mode 100644 build/test/misc/response.xml delete mode 100644 build/test/misc/response_signed.xml delete mode 100644 build/test/misc/response_signed_cert1.xml delete mode 100644 build/test/misc/response_signed_cert2.xml delete mode 100644 build/test/misc/signed_request_sha1.xml delete mode 100644 build/test/misc/signed_request_sha256.xml delete mode 100644 build/test/misc/signed_request_sha512.xml delete mode 100644 build/test/misc/signed_response_sha1.xml delete mode 100644 build/test/misc/signed_response_sha256.xml delete mode 100644 build/test/misc/signed_response_sha512.xml delete mode 100644 build/test/misc/sp_metadata_98.xml delete mode 100644 build/test/misc/spmeta.xml delete mode 100644 build/test/misc/spmeta_noassertsign.xml delete mode 100644 build/test/misc/spmeta_noauthnsign.xml diff --git a/README.md b/README.md index 97e73f49..ab0ece6a 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ [![Coverage Status](https://img.shields.io/coveralls/tngan/samlify/master.svg)](https://coveralls.io/github/tngan/samlify?branch=master) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/samlify) ------ +--- + ## Fork with typescript fixes, packages upgrade and faster bug fixes. ------ + +--- Highly configuarable Node.js SAML 2.0 library for Single Sign On diff --git a/build/entity.js.map b/build/entity.js.map index 787da241..6e4dcbed 100644 --- a/build/entity.js.map +++ b/build/entity.js.map @@ -1 +1 @@ -{"version":3,"file":"entity.js","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;GAIG;AACH,qCAAsD;AACtD,6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"} \ No newline at end of file diff --git a/build/libsaml.js b/build/libsaml.js index d358f4ae..bec4a5fd 100644 --- a/build/libsaml.js +++ b/build/libsaml.js @@ -176,7 +176,9 @@ var libSaml = function () { */ replaceTagsByValue: function (rawXML, tagValues) { Object.keys(tagValues).forEach(function (t) { - rawXML = rawXML.replace(new RegExp("{" + t + "}", "g"), tagValues[t]); + if (typeof tagValues[t] !== "undefined") { + rawXML = rawXML.replace(new RegExp("{" + t + "}", "g"), tagValues[t]); + } }); return rawXML; }, diff --git a/build/libsaml.js.map b/build/libsaml.js.map index 2ab134fb..cec98377 100644 --- a/build/libsaml.js.map +++ b/build/libsaml.js.map @@ -1 +1 @@ -{"version":3,"file":"libsaml.js","sourceRoot":"","sources":["../src/libsaml.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAAmC;AACnC,qCAA2D;AAC3D,6BAAuD;AACvD,+BAA+B;AAE/B,kCAAoC;AAMpC,yCAAoD;AACpD,uCAAyC;AACzC,yCAAsC;AACtC,uCAAkC;AAClC,6BAAmC;AAEnC,IAAM,mBAAmB,GAAG,gBAAU,CAAC,SAAS,CAAC;AACjD,IAAM,gBAAgB,GAAG,gBAAU,CAAC,MAAM,CAAC;AAC3C,IAAM,OAAO,GAAG,aAAO,CAAC,OAAO,CAAC;AAChC,IAAM,SAAS,GAAG,aAAO,CAAC,SAAS,CAAC;AACpC,IAAM,GAAG,GAAG,kBAAS,CAAC;AAkGtB,IAAM,OAAO,GAAG;IACd;;;OAGG;IACH,SAAS,mBAAmB,CAAC,IAAY;QACvC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACzE,OAAO,aAAa,CAAC;SACtB;QACD,IACE,CAAC,SAAS,CAAC,cAAc,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,OAAO,CAA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UAAC,GAAG,EAAE,GAAG;oBACP,IAAI,GAAG,EAAE;wBACP,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACnB,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC,CAAC;qBACnE;oBACD,IAAI,CAAC,GAAG,EAAE;wBACR,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;qBAC/D;oBACD,IAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;oBACrD,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxD,OAAO,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACxC,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;WAEG;QACG,UAAU,EAAhB,UAAiB,KAAa;;;;;;4BAEpB,QAAQ,GAAK,gBAAU,EAAE,SAAjB,CAAkB;4BAElC;;;;;+BAKG;4BACH,IAAI,CAAC,QAAQ,EAAE;gCACb,qCAAqC;gCACrC,sBAAO,OAAO,CAAC,MAAM,CACnB,+LAA+L,CAChM,EAAC;6BACH;;;;4BAGQ,qBAAM,QAAQ,CAAC,KAAK,CAAC,EAAA;gCAA5B,sBAAO,SAAqB,EAAC;;;4BAE7B,MAAM,GAAC,CAAC;;;;;SAEX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/build/test/key/idp/README.md b/build/test/key/idp/README.md deleted file mode 100644 index 6e789d68..00000000 --- a/build/test/key/idp/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Support the use case of rolling certificate - -- `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` -- `privkey2.pem` - no password protected, it generates `cert2.cer` diff --git a/build/test/key/idp/cert.cer b/build/test/key/idp/cert.cer deleted file mode 100644 index b1b40e6d..00000000 --- a/build/test/key/idp/cert.cer +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV -BAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQ -cm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0x -NTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYD -VQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIG -A1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG -3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZU -tWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3 -pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRA -vr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsb -VUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0O -BBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwd -wK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPN -mHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUw -i1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef -2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0a -zkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWW -k1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4 -yyoWAJDUHiAmvFA= ------END CERTIFICATE----- diff --git a/build/test/key/idp/cert2.cer b/build/test/key/idp/cert2.cer deleted file mode 100644 index 46c90a64..00000000 --- a/build/test/key/idp/cert2.cer +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFLjCCAxYCCQCqGHhTssya9jANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJI -SzESMBAGA1UECAwJSG9uZyBLb25nMRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNV -BAoMB3NhbWxpZnkxEDAOBgNVBAMMB3NhbWxpZnkwHhcNMjAwNTEwMTUyNjIzWhcN -MzAwNTA4MTUyNjIzWjBZMQswCQYDVQQGEwJISzESMBAGA1UECAwJSG9uZyBLb25n -MRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNVBAoMB3NhbWxpZnkxEDAOBgNVBAMM -B3NhbWxpZnkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDQG+abAeeW -jwsOZt5SkcNcw/XSJcjSyJykEbEU2iguErRuOIyBfgj0p1UVBv33uL2igeYJT3OS -XmSjvMO8KvqtYN2tJAjoFjghGr8NbIEZjYS4ukMZUbwxd2bRycD9OMI9g44AUB1s -fQ0UyFwzEOseW3lcW1FnhcizA8TgI0GN4NpdVruNlpgoWdP3w+Syhtq0rWebY8g/ -HGFruEKn8VwbUblOZdP7jNVXsd1aUMScpuMa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d1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwv -ICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA== ------END CERTIFICATE----- diff --git a/build/test/key/idp/encryptKey.pem b/build/test/key/idp/encryptKey.pem deleted file mode 100644 index de728a44..00000000 --- a/build/test/key/idp/encryptKey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,FACBF89A697AB50A - -i0RiFM9TTHzN/atuOBWhAfoty7rMEgNVVsyeoAPqQZoGwBTmOSbMZ+3vLR3jc7Xi -GJ4NtXOux2IcNy5rcYnL3SgZIANVakfEUwF6qwBLCGYbOaqWqEv4eHvz9JHIH9iC -0w4PPMzA2Q4daWiRw1UGr4Kik2iqfkDGv4JPdUDY7/KNlD4hpthRk6axUg+XbJat -swCijv0NGrU//MRGCpqnt4q5ApoZ5Yg4jIbc9JG95ZoZ9+eVZJa1l9ZyYyw6bJ6+ -0iinwWC59qX4soWzvBPvXMzJpgSPAtDrhNKMU4mLPD6+1fLVsc5POzjAuGqDRNcV -bJb/nftu3/MNasXI0PI37RM5krOitBfona8YD4T3B5fIa80XBUrPfSpFXqOqCHZQ -H4rHbnletX8mnAAlzBIEzELO5Dspwnd9OvEkHsKdN5BSZ8cKJh6/qIHwejn4DP21 -hvFAkUYrZWpNZsCi7CKZTJBYkwogW7u0u7ki3XiyPxeDJaYSyTxcdiZD2eVmsWdh -wOWU7mfprfcYIJJnslyJ104z5C0Ioj2xp7VHcX4It8DrwzizfPHkvasv9JarILIX -yeST80i7mcxFyAwmuKIVdD+vvNhZeu0OYs15uhcoKH/oIz2dBLk5U+d/hVwV6TlX -v41nDLuXfvqjAh83rz+a+QkjEdtaMDXKkM3ob6u13F+7JZPQ/32VMeiu0hMWwFff -nijXoWZ+gv3hxbI2oy3Gc2Kjj4H8sYBx/Jd+LTtEZzH01wq0oR/2BR2r74ErB2lF -ByD9d9/SJ/+WrIuseJTcLIWARP5t0QDe8NAWEY5KPk6YjvB84jHIAHf+K+fQMKJL -n6ehvRlVZo4a4cP9PPGMEupfSHCNjioRzT92/AAc3+vplZghMd8lNOpCKSs2NlYX -rf1gKanBPwjcH034SbiP3gN8r4j0Pep6RIWBra2FGZtZcNUhLSXZG87Lmf4RGnsJ -TRwbCUPAx21vhkoQPg5/sLh9IQ+7nzCZfs82ke/yXVNNW7KIxchQ8mz54Ji/k2ix -l0q3jRgH3u8LGPOyLwl1h2fusfZjKYZQnjTZw69Xv8kz1dt5iigNlSspwoMm9NI1 -Hj2TEXQJuBi2/Z+J+aDnY8HLPTM1VtXpuJiPmbxcS0kAJIveg9HQDAei26i+l5OM -b4tXGjGCH/HYJxNIFWtAkrRJZjwrKmVF/GWESGvOtpEsm5YiuC5pUt7+fs6eZ+F+ -nzUV2d/2EkA3FKEjAvoQb6QICCFE0SRUGutYYuUZm4AYG3JEeI4JGYpE1h9pGXMz -m1hlV8N9EIJiFdEtGifjAcfHSVHm7m4us5qOG0TiVfSDC3RZCJSxm8pAUJXLaemp -BvoHL8MuJX8bNMMB3JpWW3e3HxrmR8nLk+xZiviggfWBVRxM9YAyb6NPezVFAV0H -YTULqiXGZbpe+Bm6MmJ6LryicIf8E3pyGbQEYtO9iLYfXnJDHud4dKZnXqjo68oc -80EeEm149eVGtYFRiWhjnRGyb6Hdql4u5iLZdaBRIm3Jm0qsHioYBi6SH5ucPM+q -8hSEfoIZiRlSsrjzvko+19lM4/JnHpk/7cihRNpgXBQysGLwSSA626cvgjwEJSJB ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/encryptionCert.cer b/build/test/key/idp/encryptionCert.cer deleted file mode 100644 index d4086bd9..00000000 --- a/build/test/key/idp/encryptionCert.cer +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID6TCCAtGgAwIBAgIJAPQQPsolUypeMA0GCSqGSIb3DQEBCw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fG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6 -kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NW -ixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV -8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz ------END CERTIFICATE----- diff --git a/build/test/key/idp/nocrypt.pem b/build/test/key/idp/nocrypt.pem deleted file mode 100644 index 71dff696..00000000 --- a/build/test/key/idp/nocrypt.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA4NmxaEJ77IbQ9qVA9NSgPvKSjkxNYwJHEnyFKbaTuYbcSD9j -a/QQF0KZPDuIMJ69GpSZuYWersxE7JXh6uInOHQppsB1l/v+TqSiCGy3dlS1Y7DO -yHLGQG1YPAaYGlAZMawrEnwzWOzdpKo1FcFPg4FYz3DYaW3X7y3LfRGFi/elIX78 -ccsfsBz68tIgCWiRoVbfhFZNwn/ysAO5FaVeKHgZ+ci7Rb+dybmdNJomJEC+vd0Y -NE7+SGJegl1ts6Pt0c9QvFUZsf0hs8rvpMLAtsXuKQgyw+i9VtOunIvq+xtVQp4S -X/kYqmlPCn0MsA56hJikJiSQORgq71NFCMXTYwIDAQABAoIBADOGbzr/ETrQYg5D -LDFukBIcsCzfm1Q272ZzFmjKp+t51fzQWc4hLZbG8ip1Ue4iUh9HMjrrPcO8l4bH -ie+zR12OcQT/UXM0kcAfxem8UAZTvwVLPPd+JaQZ6oBG2pAdDsjtNSmVQIb+MIRN -ZMDJfZkbCOjwaQcv3q22hszwOPQrq5nW82ScuZ8k9oAyz5igomGX0jQBkQM8KMzm -cXTJXBVCc/wEjHEjV8Gx1hBaDuIqY0rt6/5R4zLtwgSvT5LvUOIlzFMKACs7RFA2 -pkhfUx786IRbDXnGRPIqlJgYglcQjEh/815jTdsjJ6VDBBtYcEiF4vn0eWl9tp4S -NxzwWoECgYEA/BG+bAMnMuvjtlOnrZF7l7mCMmKvQzhPr8+8zPtuiQKgn0vHtw4z -7u0TcaP35sa7WwZjcwUtSX4Vs1VrlBfNaHUAEgJ6PAxVPMIB537ttxbPER1l4vE8 -ZvGRGYsps+VNfu7XJnaFtq81mbpGsr1qRmaN+OjDs51UbkKd5esPDCECgYEA5FtK -ps3kfe8rkaacFKfbD3tyj9CeZf8A1ovgiWJFi7PCY46Yg+66Vx/aKkzj2rh993Nn -74BgPWszDJHwG15sHyDlxaZHxUAAeWRJClirsS8MuaLOooReA9D3U82w/s5MDviT -aP3CIc/RtpoLk31arCyqF/aT6K2B79EjmzOKzwMCgYEAjpY68T6XXeax2OFZaIVz -NFBrpbTND2k7KmiIlCtmS3qBAZsMTjBqkCzrYs0t3g1szgC/IME87OW1wMwBHrSY -LQ6CC637Fxyi2suj6B+UuIzedP/8MnPjhxf+zEQ8QtbjD3prmgZRfRV/bIZCl7kt -9MTuam7AxUmqCPUF/JkK2gECgYEA4Y8DF+w7i+EYag/mD8kVah+Hs2Jfc2QEkecs -bMdy5mEy21/Yakj+Kly+BBZa4oplcmy99yYY6dHfZMUqI/6KUd0O2MI8Fiv3y/Aw -7VVUkfllWl/kN0cEDkT0aAS+lZF0Mz15bbVpcjhybymN0at6SqL7iBv5UVVBCX7M -6tpoe70CgYEA5TAEHT77eF8falYD7nYKnPUinfx2p6a3J0UAWI33W3CE6K4MTMSN -Q2AxLj1ImFrmDMiPIFa9GeP9DrE/6eeKVI4q0u7kF58XkCammgIJ9GzyCBWfNpVR -rR2ZD+OyCGiqsrL4PqtHxTwRiYymLOuVKvXxZYlDDPN/RlkBINUX0qk= ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey.pem b/build/test/key/idp/privkey.pem deleted file mode 100644 index b63e3eb2..00000000 --- a/build/test/key/idp/privkey.pem +++ /dev/null @@ -1,30 +0,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/6+vlPWMZSHCJkPa4KBT0aUcnEdeFWx2nmrwdrHvETzCYLAzVBSECV -ZoYH0xTkFr/RI2AOAzx701LSuYbnPoCq+w7TXtjPaooZdYVVgrYuI+j4JOlseFS7 -1c9iRiJVPBfnpUNIZdHLw19+k81IJ/FmumiuDhfLS5pwQmtuXkO3DWZDa3UPlV8e -6dmZeP1XGwRLL9VpOKx7NCqZM+CdEt87CXpFFWXdw8tL+3K/2r8w4lHIzBKaVPSS -5uFqXc1vzfP6Qeov31IjeLPE1pWTHNqRPdmvt9Scq9tKS3o18wmLBxOVinOE0cxQ -oddzPd0z5NxNYVayqZORwDdVv6CVXKnrvBSnOFFslZqv1G8/diE5BXxeaAPEMcZE -3lD7MzdoEHK5oL2MXofLWZbNtMkOZLaLqY80zKT1UG3Gs8U44d44aLXO1dBL0HGX -dNfNUaH+IGZf2ccS6OR1RhwIazDZ8qk0XeUwQV588adwC3FUvscVA3eHZa95z4kX -xvHg+ylzRtKRfpSPzB2IVwgV9/rsOg0OmvwhV8+5IQpdcFr+hf2Bn6AVn6H9aX8A -JjycN6KMcHaFa0EUqagGm9tsQLmf/MGCj8sy9am1IbRmFCz5lB5A7P/YLPM2Csjg ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey2.pem b/build/test/key/idp/privkey2.pem deleted file mode 100644 index 333e0cc7..00000000 --- a/build/test/key/idp/privkey2.pem +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEA0BvmmwHnlo8LDmbeUpHDXMP10iXI0sicpBGxFNooLhK0bjiM -gX4I9KdVFQb997i9ooHmCU9zkl5ko7zDvCr6rWDdrSQI6BY4IRq/DWyBGY2EuLpD -GVG8MXdm0cnA/TjCPYOOAFAdbH0NFMhcMxDrHlt5XFtRZ4XIswPE4CNBjeDaXVa7 -jZaYKFnT98PksobatK1nm2PIPxxha7hCp/FcG1G5TmXT+4zVV7HdWlDEnKbjGtJI -c81zwzfkNK8Je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7hXfnGuBylzFDnkqz00pkCWO8Dw5nyvZ/FzA+SaozBJ -aNo7AoIBAQCGlyGlzK8EX44h8Ji/oFTYoLNM/5L4Q/4+P+zHbYLGeDiJJNr7Sc6X -bHheK1oe/5B34YeaQnKDzVNG2Kufv9sHU7pwAJbX54CY4LpW6iCsBEJiiV1JIdgh -iEYwhsnXk49aFS2nlP5qFIAVjy8s/7Qr2l10NwHawpYXlOL9X5KxHVyvORLNT2hY -qM2tc9mJIstrEmwjJ2jMdmatZ6iwBLIIFxZJXxejwOA5Ha1d/9GgYNaJYmSFMSin -yc6tc+aReJpJ6q15OX57SOS5+GkVVDLRaT5dMcx9ppE6mCU5m0fddRV9SGqydXXR -xWBHSCBMpEtQW+NGm6v4RPbU+shoRDidAoIBAQCfNnCjLvLNTfeJ4blQOdGMOiDr -TEyxtF9tAgkzbQefBr6HBVwzfPdywUtf3ZxVxKIsnpYmbGJIKp525/Wtvme7qjp4 -CsdyFO6ZFLEeI8KGKiewGEv5YzvQIpVqoMZ6ucY/WiSvwHSvZuyLZVLHOLGcZRLJ -49jbfhsvrJqWVDC2CmX2oAuH3GF+LUFhkM36zD1d0FrpaZwL2acWErk/N0CNhnNp -H/08579O5MmSjlWh8Eco2wVD1z/A+LSC0YN+04ZrurB7wAebGCsOoEO7M53aan77 -gP2nLQ/cnYHiPrmUlL5s7EDhKnvpNY1W2ViEydwywvg9m4mxOA1sjrYpoNRg ------END RSA PRIVATE KEY----- diff --git a/build/test/key/keypass.txt b/build/test/key/keypass.txt deleted file mode 100644 index 992b010a..00000000 --- a/build/test/key/keypass.txt +++ /dev/null @@ -1,11 +0,0 @@ -Private Key Phrase (SP) - signature -VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px - -Private Key Phrase (SP) - encryption -BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU - -Private Key Phrase (IDP) - signature -q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW - -Private Key Phrase (IDP) - encryption -g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN diff --git a/build/test/key/sp/cert.cer b/build/test/key/sp/cert.cer deleted file mode 100644 index 5975ac46..00000000 --- a/build/test/key/sp/cert.cer +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV -BAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQK -DApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNv -bTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhL -MRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2Rl -LXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZq -ClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPs -tBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15 -qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QB -o7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZ -ApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEA -AaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaA -FEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL -BQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+ -uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1i -JmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq -2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uL -EpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNr -vk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= ------END CERTIFICATE----- diff --git a/build/test/key/sp/encryptKey.pem b/build/test/key/sp/encryptKey.pem deleted file mode 100644 index f6660ad6..00000000 --- a/build/test/key/sp/encryptKey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,860FDB9F3BE14699 - -bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRy -QCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVl -kkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW0 -08OHTouRK33Aifx0A3MWxR0ILvw49E6urtbbIrskEzKzfWQug8gY1TJhI3sbsMsI -1bS5Vg88TvilFFBGn0Yv6GEJjgOrsrKDGKtYGhuBfK4fd4rwnQKKvC6gTKeNXIfV -7Qm1R20LUJXC8zv35pdKoVk+NdS/MGNXJRFgO3Kkp01aVf3n1oo2+AllS02AYyWt -1svHecsRwbibXip8gSQsOtDdpqQrEDyqZlFHXEw/IcJE9vQWEJmpHD5GFhbKtttp -E0B3ZtNl6YcyUz0rSf9zjuMx/wReWdRb6H2WoIqoRS7vAUONDRPt7wvfjtLlDRVi -bc2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6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 ------END RSA PRIVATE KEY----- diff --git a/build/test/key/sp/encryptionCert.cer b/build/test/key/sp/encryptionCert.cer deleted file mode 100644 index 719fff80..00000000 --- a/build/test/key/sp/encryptionCert.cer +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID7TCCAtWgAwIBAgIJANSq1uUtXl4DMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV -BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFjAUBgNVBAoTDWV4cHJlc3Mtc2Ft -bDIxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWwwHhcNMTUxMDAzMDM0ODA2 -WhcNMTgxMDAyMDM0ODA2WjBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBL -b25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNV -BAMTBWVzYW1sMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyx/yIgvJ -wfOCwMTNjL4Fslr21ky4O/uzxp0Y8wpHk9jk8Afcj3plQCr5X8dPKG2Rz4EIh//n -QQL9tq2InaUdRwJkS9SeuuAcJG7DN/KDUtfrh4+cO2lZ4h7cQIdjpbBgpGEMhGy1 -wwpwHJsadoBuX0PKyT4O4oHkj1gwWO14qYnK4biviNBqmjGjmN+py+lUcACsQt22 -abA4s8Xjm/tlvnkgNRE3H44ICvSr8m5MVhyYGoAUe7Qprn2BcsMXd9mrlZ5hEdal -NUDRbKb+W7mrKEkKFCbE3wi/Ns2bc4fbNXvwcZoF3/TPzl936u2eivTQESjCLsym -IqdYHwRiVLifWQIDAQABo4G7MIG4MB0GA1UdDgQWBBSdBiMAVhKrjzd72sncR13i -mevq/DCBiAYDVR0jBIGAMH6AFJ0GIwBWEquPN3vaydxHXeKZ6+r8oVukWTBXMQsw -CQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNz -LXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG -5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdK -nK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5O -fS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRb -j/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+ -gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0 -NA== ------END CERTIFICATE----- diff --git a/build/test/key/sp/knownGoodCert.cer b/build/test/key/sp/knownGoodCert.cer deleted file mode 100644 index 690818b6..00000000 --- a/build/test/key/sp/knownGoodCert.cer +++ /dev/null @@ -1 +0,0 @@ -MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/key/sp/knownGoodEncryptKey.pem b/build/test/key/sp/knownGoodEncryptKey.pem deleted file mode 100644 index b45a5f0f..00000000 --- a/build/test/key/sp/knownGoodEncryptKey.pem +++ /dev/null @@ -1 +0,0 @@ -Proc-Type:4,ENCRYPTEDDEK-Info:DES-EDE3-CBC,860FDB9F3BE14699bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRyQCnJhbpcSnaz9pvI7EzeJzdykDm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ZOcNxg8YCbGlJgJHnRVhA202kNT5ORplcRKqaOaO9LK7491gaaShjaspg4THDnH+HHFORmbgwyO9P74wuw+n6tI40Ia3qzRLVz6sJBQMtLEN+cvNoNi3KYkNjGJM1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4cAUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5SLvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBnyISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 diff --git a/build/test/key/sp/privkey.pem b/build/test/key/sp/privkey.pem deleted file mode 100644 index c60dfcf1..00000000 --- a/build/test/key/sp/privkey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,9C86371F0420A091 - -77TqgiK/IYRgO5w3ZMyV81/gk0zN5wPTGWxoztNFjQKXCySFnrL30kUqlGituBxX -VgxwXbkoYMrd5MoDZKL5EJuf0H59hq92O0+3uwJA8QyZjOm4brQcjXKmIrkvihgs -FvpaJiGzp6kS/O7vFBDNTQWr9yY9Y3FBPcmOUWufpRp4Q5nhpSlqnMmIqZyWQUL/ -YJSJETtzJVsk38lCqIxxDT3LtbGySahj0jRuRqspAZQeLTpnJqzNMC4vnJew9luC -R+UffrX7gVsnwOhNtyRzYaMsLnbRfXT8Jqx2gRHg36GxkOVgyU7e62nk9CzeC0WA -kHHCNVqqivRx9/EC0mQkkRgRzo3BZWp0o671sUsGTy57JhktiGfTnWMrl7ZfhAza -SZnjyTwuI1bTQipIkNI3aJBTP/o/gNUE1sj5D5FZlFdpq5ks2Vxww3GNx1FRrvWd -98z5C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q4kKjR6uuHUOLyjk/xhqslV4TS -jnnjCjsK5YzTa4hmbHhPZIW262KoFV9TqxYKkhP5ab7AXRSakrdrY2cwACWN4AMT ------END RSA PRIVATE KEY----- diff --git a/build/test/misc/attack_response_signed.xml b/build/test/misc/attack_response_signed.xml deleted file mode 100644 index 1e05a9a6..00000000 --- a/build/test/misc/attack_response_signed.xml +++ /dev/null @@ -1 +0,0 @@ -evil@evil.comhttps://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN9ltO2neTz9pqd0BA1BKIi7PjQYN+F7dB/ffG7V8VjNoPMROrHzq6sY3Ondtv7w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/dumpes_issuer_response.xml b/build/test/misc/dumpes_issuer_response.xml deleted file mode 100644 index 5964bfaf..00000000 --- a/build/test/misc/dumpes_issuer_response.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - http://www.okta.com/dummyIssuer - - - - - - - - - - - - - Spr+5HzbZxSt8I3vCY4rTBu+glE= - - - - signatureValue - - - - stuff - - - - - - - - - http://www.okta.com/dummyIssuer - - email@email.com - - - - - - - - api.com - - - - - urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient - - - - - - - email@email.com - - - - - diff --git a/build/test/misc/failed_response.xml b/build/test/misc/failed_response.xml deleted file mode 100644 index 67b258cd..00000000 --- a/build/test/misc/failed_response.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadata \ No newline at end of file diff --git a/build/test/misc/false_signed_request_sha1.xml b/build/test/misc/false_signed_request_sha1.xml deleted file mode 100644 index c640fe36..00000000 --- a/build/test/misc/false_signed_request_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqTok8LXPuq1A==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha256.xml b/build/test/misc/false_signed_request_sha256.xml deleted file mode 100644 index e385bd29..00000000 --- a/build/test/misc/false_signed_request_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost: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wrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha512.xml b/build/test/misc/false_signed_request_sha512.xml deleted file mode 100644 index 3d690ab4..00000000 --- a/build/test/misc/false_signed_request_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPW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LdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/idpmeta.xml b/build/test/misc/idpmeta.xml deleted file mode 100644 index e81c9889..00000000 --- a/build/test/misc/idpmeta.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2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QX60cCrFN4m3SNS98HGBEdotch8+2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_nosign.xml b/build/test/misc/idpmeta_nosign.xml deleted file mode 100644 index a30a4284..00000000 ---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B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_onelogoutservice.xml b/build/test/misc/idpmeta_onelogoutservice.xml deleted file mode 100644 index c6d3af95..00000000 --- a/build/test/misc/idpmeta_onelogoutservice.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7m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ML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - diff --git a/build/test/misc/idpmeta_rollingcert.xml b/build/test/misc/idpmeta_rollingcert.xml deleted file mode 100644 index bf8da7dc..00000000 --- a/build/test/misc/idpmeta_rollingcert.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwL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AKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_share_cert.xml b/build/test/misc/idpmeta_share_cert.xml deleted file mode 100644 index 33b0d5b3..00000000 --- a/build/test/misc/idpmeta_share_cert.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxOD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ress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/invalid_response.xml b/build/test/misc/invalid_response.xml deleted file mode 100644 index 7caf8d0b..00000000 --- a/build/test/misc/invalid_response.xml +++ /dev/null @@ -1,6 +0,0 @@ - - https://idp.example.com/metadata - - - - diff --git a/build/test/misc/logout_request.xml b/build/test/misc/logout_request.xml deleted file mode 100644 index db678cc7..00000000 --- a/build/test/misc/logout_request.xml +++ /dev/null @@ -1,4 +0,0 @@ - - http://sp.example.com/metadata - f92cc1834efc0f73e9c09f482fce80037a6251e7 - diff --git a/build/test/misc/multiple_entitydescriptor.xml b/build/test/misc/multiple_entitydescriptor.xml deleted file mode 100644 index 76659103..00000000 --- a/build/test/misc/multiple_entitydescriptor.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/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NVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - diff --git a/build/test/misc/request.xml b/build/test/misc/request.xml deleted file mode 100644 index 9bafb7d8..00000000 --- a/build/test/misc/request.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Password diff --git a/build/test/misc/response.xml b/build/test/misc/response.xml deleted file mode 100644 index fd3436ae..00000000 --- a/build/test/misc/response.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 diff --git a/build/test/misc/response_signed.xml b/build/test/misc/response_signed.xml deleted file mode 100644 index ebaa1d16..00000000 --- a/build/test/misc/response_signed.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN9ltO2neTz9pqd0BA1BKIi7PjQYN+F7dB/ffG7V8VjNoPMROrHzq6sY3Ondtv7w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLR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FA= diff --git a/build/test/misc/response_signed_cert1.xml b/build/test/misc/response_signed_cert1.xml deleted file mode 100644 index e5790248..00000000 --- a/build/test/misc/response_signed_cert1.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=GZSDF9T0TMTe5nkZspOBlc6+j+lon0eHjViy765ty0tM7F47qgDVWTiC2x326Iz8One12XKKbUHxMvqABnI77aNSJ0/BADFJLoH+mgPuSsgcZygTAWmKdn1bR/3zydMtkMIbP9JXB2VEF7a7KnnnjGcM2OXmdxanhe5J2vtrBWCrxt0QZOLaEsxQmCHosKizVhOnO5JehNqqkf9M4yp7acIsIVhCg21YYqnuAWMsve8qReryF31189TdsV9KO8uB0rufBsxl/dzNnMG74Rgq4mS3QjPI7N/WpXzZZk8vPe38FYEsFA5lmeIsdMxnlbbUEPJFwzWM72xEmMgo12+y4A==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/response_signed_cert2.xml b/build/test/misc/response_signed_cert2.xml deleted file mode 100644 index 1686dab3..00000000 --- a/build/test/misc/response_signed_cert2.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=JgrKOwRaj4swHYgLra3MOG92BeekCyRgbDf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NwfoAQ+/16kTpJvoYbOXUPv5yCA3mIuqYeA1woaWPXsE4jNOzTqv1qOZQTvXProEgK5B0FR5ILc4mfNrD2p9VGbiYf2GjCfeEzDFg174dvSn2MMp1yK5pvZEp7yFE8z1eduYN6W/7qdtss9BGpnyS5X7LuYfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwvICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA==https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_request_sha1.xml b/build/test/misc/signed_request_sha1.xml deleted file mode 100644 index 7df1a59f..00000000 --- a/build/test/misc/signed_request_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqT1ok8LXPuq1A== diff --git a/build/test/misc/signed_request_sha256.xml b/build/test/misc/signed_request_sha256.xml deleted file mode 100644 index 675b732a..00000000 --- a/build/test/misc/signed_request_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OT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lNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_request_sha512.xml b/build/test/misc/signed_request_sha512.xml deleted file mode 100644 index 49800cb2..00000000 --- a/build/test/misc/signed_request_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEUmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPWQ6/2guvqw==MIIDozCCAougAwIBAgIJAKNsmL8Qb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jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_response_sha1.xml b/build/test/misc/signed_response_sha1.xml deleted file mode 100644 index 120a657d..00000000 --- a/build/test/misc/signed_response_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataCocGj4j5psQ0OfZ1mOlAdQkfwjTqCb95tNqpiFtt6qhTlnn+1IIp9pDpMLubomf9LWwX176PPLWFYxsRmqyEBYlhT53hgAF+z2fEgJdlxXF7FYKsnsn+ujC0ZJP3QkUlWGT9eo74i67JrkAwmiOXPHBJAAN040L/uqmYgjqdnGIFZAyTk4SwplECf1yzVxh4wkETpkf1na1VgTpFC3QDHpXVmCdTbq4FgtgNyfcZmr10d81rmSLjwfHJswV8Qg+cuxXODcn0rxDA5ZA3abpIxGwHUMtKP8ak4amY1urWQTXkhaFjZIChA6E4p870MzfmzVExG6p8/svKf2vDHTAH0w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha256.xml b/build/test/misc/signed_response_sha256.xml deleted file mode 100644 index 928dcc90..00000000 --- a/build/test/misc/signed_response_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadata0TJreH5fvSPwTL8cMGtvYkc8mDQDirHL/0KAU0PPjWXKUqyWSVi7FtDhnAuU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wK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha512.xml b/build/test/misc/signed_response_sha512.xml deleted file mode 100644 index 8f268a99..00000000 --- a/build/test/misc/signed_response_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataRkgzPlU7snHmrHTA6tCt0DRqQFyQeNypGIFzaY+2/6OLsNNH0B4gdBWYUWrwMpOGNqHr9Wo+th248ABVoUBtbdQ2pT8M49D0JDGwvl6L8CscTK0xzLGaqaAhHwszmk61WGVOxrbkiZQqOQA8VDiua5bDoXOqiCqEIB6TlSuJ+HH4Lc6u10WSXChI5iC9YwsHoWS8tqFLw6rsx4qPx4hFkZfBUh6JFZNT8hsWiSr4y6d359SIkRgkPUd85+I/3Od//al4HLnIjXaDsahO/YZ9AlvOnBxjUEuk/7kuxZ91LDeI6I8ekno83+ndhk34tnaBc3l1uGeHNhJhpY3eK+LiCw==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqG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PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/sp_metadata_98.xml b/build/test/misc/sp_metadata_98.xml deleted file mode 100644 index 40814588..00000000 --- a/build/test/misc/sp_metadata_98.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - - - \ No newline at end of file diff --git a/build/test/misc/spmeta.xml b/build/test/misc/spmeta.xml deleted file mode 100644 index 81068842..00000000 --- a/build/test/misc/spmeta.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLD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vJwfOCwMTNjL4Fslr21ky4O/uzxp0Y8wpHk9jk8Afcj3plQCr5X8dPKG2Rz4EIh//nQQL9tq2InaUdRwJkS9SeuuAcJG7DN/KDUtfrh4+cO2lZ4h7cQIdjpbBgpGEMhGy1wwpwHJsadoBuX0PKyT4O4oHkj1gwWO14qYnK4biviNBqmjGjmN+py+lUcACsQt22abA4s8Xjm/tlvnkgNRE3H44ICvSr8m5MVhyYGoAUe7Qprn2BcsMXd9mrlZ5hEdalNUDRbKb+W7mrKEkKFCbE3wi/Ns2bc4fbNXvwcZoF3/TPzl936u2eivTQESjCLsymIqdYHwRiVLifWQIDAQABo4G7MIG4MB0GA1UdDgQWBBSdBiMAVhKrjzd72sncR13imevq/DCBiAYDVR0jBIGAMH6AFJ0GIwBWEquPN3vaydxHXeKZ6+r8oVukWTBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - - - diff --git a/build/test/misc/spmeta_noassertsign.xml b/build/test/misc/spmeta_noassertsign.xml deleted file mode 100644 index 984917ed..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BXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - diff --git a/build/test/misc/spmeta_noauthnsign.xml b/build/test/misc/spmeta_noauthnsign.xml deleted file mode 100644 index 0fc8d2c6..00000000 --- a/build/test/misc/spmeta_noauthnsign.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - diff --git a/package.json b/package.json index 27c8da74..344e36e7 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "pretest": "make pretest", "test": "NODE_ENV=test nyc ava", "coverage": "nyc report --reporter=text-lcov | coveralls", - "hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit" + "hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit", + "prettier": "prettier --write ." }, "contributors": [ "Tony Ngan ", diff --git a/src/entity.ts b/src/entity.ts index aec0fc7e..04cc42c1 100644 --- a/src/entity.ts +++ b/src/entity.ts @@ -133,7 +133,7 @@ export default class Entity { } if (isNonEmptyArray(field)) { let res = true; - (field as string[]).forEach((f:string) => { + (field as string[]).forEach((f: string) => { if (f !== metaField) { res = false; return; diff --git a/src/libsaml.ts b/src/libsaml.ts index 4e86be26..8ee70245 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -260,7 +260,9 @@ const libSaml = () => { */ replaceTagsByValue(rawXML: string, tagValues: any): string { Object.keys(tagValues).forEach((t: string) => { - rawXML = rawXML.replace(new RegExp(`{${t}}`, "g"), tagValues[t]); + if (typeof tagValues[t] !== "undefined") { + rawXML = rawXML.replace(new RegExp(`{${t}}`, "g"), tagValues[t]); + } }); return rawXML; }, diff --git a/test/extractor.ts b/test/extractor.ts index ce457227..24dbd88c 100644 --- a/test/extractor.ts +++ b/test/extractor.ts @@ -89,7 +89,9 @@ const _spmeta: string = String(readFileSync("./test/misc/spmeta.xml")); ]); t.is(result.issuer.length, 1); t.is( - result.issuer.every((i:string) => i === "https://idp.example.com/metadata"), + result.issuer.every( + (i: string) => i === "https://idp.example.com/metadata" + ), true ); }); diff --git a/tsconfig.json b/tsconfig.json index a882a3f6..29d5b4be 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,6 @@ { "compilerOptions": { - "lib": [ - "dom", - "es2015.core", - "es2015.promise", - "es2015.iterable", - "es5" - ], + "lib": ["dom", "es2015.core", "es2015.promise", "es2015.iterable", "es5"], "target": "es5", "module": "commonjs", "moduleResolution": "node", @@ -25,11 +19,7 @@ "atom": { "rewriteTsconfig": false }, - "exclude": [ - "node_modules", - "types/**/*.ts", - "test/**/*.ts" - ], + "exclude": ["node_modules", "types/**/*.ts", "test/**/*.ts"], "compileOnSave": false, "buildOnSave": false } From b30270c21db5c017083ad87171e6e5533d4522b4 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Fri, 17 Jul 2020 04:28:34 +0400 Subject: [PATCH 20/26] 2.7.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 344e36e7..2bc3407a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.7", + "version": "2.7.8", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From 7bc3cea5350e151d163951929847d6fc2c01f150 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Fri, 17 Jul 2020 04:44:57 +0400 Subject: [PATCH 21/26] chore: replace undefined attribute with empty xml value --- README.md | 1 - build/libsaml.js | 6 +++--- build/libsaml.js.map | 2 +- src/libsaml.ts | 9 ++++++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 81f141c2..b6a70ff6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ Highly configuarable Node.js SAML 2.0 library for Single Sign On Welcome all PRs for maintaining this project, or provide a link to the repositories especially for use cases alongside with different frameworks. - ### Installation To install the stable version diff --git a/build/libsaml.js b/build/libsaml.js index bec4a5fd..85b345b6 100644 --- a/build/libsaml.js +++ b/build/libsaml.js @@ -176,9 +176,9 @@ var libSaml = function () { */ replaceTagsByValue: function (rawXML, tagValues) { Object.keys(tagValues).forEach(function (t) { - if (typeof tagValues[t] !== "undefined") { - rawXML = rawXML.replace(new RegExp("{" + t + "}", "g"), tagValues[t]); - } + rawXML = rawXML.replace(new RegExp("{" + t + "}", "g"), typeof tagValues[t] === "undefined" + ? "" + : tagValues[t]); }); return rawXML; }, diff --git a/build/libsaml.js.map b/build/libsaml.js.map index cec98377..2a62fdd1 100644 --- a/build/libsaml.js.map +++ b/build/libsaml.js.map @@ -1 +1 @@ -{"version":3,"file":"libsaml.js","s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AC;oBACrD,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxD,OAAO,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;gBACxC,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACD;;WAEG;QACG,UAAU,EAAhB,UAAiB,KAAa;;;;;;4BAEpB,QAAQ,GAAK,gBAAU,EAAE,SAAjB,CAAkB;4BAElC;;;;;+BAKG;4BACH,IAAI,CAAC,QAAQ,EAAE;gCACb,qCAAqC;gCACrC,sBAAO,OAAO,CAAC,MAAM,CACnB,+LAA+L,CAChM,EAAC;6BACH;;;;4BAGQ,qBAAM,QAAQ,CAAC,KAAK,CAAC,EAAA;gCAA5B,sBAAO,SAAqB,EAAC;;;4BAE7B,MAAM,GAAC,CAAC;;;;;SAEX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/src/libsaml.ts b/src/libsaml.ts index 8ee70245..1145c4af 100644 --- a/src/libsaml.ts +++ b/src/libsaml.ts @@ -260,9 +260,12 @@ const libSaml = () => { */ replaceTagsByValue(rawXML: string, tagValues: any): string { Object.keys(tagValues).forEach((t: string) => { - if (typeof tagValues[t] !== "undefined") { - rawXML = rawXML.replace(new RegExp(`{${t}}`, "g"), tagValues[t]); - } + rawXML = rawXML.replace( + new RegExp(`{${t}}`, "g"), + typeof tagValues[t] === "undefined" + ? "" + : tagValues[t] + ); }); return rawXML; }, From b9beaf1e05fb3b76d1c8e15b7e0cb5e5e3649ed4 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Fri, 17 Jul 2020 04:45:01 +0400 Subject: [PATCH 22/26] chore: replace undefined attribute with empty xml value --- build/test/key/idp/README.md | 4 ++ build/test/key/idp/cert.cer | 22 +++++++ build/test/key/idp/cert2.cer | 30 +++++++++ build/test/key/idp/encryptKey.pem | 30 +++++++++ build/test/key/idp/encryptionCert.cer | 23 +++++++ build/test/key/idp/nocrypt.pem | 27 ++++++++ build/test/key/idp/privkey.pem | 30 +++++++++ build/test/key/idp/privkey2.pem | 51 +++++++++++++++ build/test/key/keypass.txt | 11 ++++ build/test/key/sp/cert.cer | 22 +++++++ build/test/key/sp/encryptKey.pem | 30 +++++++++ build/test/key/sp/encryptionCert.cer | 24 +++++++ build/test/key/sp/knownGoodCert.cer | 1 + build/test/key/sp/knownGoodEncryptKey.pem | 1 + build/test/key/sp/privkey.pem | 30 +++++++++ build/test/misc/attack_response_signed.xml | 1 + build/test/misc/dumpes_issuer_response.xml | 65 +++++++++++++++++++ build/test/misc/failed_response.xml | 1 + build/test/misc/false_signed_request_sha1.xml | 1 + .../test/misc/false_signed_request_sha256.xml | 1 + .../test/misc/false_signed_request_sha512.xml | 1 + build/test/misc/idpmeta.xml | 34 ++++++++++ build/test/misc/idpmeta_nosign.xml | 27 ++++++++ build/test/misc/idpmeta_onelogoutservice.xml | 33 ++++++++++ build/test/misc/idpmeta_rollingcert.xml | 39 +++++++++++ build/test/misc/idpmeta_share_cert.xml | 27 ++++++++ build/test/misc/invalid_response.xml | 6 ++ build/test/misc/logout_request.xml | 4 ++ build/test/misc/multiple_entitydescriptor.xml | 37 +++++++++++ build/test/misc/request.xml | 1 + build/test/misc/response.xml | 1 + build/test/misc/response_signed.xml | 1 + build/test/misc/response_signed_cert1.xml | 1 + build/test/misc/response_signed_cert2.xml | 1 + build/test/misc/signed_request_sha1.xml | 1 + build/test/misc/signed_request_sha256.xml | 1 + build/test/misc/signed_request_sha512.xml | 1 + build/test/misc/signed_response_sha1.xml | 1 + build/test/misc/signed_response_sha256.xml | 1 + build/test/misc/signed_response_sha512.xml | 1 + build/test/misc/sp_metadata_98.xml | 6 ++ build/test/misc/spmeta.xml | 27 ++++++++ build/test/misc/spmeta_noassertsign.xml | 32 +++++++++ build/test/misc/spmeta_noauthnsign.xml | 25 +++++++ 44 files changed, 714 insertions(+) create mode 100644 build/test/key/idp/README.md create mode 100644 build/test/key/idp/cert.cer create mode 100644 build/test/key/idp/cert2.cer create mode 100644 build/test/key/idp/encryptKey.pem create mode 100644 build/test/key/idp/encryptionCert.cer create mode 100644 build/test/key/idp/nocrypt.pem create mode 100644 build/test/key/idp/privkey.pem create mode 100644 build/test/key/idp/privkey2.pem create mode 100644 build/test/key/keypass.txt create mode 100644 build/test/key/sp/cert.cer create mode 100644 build/test/key/sp/encryptKey.pem create mode 100644 build/test/key/sp/encryptionCert.cer create mode 100644 build/test/key/sp/knownGoodCert.cer create mode 100644 build/test/key/sp/knownGoodEncryptKey.pem create mode 100644 build/test/key/sp/privkey.pem create mode 100644 build/test/misc/attack_response_signed.xml create mode 100644 build/test/misc/dumpes_issuer_response.xml create mode 100644 build/test/misc/failed_response.xml create mode 100644 build/test/misc/false_signed_request_sha1.xml create mode 100644 build/test/misc/false_signed_request_sha256.xml create mode 100644 build/test/misc/false_signed_request_sha512.xml create mode 100644 build/test/misc/idpmeta.xml create mode 100644 build/test/misc/idpmeta_nosign.xml create mode 100644 build/test/misc/idpmeta_onelogoutservice.xml create mode 100644 build/test/misc/idpmeta_rollingcert.xml create mode 100644 build/test/misc/idpmeta_share_cert.xml create mode 100644 build/test/misc/invalid_response.xml create mode 100644 build/test/misc/logout_request.xml create mode 100644 build/test/misc/multiple_entitydescriptor.xml create mode 100644 build/test/misc/request.xml create mode 100644 build/test/misc/response.xml create mode 100644 build/test/misc/response_signed.xml create mode 100644 build/test/misc/response_signed_cert1.xml create mode 100644 build/test/misc/response_signed_cert2.xml create mode 100644 build/test/misc/signed_request_sha1.xml create mode 100644 build/test/misc/signed_request_sha256.xml create mode 100644 build/test/misc/signed_request_sha512.xml create mode 100644 build/test/misc/signed_response_sha1.xml create mode 100644 build/test/misc/signed_response_sha256.xml create mode 100644 build/test/misc/signed_response_sha512.xml create mode 100644 build/test/misc/sp_metadata_98.xml create mode 100644 build/test/misc/spmeta.xml create mode 100644 build/test/misc/spmeta_noassertsign.xml create mode 100644 build/test/misc/spmeta_noauthnsign.xml diff --git a/build/test/key/idp/README.md b/build/test/key/idp/README.md new file mode 100644 index 00000000..6e789d68 --- /dev/null +++ b/build/test/key/idp/README.md @@ -0,0 +1,4 @@ +## Support the use case of rolling certificate + +- `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` +- `privkey2.pem` - no password protected, it generates `cert2.cer` diff --git a/build/test/key/idp/cert.cer b/build/test/key/idp/cert.cer new file mode 100644 index 00000000..b1b40e6d --- /dev/null +++ b/build/test/key/idp/cert.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV +BAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQ +cm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0x +NTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYD +VQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIG +A1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG +3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZU +tWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3 +pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRA +vr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsb +VUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0O +BBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwd +wK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPN +mHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUw +i1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef +2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0a +zkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWW +k1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4 +yyoWAJDUHiAmvFA= +-----END CERTIFICATE----- diff --git a/build/test/key/idp/cert2.cer b/build/test/key/idp/cert2.cer new file mode 100644 index 00000000..46c90a64 --- /dev/null +++ b/build/test/key/idp/cert2.cer @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFLjCCAxYCCQCqGHhTssya9jANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJI +SzESMBAGA1UECAwJSG9uZyBLb25nMRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNV +BAoMB3NhbWxpZnkxEDAOBgNVBAMMB3NhbWxpZnkwHhcNMjAwNTEwMTUyNjIzWhcN +MzAwNTA4MTUyNjIzWjBZMQswCQYDVQQGEwJISzESMBAGA1UECAwJSG9uZyBLb25n +MRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNVBAoMB3NhbWxpZnkxEDAOBgNVBAMM +B3NhbWxpZnkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDw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B0BoyIcUxo+fZ8vCA4xEVBenVBadpFbwum6+XeTkvDoRc4sSCp +m8v2qtprc8aU/0F82EzxSybYvstc5lDv7wuwCwNwfoAQ+/16kTpJvoYbOXUPv5yC +A3mIuqYeA1woaWPXsE4jNOzTqv1qOZQTvXProEgK5B0FR5ILc4mfNrD2p9VGbiYf +2GjCfeEzDFg174dvSn2MMp1yK5pvZEp7yFE8z1eduYN6W/7qdtss9BGpnyS5X7Lu +YfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwv +ICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA== +-----END CERTIFICATE----- diff --git a/build/test/key/idp/encryptKey.pem b/build/test/key/idp/encryptKey.pem new file mode 100644 index 00000000..de728a44 --- /dev/null +++ b/build/test/key/idp/encryptKey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,FACBF89A697AB50A + +i0RiFM9TTHzN/atuOBWhAfoty7rMEgNVVsyeoAPqQZoGwBTmOSbMZ+3vLR3jc7Xi +GJ4NtXOux2IcNy5rcYnL3SgZIANVakfEUwF6qwBLCGYbOaqWqEv4eHvz9JHIH9iC +0w4PPMzA2Q4daWiRw1UGr4Kik2iqfkDGv4JPdUDY7/KNlD4hpthRk6axUg+XbJat +swCijv0NGrU//MRGCpqnt4q5ApoZ5Yg4jIbc9JG95ZoZ9+eVZJa1l9ZyYyw6bJ6+ +0iinwWC59qX4soWzvBPvXMzJpgSPAtDrhNKMU4mLPD6+1fLVsc5POzjAuGqDRNcV +bJb/nftu3/MNasXI0PI37RM5krOitBfona8YD4T3B5fIa80XBUrPfSpFXqOqCHZQ +H4rHbnletX8mnAAlzBIEzELO5Dspwnd9OvEkHsKdN5BSZ8cKJh6/qIHwejn4DP21 +hvFAkUYrZWpNZsCi7CKZTJBYkwogW7u0u7ki3XiyPxeDJaYSyTxcdi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rjzvko+19lM4/JnHpk/7cihRNpgXBQysGLwSSA626cvgjwEJSJB +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/encryptionCert.cer b/build/test/key/idp/encryptionCert.cer new file mode 100644 index 00000000..d4086bd9 --- /dev/null +++ b/build/test/key/idp/encryptionCert.cer @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID6TCCAtGgAwIBAgIJAPQQPsolUypeMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFTATBgNVBAoTDGV4cHJlc3Mtc2Ft +bDEMMAoGA1UECxMDZGV2MQ4wDAYDVQQDEwVlc2FtbDAeFw0xNTEwMDMwMzU3MzRa +Fw0xODEwMDIwMzU3MzRaMFYxCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv +bmcxFTATBgNVBAoTDGV4cHJlc3Mtc2FtbDEMMAoGA1UECxMDZGV2MQ4wDAYDVQQD +EwVlc2FtbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL7dF1gUNu8e +n0fHMSbzf192uB8m2CTeHeEeYrmq5rau6t1WzaHwbSStd9tJ/11Arm8f8zfefFqE +BA0EYbp/DMqHb9ZiLGgIff08679NOYeK/d9EAs5DzvTMTR6QqG7a4vH3jKOksIbj +M35h5RVitVDxo+xWDKyvOpuNE64bJlWHOEiNxvwmcHfJ2hAd1EozaRLcJOojFHg5 +1alUqiNIZ+vpkMAM8s3lUlcYETKqTpcnsE7c1QX60cCrFN4m3SNS98HGBEdotch8 ++2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2 +i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdb +P9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYD +VQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNh +bWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZe +ZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H +7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6 +kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NW +ixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV +8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz +-----END CERTIFICATE----- diff --git a/build/test/key/idp/nocrypt.pem b/build/test/key/idp/nocrypt.pem new file mode 100644 index 00000000..71dff696 --- /dev/null +++ b/build/test/key/idp/nocrypt.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEA4NmxaEJ77IbQ9qVA9NSgPvKSjkxNYwJHEnyFKbaTuYbcSD9j +a/QQF0KZPDuIMJ69GpSZuYWersxE7JXh6uInOHQppsB1l/v+TqSiCGy3dlS1Y7DO +yHLGQG1YPAaYGlAZMawrEnwzWOzdpKo1FcFPg4FYz3DYaW3X7y3LfRGFi/elIX78 +ccsfsBz68tIgCWiRoVbfhFZNwn/ysAO5FaVeKHgZ+ci7Rb+dybmdNJomJEC+vd0Y +NE7+SGJegl1ts6Pt0c9QvFUZsf0hs8rvpMLAtsXuKQgyw+i9VtOunIvq+xtVQp4S +X/kYqmlPCn0MsA56hJikJiSQORgq71NFCMXTYwIDAQABAoIBADOGbzr/ETrQYg5D +LDFukBIcsCzfm1Q272ZzFmjKp+t51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TMSN +Q2AxLj1ImFrmDMiPIFa9GeP9DrE/6eeKVI4q0u7kF58XkCammgIJ9GzyCBWfNpVR +rR2ZD+OyCGiqsrL4PqtHxTwRiYymLOuVKvXxZYlDDPN/RlkBINUX0qk= +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey.pem b/build/test/key/idp/privkey.pem new file mode 100644 index 00000000..b63e3eb2 --- /dev/null +++ b/build/test/key/idp/privkey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,116B0EBB2F2F0A9D + +HMmUsJPVPTsq1e06yrrskfinY21OOHosfRzibLueBg9ByFFZ7+/oW/DKy1GcDeBc +ycL+3gylIoGUYuZ+DPC11ArjdxFqLFnHJb96rwy5h4sTP0lE+qHy+06AwsowUgp3 +pdD2unPFeydpu5h/dqgoDzkGSucz0Ty/spHXNBvns0vJO18B7XlzXUtfH5aHco22 +DyVY6FrJwMts9E4Rzs9JsxJJ7mi/6+Qsc0rOr8/6KKsRo1sKD6cvQIQ05dEvGrE9 +/2fubHkRTl+zBqOVyQvC6iUtocwxlMP4KfmyYrD1wlQAnP/+smq2G+xf7uGc4X4P +8q0jEy2P9n5ASlwZ3XCS9hZgp8VRAcXWOYjzzNouQp3NEP9d5D3wN4aFKa/JW6pk +a6VwraEweuyJqvZ7nnam1emW0ge0z7hJabR0+j0PnUxFIwkI5jO3HI5UiuUzuQFe +2bTLA3XnJ7QD08ZKom0rmApbFrmm9BWBRTmt46NlQDy49VODPY4gFuQ/mpaFjaBy +fSNJaOSS/MDuAdPabNEh3l+yCGKtHIbPVIms76PxYf6o0VVxW96/Q25hrvyOJCxn +dVQyyJbQ1jGenu4ViDNrW9ZQfw4aJCPpY7lUQd09BGz2NMKgkrSl8bKSan4lvlF3 +ok8BjfIw+pIrTyesPU5tF0YudDxwi8fbIG70iwrpsSt2wVIMa+Nz2lwFT1dV8be7 +NARkkkhLWJYAsxsyVfdl+ucNSqhvo8xLITuG8CZnzKf0T2HMKnMNegFx/ipfM7ff +Mx5CjayN5Oy99MWsagYEutUGzCGPAuVpqYpJuuYa3lWbFk2XWihWkAiUwgRqIluE +M6LpO8l3LVXVjN1+6bK1GZpbfLay+E6vy4W38XMuXZSNpyhy6e+XggTPH2xbbwoi +OcAzcojhMaxVGpxm/aXyRxg9zBdrQjtqM/aCN91ri55bvOKxELVi+D/VcZKpd2CR +X/vWcqoGaK/6+vlPWMZSHCJkPa4KBT0aUcnEdeFWx2nmrwdrHvETzCYLAzVBSECV +ZoYH0xTkFr/RI2AOAzx701LSuYbnPoCq+w7TXtjPaooZdYVVgrYuI+j4JOlseFS7 +1c9iRiJVPBfnpUNIZdHLw19+k81IJ/FmumiuDhfLS5pwQmtuXkO3DWZDa3UPlV8e +6dmZeP1XGwRLL9VpOKx7NCqZM+CdEt87CXpFFWXdw8tL+3K/2r8w4lHIzBKaVPSS +5uFqXc1vzfP6Qeov31IjeLPE1pWTHNqRPdmvt9Scq9tKS3o18wmLBxOVinOE0cxQ +oddzPd0z5NxNYVayqZORwDdVv6CVXKnrvBSnOFFslZqv1G8/diE5BXxeaAPEMcZE +3lD7MzdoEHK5oL2MXofLWZbNtMkOZLaLqY80zKT1UG3Gs8U44d44aLXO1dBL0HGX +dNfNUaH+IGZf2ccS6OR1RhwIazDZ8qk0XeUwQV588adwC3FUvscVA3eHZa95z4kX +xvHg+ylzRtKRfpSPzB2IVwgV9/rsOg0OmvwhV8+5IQpdcFr+hf2Bn6AVn6H9aX8A +JjycN6KMcHaFa0EUqagGm9tsQLmf/MGCj8sy9am1IbRmFCz5lB5A7P/YLPM2Csjg +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey2.pem b/build/test/key/idp/privkey2.pem new file mode 100644 index 00000000..333e0cc7 --- /dev/null +++ b/build/test/key/idp/privkey2.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEA0Bvmmw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C2zKXS7zdLr66UAJSHnlY/GPzQYmjhL/i/kZl +P4q/NiJ4224D1zrhyE5fe+HlFOpxnfT/anWQZeNlShgi7m4RoRpBaUeTHH9BDURu +fkW1TKL4xg5dWCnGI5QeaIGOBN9AUl066r/q5BR6SxTTz4Bp1yTRiU8inaMQvvzf +ZFT9CDTsel2MfEKZkaToXaFBkVOu8MObjJW9Jyob7ACfQnFD6AZh3x799prsqpkd +RZKpd1SjHtcap/KNj8CQX7hXfnGuBylzFDnkqz00pkCWO8Dw5nyvZ/FzA+SaozBJ +aNo7AoIBAQCGlyGlzK8EX44h8Ji/oFTYoLNM/5L4Q/4+P+zHbYLGeDiJJNr7Sc6X +bHheK1oe/5B34YeaQnKDzVNG2Kufv9sHU7pwAJbX54CY4LpW6iCsBEJiiV1JIdgh +iEYwhsnXk49aFS2nlP5qFIAVjy8s/7Qr2l10NwHawpYXlOL9X5KxHVyvORLNT2hY +qM2tc9mJIstrEmwjJ2jMdmatZ6iwBLIIFxZJXxejwOA5Ha1d/9GgYNaJYmSFMSin +yc6tc+aReJpJ6q15OX57SOS5+GkVVDLRaT5dMcx9ppE6mCU5m0fddRV9SGqydXXR +xWBHSCBMpEtQW+NGm6v4RPbU+shoRDidAoIBAQCfNnCjLvLNTfeJ4blQOdGMOiDr +TEyxtF9tAgkzbQefBr6HBVwzfPdywUtf3ZxVxKIsnpYmbGJIKp525/Wtvme7qjp4 +CsdyFO6ZFLEeI8KGKiewGEv5YzvQIpVqoMZ6ucY/WiSvwHSvZuyLZVLHOLGcZRLJ +49jbfhsvrJqWVDC2CmX2oAuH3GF+LUFhkM36zD1d0FrpaZwL2acWErk/N0CNhnNp +H/08579O5MmSjlWh8Eco2wVD1z/A+LSC0YN+04ZrurB7wAebGCsOoEO7M53aan77 +gP2nLQ/cnYHiPrmUlL5s7EDhKnvpNY1W2ViEydwywvg9m4mxOA1sjrYpoNRg +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/keypass.txt b/build/test/key/keypass.txt new file mode 100644 index 00000000..992b010a --- /dev/null +++ b/build/test/key/keypass.txt @@ -0,0 +1,11 @@ +Private Key Phrase (SP) - signature +VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px + +Private Key Phrase (SP) - encryption +BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU + +Private Key Phrase (IDP) - signature +q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW + +Private Key Phrase (IDP) - encryption +g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN diff --git a/build/test/key/sp/cert.cer b/build/test/key/sp/cert.cer new file mode 100644 index 00000000..5975ac46 --- /dev/null +++ b/build/test/key/sp/cert.cer @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQK +DApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNv +bTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhL +MRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2Rl +LXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZq +ClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPs +tBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15 +qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QB +o7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZ +ApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEA +AaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaA +FEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+ +uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1i +JmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq +2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uL +EpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNr +vk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= +-----END CERTIFICATE----- diff --git a/build/test/key/sp/encryptKey.pem b/build/test/key/sp/encryptKey.pem new file mode 100644 index 00000000..f6660ad6 --- /dev/null +++ b/build/test/key/sp/encryptKey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,860FDB9F3BE14699 + +bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRy +QCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVl +kkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW0 +08OHTouRK33Aifx0A3MWxR0ILvw49E6urtbbIrskEzKzfWQug8gY1TJhI3sbsMsI +1bS5Vg88TvilFFBG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BNyT2OZj+TJii9CaukhmkkA2/AJmS +5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4c +AUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5S +LvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBny +ISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 +-----END RSA PRIVATE KEY----- diff --git a/build/test/key/sp/encryptionCert.cer b/build/test/key/sp/encryptionCert.cer new file mode 100644 index 00000000..719fff80 --- /dev/null +++ b/build/test/key/sp/encryptionCert.cer @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID7TCCAtWgAwIBAgIJANSq1uUtXl4DMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV +BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFjAUBgNVBAoTDWV4cHJlc3Mtc2Ft +bDIxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWwwHhcNMTUxMDAzMDM0ODA2 +WhcNMTgxMDAyMDM0ODA2WjBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBL +b25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNV +BAMTBWVzYW1sMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyx/yIgvJ +wfOCwMTNjL4Fslr21ky4O/uzxp0Y8wpHk9jk8Afcj3plQCr5X8dPKG2Rz4EIh//n +QQL9tq2InaUdRwJkS9SeuuAcJG7DN/KDUtfrh4+cO2lZ4h7cQIdjpbBgpGEMhGy1 +wwpwHJsadoBuX0PKyT4O4oHkj1gwWO14qYnK4biviNBqmjGjmN+py+lUcACsQt22 +abA4s8Xjm/tlvnkgNRE3H44ICvSr8m5MVhyYGoAUe7Qprn2BcsMXd9mrlZ5hEdal +NUDRbKb+W7mrKEkKFCbE3wi/Ns2bc4fbNXvwcZoF3/TPzl936u2eivTQESjCLsym +IqdYHwRiVLifWQIDAQABo4G7MIG4MB0GA1UdDgQWBBSdBiMAVhKrjzd72sncR13i +mevq/DCBiAYDVR0jBIGAMH6AFJ0GIwBWEquPN3vaydxHXeKZ6+r8oVukWTBXMQsw +CQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNz +LXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMw +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG +5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdK +nK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5O +fS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRb +j/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+ +gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0 +NA== +-----END CERTIFICATE----- diff --git a/build/test/key/sp/knownGoodCert.cer b/build/test/key/sp/knownGoodCert.cer new file mode 100644 index 00000000..690818b6 --- /dev/null +++ b/build/test/key/sp/knownGoodCert.cer @@ -0,0 +1 @@ +MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbT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ptKey.pem b/build/test/key/sp/knownGoodEncryptKey.pem new file mode 100644 index 00000000..b45a5f0f --- /dev/null +++ b/build/test/key/sp/knownGoodEncryptKey.pem @@ -0,0 +1 @@ +Proc-Type:4,ENCRYPTEDDEK-Info:DES-EDE3-CBC,860FDB9F3BE14699bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRyQCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVlkkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW008OHTouRK33Aifx0A3MWxR0ILvw49E6urtbbIrskEzKzfWQug8gY1TJhI3sbsMsI1bS5Vg88TvilFFBGn0Yv6GEJjgOrsrKDGKtYGhuBfK4fd4rwnQKKvC6gTKeNXIfV7Qm1R20LUJXC8zv35pdKoVk+NdS/MGNXJRFgO3Kkp01aVf3n1oo2+AllS02AYyWt1svHecsRwbibXip8gSQsOtDdpqQrEDyqZlFHXEw/IcJE9vQWEJmpHD5GFhbKtttpE0B3ZtNl6YcyUz0rSf9zjuMx/wReWdRb6H2WoIqoRS7vAUONDRPt7wvfjtLlDRVibc2RTN8yce/57lGnA1n8bxPV5+9VxCJOEipV3io/nrj+uNO8i/0rUpkKdZy8wy2CRksoxq4TxwegONz1HQcJVpJu0iBdu7B+BXVjxQQScvMQlOTbua8k+YdaCeZAb83jJVX89/PFy+Xj7eGyzzBTqz7dV0Xkxq9mpiMYUCoyNL5Iq1jD9Xb5TzVW1Gbh8zCZYXjcZEQKeartaBC4/fRWyxqK3gJRX4SJkl4gYMQrPS2pbTzVCO+WLxSwIh3dOZpoeErXLSrylIv9cE2Xrs0McXAR+hfGrqgtILBWwgbh2NhmUiFfLwUTUxU51eu7QZ2TV1VFBX0QTmn2kM0JLSSC96mDUzbs6qfURUaXbuffF5cqdUjXgtzZj5SFEbIv4UFS0DAS+6i/jTGSz7aAp/uofOxhYkCqK/s2Cex2jQbDpcKXKiWzPdULOCjAh3fdCAp03ua3fdAI7H8PslSDiPFrcY78OxZaWXzazEiun77WKbzrMloLMP5dpCPlUCOqxbZ0ykSuo0M7p/UPY34yi3AMHS9grvQQ1DykMPoqKKEheI6nUGcQ1AFcdr307ILWRsPOT6gHOLXZaR4+UEeYfkTKsjrMUhozx7JIyuLgTXA9TWC+tZ9WZpbJ7i3bpQ+RNwX2AxQSwc9ZOcNxg8YCbGlJgJHnRVhA202kNT5ORplcRKqaOaO9LK7491gaaShjaspg4THDnH+HHFORmbgwyO9P74wuw+n6tI40Ia3qzRLVz6sJBQMtLEN+cvNoNi3KYkNjGJM1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4cAUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5SLvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBnyISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 diff --git a/build/test/key/sp/privkey.pem b/build/test/key/sp/privkey.pem new file mode 100644 index 00000000..c60dfcf1 --- /dev/null +++ b/build/test/key/sp/privkey.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,9C86371F0420A091 + +77TqgiK/IYRgO5w3ZMyV81/gk0zN5wPTGWxoztNFjQKXCySFnrL30kUqlGituBxX +VgxwXbkoYMrd5MoDZKL5EJuf0H59hq92O0+3uwJA8QyZjOm4brQcjXKmIrkvihgs +FvpaJiGzp6kS/O7vFBDNTQWr9yY9Y3FBPcmOUWufpRp4Q5nhpSlqnMmIqZyWQUL/ +YJSJETtzJVsk38l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O1N6g9fncLmc5pB5Ix +W3gLfQS/My4daWNTvrYOgfA08J4M4ZWd0v5TglxOSV78psG4J4slppDySNFB2d/3 +7JiwWVm5SMk0StLWwb2azmTvBoinnrZJzPnPlOytxvE5uGJ/i0WAik7C99YgVJkS +9hO3FJGasrOnHeiOvMZEdRuIVspKz9iMFx7hWHpVHTTyjwceEpaiEkhmqLM9QkKh +kCZqeWyVsKBIc0sse+CKNK8ik9eTeUlCklGMV1Q4kKjR6uuHUOLyjk/xhqslV4TS +jnnjCjsK5YzTa4hmbHhPZIW262KoFV9TqxYKkhP5ab7AXRSakrdrY2cwACWN4AMT +-----END RSA PRIVATE KEY----- diff --git a/build/test/misc/attack_response_signed.xml b/build/test/misc/attack_response_signed.xml new file mode 100644 index 00000000..1e05a9a6 --- /dev/null +++ b/build/test/misc/attack_response_signed.xml @@ -0,0 +1 @@ +evil@evil.comhttps://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN9ltO2neTz9pqd0BA1BKIi7PjQYN+F7dB/ffG7V8VjNoPMROrHzq6sY3Ondtv7w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YX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d/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/dumpes_issuer_response.xml b/build/test/misc/dumpes_issuer_response.xml new file mode 100644 index 00000000..5964bfaf --- /dev/null +++ b/build/test/misc/dumpes_issuer_response.xml @@ -0,0 +1,65 @@ + + + http://www.okta.com/dummyIssuer + + + + + + + + + + + + + Spr+5HzbZxSt8I3vCY4rTBu+glE= + + + + signatureValue + + + + stuff + + + + + + + + + http://www.okta.com/dummyIssuer + + email@email.com + + + + + + + + api.com + + + + + urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient + + + + + + + email@email.com + + + + + diff --git a/build/test/misc/failed_response.xml b/build/test/misc/failed_response.xml new file mode 100644 index 00000000..67b258cd --- /dev/null +++ b/build/test/misc/failed_response.xml @@ -0,0 +1 @@ +https://idp.example.com/metadata \ No newline at end of file diff --git a/build/test/misc/false_signed_request_sha1.xml b/build/test/misc/false_signed_request_sha1.xml new file mode 100644 index 00000000..c640fe36 --- /dev/null +++ b/build/test/misc/false_signed_request_sha1.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqTok8LXPuq1A==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJB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tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha256.xml b/build/test/misc/false_signed_request_sha256.xml new file mode 100644 index 00000000..e385bd29 --- /dev/null +++ b/build/test/misc/false_signed_request_sha256.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjY0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rYP2gwoUYmxU5WS/Cl1QEMlDj46fPpOjEBELGXdKW69zpAHa5jM/FtS8RCixhiMI1dmbL3+zgziEVdx5xrkaakqvpdDD601Eyn0gy1oO+VUmCMPFE6YjsPeFDhw5ZXf7MmJ/fXLeqWmH5Pn+mkyTCZWxi/L+2nG9iayZ41Z3wBl67XTdBL6rwHMcEY7oxwFSZtKTbtTOV6aW11KdAd9peLIsHeqoaMCY/VypS2bTr9FubQCbHhho2vbhX8cuUfpE21OefA7o1rA==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha512.xml b/build/test/misc/false_signed_request_sha512.xml new file mode 100644 index 00000000..3d690ab4 --- /dev/null +++ b/build/test/misc/false_signed_request_sha512.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYq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QYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/idpmeta.xml b/build/test/misc/idpmeta.xml new file mode 100644 index 00000000..e81c9889 --- /dev/null +++ b/build/test/misc/idpmeta.xml @@ -0,0 +1,34 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js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L7dF1gUNu8en0fHMSbzf192uB8m2CTeHeEeYrmq5rau6t1WzaHwbSStd9tJ/11Arm8f8zfefFqEBA0EYbp/DMqHb9ZiLGgIff08679NOYeK/d9EAs5DzvTMTR6QqG7a4vH3jKOksIbjM35h5RVitVDxo+xWDKyvOpuNE64bJlWHOEiNxvwmcHfJ2hAd1EozaRLcJOojFHg51alUqiNIZ+vpkMAM8s3lUlcYETKqTpcnsE7c1QX60cCrFN4m3SNS98HGBEdotch8+2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_nosign.xml b/build/test/misc/idpmeta_nosign.xml new file mode 100644 index 00000000..a30a4284 --- /dev/null +++ b/build/test/misc/idpmeta_nosign.xml @@ -0,0 +1,27 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_onelogoutservice.xml b/build/test/misc/idpmeta_onelogoutservice.xml new file mode 100644 index 00000000..c6d3af95 --- /dev/null +++ b/build/test/misc/idpmeta_onelogoutservice.xml @@ -0,0 +1,33 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0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/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + diff --git a/build/test/misc/idpmeta_rollingcert.xml b/build/test/misc/idpmeta_rollingcert.xml new file mode 100644 index 00000000..bf8da7dc --- /dev/null +++ b/build/test/misc/idpmeta_rollingcert.xml @@ -0,0 +1,39 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3E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bL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/idpmeta_share_cert.xml b/build/test/misc/idpmeta_share_cert.xml new file mode 100644 index 00000000..33b0d5b3 --- /dev/null +++ b/build/test/misc/idpmeta_share_cert.xml @@ -0,0 +1,27 @@ +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/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:entity + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + + + + + + diff --git a/build/test/misc/invalid_response.xml b/build/test/misc/invalid_response.xml new file mode 100644 index 00000000..7caf8d0b --- /dev/null +++ b/build/test/misc/invalid_response.xml @@ -0,0 +1,6 @@ + + https://idp.example.com/metadata + + + + diff --git a/build/test/misc/logout_request.xml b/build/test/misc/logout_request.xml new file mode 100644 index 00000000..db678cc7 --- /dev/null +++ b/build/test/misc/logout_request.xml @@ -0,0 +1,4 @@ + + http://sp.example.com/metadata + f92cc1834efc0f73e9c09f482fce80037a6251e7 + diff --git a/build/test/misc/multiple_entitydescriptor.xml b/build/test/misc/multiple_entitydescriptor.xml new file mode 100644 index 00000000..76659103 --- /dev/null +++ b/build/test/misc/multiple_entitydescriptor.xml @@ -0,0 +1,37 @@ + + + + + + MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMG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jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + diff --git a/build/test/misc/request.xml b/build/test/misc/request.xml new file mode 100644 index 00000000..9bafb7d8 --- /dev/null +++ b/build/test/misc/request.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Password diff --git a/build/test/misc/response.xml b/build/test/misc/response.xml new file mode 100644 index 00000000..fd3436ae --- /dev/null +++ b/build/test/misc/response.xml @@ -0,0 +1 @@ +https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 diff --git a/build/test/misc/response_signed.xml b/build/test/misc/response_signed.xml new file mode 100644 index 00000000..ebaa1d16 --- /dev/null +++ b/build/test/misc/response_signed.xml @@ -0,0 +1 @@ +https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN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qKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/response_signed_cert1.xml b/build/test/misc/response_signed_cert1.xml new file mode 100644 index 00000000..e5790248 --- /dev/null +++ b/build/test/misc/response_signed_cert1.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=GZSDF9T0TMTe5nkZspOBlc6+j+lon0eHjViy765ty0tM7F47qgDVWTiC2x326Iz8One12XKKbUHxMvqABnI77aNSJ0/BADFJLoH+mgPuSsgcZygTAWmKdn1bR/3zydMtkMIbP9JXB2VEF7a7KnnnjGcM2OXmdxanhe5J2vtrBWCrxt0QZOLaEsxQmCHosKizVhOnO5JehNqqkf9M4yp7acIsIVhCg21YYqnuAWMsve8qReryF31189TdsV9KO8uB0rufBsxl/dzNnMG74Rgq4mS3QjPI7N/WpXzZZk8vPe38FYEsFA5lmeIsdMxnlbbUEPJFwzWM72xEmMgo12+y4A==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/response_signed_cert2.xml b/build/test/misc/response_signed_cert2.xml new file mode 100644 index 00000000..1686dab3 --- /dev/null +++ b/build/test/misc/response_signed_cert2.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=JgrKOwRaj4swHYgLra3MOG92BeekCyRgbDfxAk5KLmzeRk1u0w6AmB/qW32mrlM4bn8LtwTq33PiHk6NMbkOfg5X2jQ8vjRyog+tgxDmwdiVkMMHfTWHcOqI5Gou572GayDLC0M9rOv4iHXUoDaul4ozhkeRolS9peLxydulSLzyXJiMGQ9ChnmxsR1P7y1rU/DOJ4O/zWzY2M9GoKBXWwG5C9RuoiO7FfOQn4za7InoQ+pBAtGWeh3mXwKLYpd+dhWL73vLa2sr5OmOQUlnFDSuFoAzhnT9eJEJCcedfmtjTUi724iAcYtFeXYahcCe/n4H2JjQYhE0ovG4JpEaThRA/sM3C6h3j7t9b+fX86VhH71+0f79VuX9TNeQkSiuYxqbUYvJjNgx3z8W7ixv5WGpHCjq6zd5KKbIwGk2+bWp7xs6ZD8sh9uyqWHNX/7YE096Ovxn4ki9O370MnK/3henA3m/+lwwWaL3Bn6+TmYC5DOWM7WVhy+dokSW6/2ZhgzoehpbDVZfYkKP+SH1w2PEqwtyB60fJpcTHZFANbCzfLJuyuRjiaWl9lzc3sKsRlK8W76ro/lXeIX2Jal1pQpkctZRUc0RyL+l9EnqzRnPc1K9nGUI+a8PNS54clILe0silqt339ZaE+wkslvhZ1M8oLzsWcXFWD+x2JZkvbo=MIIFLjCCAxYCCQCqGHhTssya9jANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJISzESMBAGA1UECAwJSG9uZyBLb25nMRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNVBAoMB3NhbWxpZnkxEDAOBgNVBAMMB3NhbWxpZnkwHhcNMjAwNTEwMTUyNjIzWhcNMzAwNTA4MTUyNjIzWjBZM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sbft7s8vmEYZbuueQDOJCMTt+eC08LONrovYChyYmj3i5RIk8kcaodeSDo811F1B1gDvO/dmVxgrHEgoai7X6LUoiAiLkigP7udNEZxbXsRlOhBRv9w+rRXFurVFlUPkQ9UF+QB0BoyIcUxo+fZ8vCA4xEVBenVBadpFbwum6+XeTkvDoRc4sSCpm8v2qtprc8aU/0F82EzxSybYvstc5lDv7wuwCwNwfoAQ+/16kTpJvoYbOXUPv5yCA3mIuqYeA1woaWPXsE4jNOzTqv1qOZQTvXProEgK5B0FR5ILc4mfNrD2p9VGbiYf2GjCfeEzDFg174dvSn2MMp1yK5pvZEp7yFE8z1eduYN6W/7qdtss9BGpnyS5X7LuYfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwvICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA==https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_request_sha1.xml b/build/test/misc/signed_request_sha1.xml new file mode 100644 index 00000000..7df1a59f --- /dev/null +++ b/build/test/misc/signed_request_sha1.xml @@ -0,0 +1 @@ +https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqT1ok8LXPuq1A== diff --git a/build/test/misc/signed_request_sha256.xml b/build/test/misc/signed_request_sha256.xml new file mode 100644 index 00000000..675b732a --- /dev/null +++ b/build/test/misc/signed_request_sha256.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjCY0hdmiULo0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rYP2gwoUYmxU5WS/Cl1QEMlDj46fPpOjEBELGXdKW69zpAHa5jM/FtS8RCixhiMI1dmbL3+zgziEVdx5xrkaakqvpdDD601Eyn0gy1oO+VUmCMPFE6YjsPeFDhw5ZXf7MmJ/fXLeqWmH5Pn+mkyTCZWxi/L+2nG9iayZ41Z3wBl67XTdBL6rwHMcEY7oxwFSZtKTbtTOV6aW11KdAd9peLIsHeqoaMCY/VypS2bTr9FubQCbHhho2vbhX8cuUfpE21OefA7o1rA==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_request_sha512.xml b/build/test/misc/signed_request_sha512.xml new file mode 100644 index 00000000..49800cb2 --- /dev/null +++ b/build/test/misc/signed_request_sha512.xml @@ -0,0 +1 @@ +http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEUmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqV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QADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_response_sha1.xml b/build/test/misc/signed_response_sha1.xml new file mode 100644 index 00000000..120a657d --- /dev/null +++ b/build/test/misc/signed_response_sha1.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataCocGj4j5psQ0OfZ1mOlAdQkfwjTqCb95tNqpiFtt6qhTlnn+1IIp9pDpMLubomf9LWwX176PPLWFYxsRmqyEBYlhT53hgAF+z2fEgJdlxXF7FYKsnsn+ujC0ZJP3QkUlWGT9eo74i67JrkAwmiOXPHBJAAN040L/uqmYgjqdnGIFZAyTk4SwplECf1yzVxh4wkETpkf1na1VgTpFC3QDHpXVmCdTbq4FgtgNyfcZmr10d81rmSLjwfHJswV8Qg+cuxXODcn0rxDA5ZA3abpIxGwHUMtKP8ak4amY1urWQTXkhaFjZIChA6E4p870MzfmzVExG6p8/svKf2vDHTAH0w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha256.xml b/build/test/misc/signed_response_sha256.xml new file mode 100644 index 00000000..928dcc90 --- /dev/null +++ b/build/test/misc/signed_response_sha256.xml @@ -0,0 +1 @@ +https://idp.example.com/metadata0TJreH5fvSPwTL8cMGtvYkc8mDQDirHL/0KAU0PPjWXKUqyWSVi7FtDhnAuUakJpfPaYowrHBaUkX+SoJC9uQjXNCgvx5Z7DJfNq+h/vFxoSoxMT/1qeKMKWoNQFVmUErIPMCl0Wou/MfDR8qd+0ofUyLF4pEglczqNBVGi23RirDMZGSgS9M6QDlgpTx/CDnWRL6+0T1lNrTLuX6n0VaEziUeHOHY0lK5T0hmT/tVlufZ7LRO10FN7MUrxzIZvIIWVNuPVOmn0hm/4Z33JEK7rT35+MZLq8f7fbA3SS4+4InJOvZZgBRR9BcPjeEXG1n1el7uyf2AfE9+gr3vu6eg==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha512.xml b/build/test/misc/signed_response_sha512.xml new file mode 100644 index 00000000..8f268a99 --- /dev/null +++ b/build/test/misc/signed_response_sha512.xml @@ -0,0 +1 @@ +https://idp.example.com/metadataRkgzPlU7snHmrHTA6tCt0DRqQFyQeNypGIFzaY+2/6OLsNNH0B4gdBWYUWrwMpOGNqHr9Wo+th248ABVoUBtbdQ2pT8M49D0JDGwvl6L8CscTK0xzLGaqaAhHwszmk61WGVOxrbkiZQqOQA8VDiua5bDoXOqiCqEIB6TlSuJ+HH4Lc6u10WSXChI5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vQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/sp_metadata_98.xml b/build/test/misc/sp_metadata_98.xml new file mode 100644 index 00000000..40814588 --- /dev/null +++ b/build/test/misc/sp_metadata_98.xml @@ -0,0 +1,6 @@ + + + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + + + \ No newline at end of file diff --git a/build/test/misc/spmeta.xml b/build/test/misc/spmeta.xml new file mode 100644 index 00000000..81068842 --- /dev/null +++ b/build/test/misc/spmeta.xml @@ -0,0 +1,27 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYW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y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + + + diff --git a/build/test/misc/spmeta_noassertsign.xml b/build/test/misc/spmeta_noassertsign.xml new file mode 100644 index 00000000..984917ed --- /dev/null +++ b/build/test/misc/spmeta_noassertsign.xml @@ -0,0 +1,32 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA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lZ5hEdalNUDRbKb+W7mrKEkKFCbE3wi/Ns2bc4fbNXvwcZoF3/TPzl936u2eivTQESjCLsymIqdYHwRiVLifWQIDAQABo4G7MIG4MB0GA1UdDgQWBBSdBiMAVhKrjzd72sncR13imevq/DCBiAYDVR0jBIGAMH6AFJ0GIwBWEquPN3vaydxHXeKZ6+r8oVukWTBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== + + + + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + + + + diff --git a/build/test/misc/spmeta_noauthnsign.xml b/build/test/misc/spmeta_noauthnsign.xml new file mode 100644 index 00000000..0fc8d2c6 --- /dev/null +++ b/build/test/misc/spmeta_noauthnsign.xml @@ -0,0 +1,25 @@ + + + + + + MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWl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SAML:1.1:nameid-format:emailAddress + + + + From 6f6700cd68570b219b7a7b0166b93e9d8c8c24cf Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Fri, 17 Jul 2020 04:45:13 +0400 Subject: [PATCH 23/26] 2.7.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2bc3407a..75ac0e5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "samlify-js", - "version": "2.7.8", + "version": "2.7.9", "description": "High-level API for Single Sign On (SAML 2.0)", "main": "./build/index.js", "keywords": [ From a5244ea5160bbfd98b612929fb9219784b1d63a0 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Sat, 18 Jul 2020 01:08:05 +0400 Subject: [PATCH 24/26] chore: add dependbot --- .dependabot/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .dependabot/config.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml new file mode 100644 index 00000000..9d3edd6f --- /dev/null +++ b/.dependabot/config.yml @@ -0,0 +1,21 @@ +version: 1 +update_configs: + - package_manager: 'javascript' + directory: '/' + update_schedule: 'live' + default_labels: + - 'Type: Dependency' + commit_message: + prefix: 'chore' + include_scope: true + target_branch: 'develop' + + - package_manager: 'docker' + directory: '/' + update_schedule: 'daily' + default_labels: + - 'Type: Dependency' + commit_message: + prefix: 'chore' + include_scope: true + target_branch: 'develop' From bcaca6a41a7731ec6ba11fca3eca6be85cbafe67 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Sat, 18 Jul 2020 01:10:57 +0400 Subject: [PATCH 25/26] chore: update typescript --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 75ac0e5d..26c109f9 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "timekeeper": "^2.2.0", "ts-node": "^8.10.2", "tslint": "^6.1.2", - "typescript": "^3.9.6" + "typescript": "^3.9.7" }, "ava": { "extensions": [ diff --git a/yarn.lock b/yarn.lock index b856a259..7b24fab0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2725,10 +2725,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^3.9.6: - version "3.9.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a" - integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw== +typescript@^3.9.7: + version "3.9.7" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" + integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== unique-string@^2.0.0: version "2.0.0" From c741defd28bbc9828b8a97281f4090376d12f4e8 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Sat, 18 Jul 2020 01:13:18 +0400 Subject: [PATCH 26/26] chore: update typescript --- build/test/key/idp/README.md | 4 -- build/test/key/idp/cert.cer | 22 ------- build/test/key/idp/cert2.cer | 30 --------- build/test/key/idp/encryptKey.pem | 30 --------- build/test/key/idp/encryptionCert.cer | 23 ------- build/test/key/idp/nocrypt.pem | 27 -------- build/test/key/idp/privkey.pem | 30 --------- build/test/key/idp/privkey2.pem | 51 --------------- build/test/key/keypass.txt | 11 ---- build/test/key/sp/cert.cer | 22 ------- build/test/key/sp/encryptKey.pem | 30 --------- build/test/key/sp/encryptionCert.cer | 24 ------- build/test/key/sp/knownGoodCert.cer | 1 - build/test/key/sp/knownGoodEncryptKey.pem | 1 - build/test/key/sp/privkey.pem | 30 --------- build/test/misc/attack_response_signed.xml | 1 - build/test/misc/dumpes_issuer_response.xml | 65 ------------------- build/test/misc/failed_response.xml | 1 - build/test/misc/false_signed_request_sha1.xml | 1 - .../test/misc/false_signed_request_sha256.xml | 1 - .../test/misc/false_signed_request_sha512.xml | 1 - build/test/misc/idpmeta.xml | 34 ---------- build/test/misc/idpmeta_nosign.xml | 27 -------- build/test/misc/idpmeta_onelogoutservice.xml | 33 ---------- build/test/misc/idpmeta_rollingcert.xml | 39 ----------- build/test/misc/idpmeta_share_cert.xml | 27 -------- build/test/misc/invalid_response.xml | 6 -- build/test/misc/logout_request.xml | 4 -- build/test/misc/multiple_entitydescriptor.xml | 37 ----------- build/test/misc/request.xml | 1 - build/test/misc/response.xml | 1 - build/test/misc/response_signed.xml | 1 - build/test/misc/response_signed_cert1.xml | 1 - build/test/misc/response_signed_cert2.xml | 1 - build/test/misc/signed_request_sha1.xml | 1 - build/test/misc/signed_request_sha256.xml | 1 - build/test/misc/signed_request_sha512.xml | 1 - build/test/misc/signed_response_sha1.xml | 1 - build/test/misc/signed_response_sha256.xml | 1 - build/test/misc/signed_response_sha512.xml | 1 - build/test/misc/sp_metadata_98.xml | 6 -- build/test/misc/spmeta.xml | 27 -------- build/test/misc/spmeta_noassertsign.xml | 32 --------- build/test/misc/spmeta_noauthnsign.xml | 25 ------- 44 files changed, 714 deletions(-) delete mode 100644 build/test/key/idp/README.md delete mode 100644 build/test/key/idp/cert.cer delete mode 100644 build/test/key/idp/cert2.cer delete mode 100644 build/test/key/idp/encryptKey.pem delete mode 100644 build/test/key/idp/encryptionCert.cer delete mode 100644 build/test/key/idp/nocrypt.pem delete mode 100644 build/test/key/idp/privkey.pem delete mode 100644 build/test/key/idp/privkey2.pem delete mode 100644 build/test/key/keypass.txt delete mode 100644 build/test/key/sp/cert.cer delete mode 100644 build/test/key/sp/encryptKey.pem delete mode 100644 build/test/key/sp/encryptionCert.cer delete mode 100644 build/test/key/sp/knownGoodCert.cer delete mode 100644 build/test/key/sp/knownGoodEncryptKey.pem delete mode 100644 build/test/key/sp/privkey.pem delete mode 100644 build/test/misc/attack_response_signed.xml delete mode 100644 build/test/misc/dumpes_issuer_response.xml delete mode 100644 build/test/misc/failed_response.xml delete mode 100644 build/test/misc/false_signed_request_sha1.xml delete mode 100644 build/test/misc/false_signed_request_sha256.xml delete mode 100644 build/test/misc/false_signed_request_sha512.xml delete mode 100644 build/test/misc/idpmeta.xml delete mode 100644 build/test/misc/idpmeta_nosign.xml delete mode 100644 build/test/misc/idpmeta_onelogoutservice.xml delete mode 100644 build/test/misc/idpmeta_rollingcert.xml delete mode 100644 build/test/misc/idpmeta_share_cert.xml delete mode 100644 build/test/misc/invalid_response.xml delete mode 100644 build/test/misc/logout_request.xml delete mode 100644 build/test/misc/multiple_entitydescriptor.xml delete mode 100644 build/test/misc/request.xml delete mode 100644 build/test/misc/response.xml delete mode 100644 build/test/misc/response_signed.xml delete mode 100644 build/test/misc/response_signed_cert1.xml delete mode 100644 build/test/misc/response_signed_cert2.xml delete mode 100644 build/test/misc/signed_request_sha1.xml delete mode 100644 build/test/misc/signed_request_sha256.xml delete mode 100644 build/test/misc/signed_request_sha512.xml delete mode 100644 build/test/misc/signed_response_sha1.xml delete mode 100644 build/test/misc/signed_response_sha256.xml delete mode 100644 build/test/misc/signed_response_sha512.xml delete mode 100644 build/test/misc/sp_metadata_98.xml delete mode 100644 build/test/misc/spmeta.xml delete mode 100644 build/test/misc/spmeta_noassertsign.xml delete mode 100644 build/test/misc/spmeta_noauthnsign.xml diff --git a/build/test/key/idp/README.md b/build/test/key/idp/README.md deleted file mode 100644 index 6e789d68..00000000 --- a/build/test/key/idp/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Support the use case of rolling certificate - -- `privkey1.pem` - password protected `q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW`, it generates `cert.cer` -- `privkey2.pem` - no password protected, it generates `cert2.cer` diff --git a/build/test/key/idp/cert.cer b/build/test/key/idp/cert.cer deleted file mode 100644 index b1b40e6d..00000000 --- a/build/test/key/idp/cert.cer +++ /dev/null @@ -1,22 +0,0 @@ ------B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Ke1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0a -zkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWW -k1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4 -yyoWAJDUHiAmvFA= ------END CERTIFICATE----- diff --git a/build/test/key/idp/cert2.cer b/build/test/key/idp/cert2.cer deleted file mode 100644 index 46c90a64..00000000 --- a/build/test/key/idp/cert2.cer +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFLjCCAxYCCQCqGHhTssya9jANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJI -SzESMBAGA1UECAwJSG9uZyBLb25nMRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNV -BAoMB3NhbWxpZnkxEDAOBgNVBAMMB3NhbWxpZnkwHhcNMjAwNTEwMTUyNjIzWhcN -MzAwNTA4MTUyNjIzWjBZMQswCQYDVQQGEwJISzESMBAGA1UECAwJSG9uZyBLb25n -MRIwEAYDVQQHDAlIb25nIEtvbmcxEDAOBgNVBAoMB3NhbWxpZnkxEDAOBgNVBAMM -B3NhbWxpZnkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDQG+abAeeW -jwsOZt5SkcNcw/XSJcjSyJykEbEU2iguErRuOIyBfgj0p1UVBv33uL2igeYJT3OS -XmSjvMO8KvqtYN2tJAjoFjghGr8NbIEZjYS4ukMZUbwxd2bRycD9OMI9g44AUB1s -fQ0UyFwzEOseW3lcW1FnhcizA8TgI0GN4NpdVruNlpgoWdP3w+Syhtq0rWebY8g/ -HGFruEKn8VwbUblOZdP7jNVXsd1aUMScpuMa0khzzXPDN+Q0rwl79fO4ychSeKAA -ERdPXA1UfDfbh9W7pcYBP0ABXd91Bf9akplmbbVOIsNbuRIcVS7WvLwCr613JuJ+ -EtGDcUkrSpbuRvDW85DQRHBGu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ff --git a/build/test/key/idp/encryptKey.pem b/build/test/key/idp/encryptKey.pem deleted file mode 100644 index de728a44..00000000 --- a/build/test/key/idp/encryptKey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,FACBF89A697AB50A - -i0RiFM9TTHzN/atuOBWhAfoty7rMEgNVVsyeoAPqQZoGwBTmOSbMZ+3vLR3jc7Xi -GJ4NtXOux2IcNy5rcYnL3SgZIANVakfEUwF6qwBLCGYbOaqWqEv4eHvz9JHIH9iC -0w4PPMzA2Q4daWiRw1UGr4Kik2iqfkDGv4JPdUDY7/KNlD4hpthRk6axUg+XbJat -swCijv0NGrU//MRGCpqnt4q5ApoZ5Yg4jIbc9JG95ZoZ9+eVZJa1l9ZyYyw6bJ6+ -0iinwWC59qX4soWzvBPvXMzJpgSPAtDrhNKMU4mLPD6+1fLVsc5POzjAuGqDRNcV -bJb/nftu3/MNasXI0PI37RM5krOitBfona8YD4T3B5fIa80XBUrPfSpFXqOqCHZQ -H4rHbnletX8mnAAlzBIEzELO5Dspwnd9OvEkHsKdN5BSZ8cKJh6/qIHwejn4DP21 -hvFAkUYrZWpNZsCi7CKZTJBYkwogW7u0u7ki3XiyPxeDJaYSyTxcdiZD2eVmsWdh -wOWU7mfprfcYIJJnslyJ104z5C0Ioj2xp7VHcX4It8DrwzizfPHkvasv9JarILIX -yeST80i7mcxFyAwmuKIVdD+vvNhZeu0OYs15uhcoKH/oIz2dBLk5U+d/hVwV6TlX -v41nDLuXfvqjAh83rz+a+QkjEdtaMDXKkM3ob6u13F+7JZPQ/32VMeiu0hMWwFff -nijXoWZ+gv3hxbI2oy3Gc2Kjj4H8sYBx/Jd+LTtEZzH01wq0oR/2BR2r74ErB2lF -ByD9d9/SJ/+WrIuseJTcLIWARP5t0QDe8NAWEY5KPk6YjvB84jHIAHf+K+fQMKJL -n6ehvRlVZo4a4cP9PPGMEupfSHCNjioRzT92/AAc3+vplZghMd8lNOpCKSs2NlYX -rf1gKanBPwjcH034SbiP3gN8r4j0Pep6RIWBra2FGZtZcNUhLSXZG87Lmf4RGnsJ -TRwbCUPAx21vhkoQPg5/sLh9IQ+7nzCZfs82ke/yXVNNW7KIxchQ8mz54Ji/k2ix -l0q3jRgH3u8LGPOyLwl1h2fusfZjKYZQnjTZw69Xv8kz1dt5iigNlSspwoMm9NI1 -Hj2TEXQJuBi2/Z+J+aDnY8HLPTM1VtXpuJiPmbxcS0kAJIveg9HQDAei26i+l5OM -b4tXGjGCH/HYJxNIFWtAkrRJZjwrKmVF/GWESGvOtpEsm5YiuC5pUt7+fs6eZ+F+ -nzUV2d/2EkA3FKEjAvoQb6QICCFE0SRUGutYYuUZm4AYG3JEeI4JGYpE1h9pGXMz -m1hlV8N9EIJiFdEtGifjAcfHSVHm7m4us5qOG0TiVfSDC3RZCJSxm8pAUJXLaemp -BvoHL8MuJX8bNMMB3JpWW3e3HxrmR8nLk+xZiviggfWBVRxM9YAyb6NPezVFAV0H -YTULqiXGZbpe+Bm6MmJ6LryicIf8E3pyGbQEYtO9iLYfXnJDHud4dKZnXqjo68oc -80EeEm149eVGtYFRiWhjnRGyb6Hdql4u5iLZdaBRIm3Jm0qsHioYBi6SH5ucPM+q -8hSEfoIZiRlSsrjzvko+19lM4/JnHpk/7cihRNpgXBQysGLwSSA626cvgjwEJSJB ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/encryptionCert.cer b/build/test/key/idp/encryptionCert.cer deleted file mode 100644 index d4086bd9..00000000 --- a/build/test/key/idp/encryptionCert.cer +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID6TCCAtGgAwIBAgIJAPQQPsolUypeMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV -BAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxFTATBgNVBAoTDGV4cHJlc3Mtc2Ft -bDEMMAoGA1UECxMDZGV2MQ4wDAYDVQQDEw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j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV -8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz ------END CERTIFICATE----- diff --git a/build/test/key/idp/nocrypt.pem b/build/test/key/idp/nocrypt.pem deleted file mode 100644 index 71dff696..00000000 --- a/build/test/key/idp/nocrypt.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA4NmxaEJ77IbQ9qVA9NSgPvKSjkxNYwJHEnyFKbaTuYbcSD9j -a/QQF0KZPDuIMJ69GpSZuYWersxE7JXh6uInOHQppsB1l/v+TqSiCGy3dlS1Y7DO -yHLGQG1YPAaYGlAZMawrEnwzWOzdpKo1FcFPg4FYz3DYaW3X7y3LfRGFi/elIX78 -ccsfsBz68tIgCWiRoVbfhFZNwn/ysAO5FaVeKHgZ+ci7Rb+dybmdNJomJEC+vd0Y -NE7+SGJegl1ts6Pt0c9QvFUZsf0hs8rvpMLAtsXuKQgyw+i9VtOunIvq+xtVQp4S -X/kYqmlPCn0MsA56hJikJiSQORgq71NFCMXTYwIDAQABAoIBADOGbzr/ETrQYg5D -LDFukBIcsCzfm1Q272ZzFmjKp+t51fzQWc4hLZbG8ip1Ue4iUh9HMjrrPcO8l4bH -ie+zR12OcQT/UXM0kcAfxem8UAZTvwVLPPd+JaQZ6oBG2pAdDsjtNSmVQIb+MIRN -ZMDJfZkbCOjwaQcv3q22hszwOPQrq5nW82ScuZ8k9oAyz5igomGX0jQBkQM8KMzm -cXTJXBVCc/wEjHEjV8Gx1hBaDuIqY0rt6/5R4zLtwgSvT5LvUOIlzFMKACs7RFA2 -pkhfUx786IRbDXnGRPIqlJgYglcQjEh/815jTdsjJ6VDBBtYcEiF4vn0eWl9tp4S -NxzwWoECgYEA/BG+bAMnMuvjtlOnrZF7l7mCMmKvQzhPr8+8zPtuiQKgn0vHtw4z -7u0TcaP35sa7WwZjcwUtSX4Vs1VrlBfNaHUAEgJ6PAxVPMIB537ttxbPER1l4vE8 -ZvGRGYsps+VNfu7XJnaFtq81mbpGsr1qRmaN+OjDs51UbkKd5esPDCECgYEA5FtK -ps3kfe8rkaacFKfbD3tyj9CeZf8A1ovgiWJFi7PCY46Yg+66Vx/aKkzj2rh993Nn -74BgPWszDJHwG15sHyDlxaZHxUAAeWRJClirsS8MuaLOooReA9D3U82w/s5MDviT -aP3CIc/RtpoLk31arCyqF/aT6K2B79EjmzOKzwMCgYEAjpY68T6XXeax2OFZaIVz -NFBrpbTND2k7KmiIlCtmS3qBAZsMTjBqkCzrYs0t3g1szgC/IME87OW1wMwBHrSY -LQ6CC637Fxyi2suj6B+UuIzedP/8MnPjhxf+zEQ8QtbjD3prmgZRfRV/bIZCl7kt -9MTuam7AxUmqCPUF/JkK2gECgYEA4Y8DF+w7i+EYag/mD8kVah+Hs2Jfc2QEkecs -bMdy5mEy21/Yakj+Kly+BBZa4oplcmy99yYY6dHfZMUqI/6KUd0O2MI8Fiv3y/Aw -7VVUkfllWl/kN0cEDkT0aAS+lZF0Mz15bbVpcjhybymN0at6SqL7iBv5UVVBCX7M -6tpoe70CgYEA5TAEHT77eF8falYD7nYKnPUinfx2p6a3J0UAWI33W3CE6K4MTMSN -Q2AxLj1ImFrmDMiPIFa9GeP9DrE/6eeKVI4q0u7kF58XkCammgIJ9GzyCBWfNpVR -rR2ZD+OyCGiqsrL4PqtHxTwRiYymLOuVKvXxZYlDDPN/RlkBINUX0qk= ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey.pem b/build/test/key/idp/privkey.pem deleted file mode 100644 index b63e3eb2..00000000 --- a/build/test/key/idp/privkey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,116B0EBB2F2F0A9D - -HMmUsJPVPTsq1e06yrrskfinY21OOHosfRzibLue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 -1c9iRiJVPBfnpUNIZdHLw19+k81IJ/FmumiuDhfLS5pwQmtuXkO3DWZDa3UPlV8e -6dmZeP1XGwRLL9VpOKx7NCqZM+CdEt87CXpFFWXdw8tL+3K/2r8w4lHIzBKaVPSS -5uFqXc1vzfP6Qeov31IjeLPE1pWTHNqRPdmvt9Scq9tKS3o18wmLBxOVinOE0cxQ -oddzPd0z5NxNYVayqZORwDdVv6CVXKnrvBSnOFFslZqv1G8/diE5BXxeaAPEMcZE -3lD7MzdoEHK5oL2MXofLWZbNtMkOZLaLqY80zKT1UG3Gs8U44d44aLXO1dBL0HGX -dNfNUaH+IGZf2ccS6OR1RhwIazDZ8qk0XeUwQV588adwC3FUvscVA3eHZa95z4kX -xvHg+ylzRtKRfpSPzB2IVwgV9/rsOg0OmvwhV8+5IQpdcFr+hf2Bn6AVn6H9aX8A -JjycN6KMcHaFa0EUqagGm9tsQLmf/MGCj8sy9am1IbRmFCz5lB5A7P/YLPM2Csjg ------END RSA PRIVATE KEY----- diff --git a/build/test/key/idp/privkey2.pem b/build/test/key/idp/privkey2.pem deleted file mode 100644 index 333e0cc7..00000000 --- a/build/test/key/idp/privkey2.pem +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEA0BvmmwHnlo8LDmbeUpHDXMP10iXI0sicpBGxFNooLhK0bjiM -gX4I9KdVFQb997i9ooHmCU9zkl5ko7zDvCr6rWDdrSQI6BY4IRq/DWyBGY2EuLpD -GVG8MXdm0cnA/TjCPYOOAFAdbH0NFMhcMxDrHlt5XFtRZ4XIswPE4CNBjeDaXVa7 -jZaYKFnT98PksobatK1nm2PIPxxha7hCp/FcG1G5TmXT+4zVV7HdWlDEnKbjGtJI -c81zwzfkNK8Je/XzuMnIUnigABEXT1wNVHw324fVu6XGAT9AAV3fdQX/WpKZZm21 -TiLDW7kSHFUu1ry8Aq+tdybifhLRg3FJK0qW7kbw1vOQ0ERwRrqCpXEhvoph0LR6 -k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K1oe/5B34YeaQnKDzVNG2Kufv9sHU7pwAJbX54CY4LpW6iCsBEJiiV1JIdgh -iEYwhsnXk49aFS2nlP5qFIAVjy8s/7Qr2l10NwHawpYXlOL9X5KxHVyvORLNT2hY -qM2tc9mJIstrEmwjJ2jMdmatZ6iwBLIIFxZJXxejwOA5Ha1d/9GgYNaJYmSFMSin -yc6tc+aReJpJ6q15OX57SOS5+GkVVDLRaT5dMcx9ppE6mCU5m0fddRV9SGqydXXR -xWBHSCBMpEtQW+NGm6v4RPbU+shoRDidAoIBAQCfNnCjLvLNTfeJ4blQOdGMOiDr -TEyxtF9tAgkzbQefBr6HBVwzfPdywUtf3ZxVxKIsnpYmbGJIKp525/Wtvme7qjp4 -CsdyFO6ZFLEeI8KGKiewGEv5YzvQIpVqoMZ6ucY/WiSvwHSvZuyLZVLHOLGcZRLJ -49jbfhsvrJqWVDC2CmX2oAuH3GF+LUFhkM36zD1d0FrpaZwL2acWErk/N0CNhnNp -H/08579O5MmSjlWh8Eco2wVD1z/A+LSC0YN+04ZrurB7wAebGCsOoEO7M53aan77 -gP2nLQ/cnYHiPrmUlL5s7EDhKnvpNY1W2ViEydwywvg9m4mxOA1sjrYpoNRg ------END RSA PRIVATE KEY----- diff --git a/build/test/key/keypass.txt b/build/test/key/keypass.txt deleted file mode 100644 index 992b010a..00000000 --- a/build/test/key/keypass.txt +++ /dev/null @@ -1,11 +0,0 @@ -Private Key Phrase (SP) - signature -VHOSp5RUiBcrsjrcAuXFwU1NKCkGA8px - -Private Key Phrase (SP) - encryption -BXFNKpxrsjrCkGA8cAu5wUVHOSpci1RU - -Private Key Phrase (IDP) - signature -q9ALNhGT5EhfcRmp8Pg7e9zTQeP2x1bW - -Private Key Phrase (IDP) - encryption -g7hGcRmp8PxT5QeP2q9Ehf1bWe9zTALN diff --git a/build/test/key/sp/cert.cer b/build/test/key/sp/cert.cer deleted file mode 100644 index 5975ac46..00000000 --- a/build/test/key/sp/cert.cer +++ /dev/null @@ -1,22 +0,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b/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq -2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uL -EpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNr -vk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= ------END CERTIFICATE----- diff --git a/build/test/key/sp/encryptKey.pem b/build/test/key/sp/encryptKey.pem deleted file mode 100644 index f6660ad6..00000000 --- a/build/test/key/sp/encryptKey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,860FDB9F3BE14699 - -bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRy -QCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVl -kkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW0 -08OHTouRK33Aifx0A3MWxR0ILvw49E6urtbbIrskEzKzfWQug8gY1TJhI3sbsMsI -1bS5Vg88TvilFFBGn0Yv6GEJjgOrsrKDGKtYGhuBfK4fd4rwnQKKvC6gTKeNXIfV -7Qm1R20LUJXC8zv35pdKoVk+NdS/MGNXJRFgO3Kkp01aVf3n1oo2+AllS02AYyWt -1svHecsRwbibXip8gSQsOtDdpqQrEDyqZlFHXEw/IcJE9vQWEJmpHD5GFhbKtttp -E0B3ZtNl6YcyUz0rSf9zjuMx/wReWdRb6H2WoIqoRS7vAUONDRPt7wvfjtLlDRVi -bc2RTN8yce/57lGnA1n8bxPV5+9VxCJOEipV3io/nrj+uNO8i/0rUpkKdZy8wy2C -Rksoxq4TxwegONz1HQcJVpJu0iBdu7B+BXVjxQQScvMQlOTbua8k+YdaCeZAb83j -JVX89/PFy+Xj7eGyzzBTqz7dV0Xkxq9mpiMYUCoyNL5Iq1jD9Xb5TzVW1Gbh8zCZ -YXjcZEQKeartaBC4/fRWyxqK3gJRX4SJkl4gYMQrPS2pbTzVCO+WLxSwIh3dOZpo -eErXLSrylIv9cE2Xrs0McXAR+hfGrqgtILBWwgbh2NhmUiFfLwUTUxU51eu7QZ2T -V1VFBX0QTmn2kM0JLSSC96mDUzbs6qfURUaXbuffF5cqdUjXgtzZj5SFEbIv4UFS -0DAS+6i/jTGSz7aAp/uofOxhYkCqK/s2Cex2jQbDpcKXKiWzPdULOCjAh3fdCAp0 -3ua3fdAI7H8PslSDiPFrcY78OxZaWXzazEiun77WKbzrMloLMP5dpCPlUCOqxbZ0 -ykSuo0M7p/UPY34yi3AMHS9grvQQ1DykMPoqKKEheI6nUGcQ1AFcdr307ILWRsPO -T6gHOLXZaR4+UEeYfkTKsjrMUhozx7JIyuLgTXA9TWC+tZ9WZpbJ7i3bpQ+RNwX2 -AxQSwc9ZOcNxg8YCbGlJgJHnRVhA202kNT5ORplcRKqaOaO9LK7491gaaShjaspg -4THDnH+HHFORmbgwyO9P74wuw+n6tI40Ia3qzRLVz6sJBQMtLEN+cvNoNi3KYkNj -GJM1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS -5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4c -AUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5S -LvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBny -ISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 ------END RSA PRIVATE KEY----- diff --git a/build/test/key/sp/encryptionCert.cer b/build/test/key/sp/encryptionCert.cer deleted file mode 100644 index 719fff80..00000000 --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ANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG -5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdK -nK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5O -fS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRb -j/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+ -gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0 -NA== ------END CERTIFICATE----- diff --git a/build/test/key/sp/knownGoodCert.cer b/build/test/key/sp/knownGoodCert.cer deleted file mode 100644 index 690818b6..00000000 --- a/build/test/key/sp/knownGoodCert.cer +++ /dev/null @@ -1 +0,0 @@ -MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/key/sp/knownGoodEncryptKey.pem b/build/test/key/sp/knownGoodEncryptKey.pem deleted file mode 100644 index b45a5f0f..00000000 --- a/build/test/key/sp/knownGoodEncryptKey.pem +++ /dev/null @@ -1 +0,0 @@ -Proc-Type:4,ENCRYPTEDDEK-Info:DES-EDE3-CBC,860FDB9F3BE14699bMpTdWaAEqNciUFQhHYNv1F9N12aqOQd6cFbMozfRnNR19HW6QIPDmEOPSSCaaRyQCnJhbpcSnaz9pvI7EzeJzdykDmR8Boos+0NSK9qIX0buBO55mfPr7hjx7bLFEVlkkHk+k9F1rLyjyAGJrVoTNoWjyuMOFUCWR7ZxoYticwM/sL+Rbhn1FsfdkdfhFW008OHTouRK33Aifx0A3MW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1iWfSz6PjrEGxbzQZKoFPPiZrVRnVfPhBNyT2OZj+TJii9CaukhmkkA2/AJmS5XoO3GNIaqOGYV9HLyh1++cn3NhjgFYe/Q3ORCTIg2Ltd8Qr6mYe0LcONQFgiv4cAUOZtOq05fJDXE74R1JjYHPaQF6uZEbTF98jN9QZIfCEvDdv1nC83MvSwATi0j5SLvdU/MSPaZ0VKzPc4JPwv72dveEPME6QyswKx9izioJVrQJr36YtmrhDlKR1WBnyISbutnQPUN5fsaIsgKDIV3T7n6519t6brobcW5bdigmf5ebFeZJ16/lYy6V77UM5 diff --git a/build/test/key/sp/privkey.pem b/build/test/key/sp/privkey.pem deleted file mode 100644 index c60dfcf1..00000000 --- a/build/test/key/sp/privkey.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,9C86371F0420A091 - -77TqgiK/IYRgO5w3ZMyV81/gk0zN5wPTGWxoztNFjQKXCySFnrL30kUqlGituBxX -VgxwXbkoYMrd5MoDZKL5EJuf0H59hq92O0+3uwJA8QyZjOm4brQcjXKmIrkvihgs -FvpaJiGzp6kS/O7vFBDNTQWr9yY9Y3FBPcmOUWufpRp4Q5nhpSlqnMmIqZyWQUL/ -YJSJETtzJVsk38lCqIxxDT3LtbGySahj0jRuRqspAZQeLTpnJqzNMC4vnJew9luC -R+UffrX7gVsnwOhNtyRzYaMsLnbRfXT8Jqx2gRHg36GxkOVgyU7e62nk9CzeC0WA -kHHCNVqqivRx9/EC0mQkkRgRzo3BZWp0o671sUsGTy57JhktiGfTnWMrl7ZfhAza -SZnjyTwuI1bTQipIkNI3aJBTP/o/gNUE1sj5D5FZlFdpq5ks2Vxww3GNx1FRrvWd -98z5CNt78ZR0ihLmdz/EakEBKBUteQu/5zPLUlwmGuou4wPuEHG2BsjGzb/d5Zfc -ElIjUV+yrMmGHvBfPyPnDUrCUyLn18S1NZiCMCdN5PqCybjhk8oMPYZhWB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c/attack_response_signed.xml b/build/test/misc/attack_response_signed.xml deleted file mode 100644 index 1e05a9a6..00000000 --- a/build/test/misc/attack_response_signed.xml +++ /dev/null @@ -1 +0,0 @@ -evil@evil.comhttps://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN9ltO2neTz9pqd0BA1BKIi7PjQYN+F7dB/ffG7V8VjNoPMROrHzq6sY3Ondtv7w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/dumpes_issuer_response.xml b/build/test/misc/dumpes_issuer_response.xml deleted file mode 100644 index 5964bfaf..00000000 --- a/build/test/misc/dumpes_issuer_response.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - http://www.okta.com/dummyIssuer - - - - - - - - - - - - - Spr+5HzbZxSt8I3vCY4rTBu+glE= - - - - signatureValue - - - - stuff - - - - - - - - - http://www.okta.com/dummyIssuer - - email@email.com - - - - - - - - api.com - - - - - urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient - - - - - - - email@email.com - - - - - diff --git a/build/test/misc/failed_response.xml b/build/test/misc/failed_response.xml deleted file mode 100644 index 67b258cd..00000000 --- a/build/test/misc/failed_response.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadata \ No newline at end of file diff --git a/build/test/misc/false_signed_request_sha1.xml b/build/test/misc/false_signed_request_sha1.xml deleted file mode 100644 index c640fe36..00000000 --- a/build/test/misc/false_signed_request_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqTok8LXPuq1A==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha256.xml b/build/test/misc/false_signed_request_sha256.xml deleted file mode 100644 index e385bd29..00000000 --- a/build/test/misc/false_signed_request_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjY0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rY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ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/false_signed_request_sha512.xml b/build/test/misc/false_signed_request_sha512.xml deleted file mode 100644 index 3d690ab4..00000000 --- a/build/test/misc/false_signed_request_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPWQ6/2guvqw==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNV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Sn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/idpmeta.xml b/build/test/misc/idpmeta.xml deleted file mode 100644 index e81c9889..00000000 --- a/build/test/misc/idpmeta.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2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VHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_nosign.xml b/build/test/misc/idpmeta_nosign.xml deleted file mode 100644 index a30a4284..00000000 --- a/build/test/misc/idpmeta_nosign.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV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L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_onelogoutservice.xml b/build/test/misc/idpmeta_onelogoutservice.xml deleted file mode 100644 index c6d3af95..00000000 --- a/build/test/misc/idpmeta_onelogoutservice.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+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8m2CTeHeEeYrmq5rau6t1WzaHwbSStd9tJ/11Arm8f8zfefFqEBA0EYbp/DMqHb9ZiLGgIff08679NOYeK/d9EAs5DzvTMTR6QqG7a4vH3jKOksIbjM35h5RVitVDxo+xWDKyvOpuNE64bJlWHOEiNxvwmcHfJ2hAd1EozaRLcJOojFHg51alUqiNIZ+vpkMAM8s3lUlcYETKqTpcnsE7c1QX60cCrFN4m3SNS98HGBEdotch8+2Myzz957cBiwg9CR05PtEfjH0gGXJbL56JmpPyY+TkEiNMtMqJ7RNkK92gZfoY2i3RdjLKOHDUCAwEAAaOBuTCBtjAdBgNVHQ4EFgQUm4zK2qBtDMICekupt3LnRBdbP9UwgYYGA1UdIwR/MH2AFJuMytqgbQzCAnpLqbdy50QXWz/VoVqkWDBWMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRUwEwYDVQQKEwxleHByZXNzLXNhbWwxDDAKBgNVBAsTA2RldjEOMAwGA1UEAxMFZXNhbWyCCQD0ED7KJVMqXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQA9t7VMtX93yIYIGFC20GCsMYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - diff --git a/build/test/misc/idpmeta_rollingcert.xml b/build/test/misc/idpmeta_rollingcert.xml deleted file mode 100644 index bf8da7dc..00000000 --- a/build/test/misc/idpmeta_rollingcert.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8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MYZeZpTedxpxpjqom2dOuOUaDQgrZcGF3FVbFqTEpPtOnsKXYaCg7FJvUjxv7FIuix5H7JO6DALoJ792pfG2wwS2PvDiGFxMfGnNvb3aLnB/s6wTyWBpDYRdwlB5nj37KPk6kpFJj3N9x5BD1oTdmQqeVuacjoiemIulkc33P28tGl6Datth4WpE0LwmrwREQ1NWixi2j1Ti3mjYkyqGVY8XphWKEIIWmheqLnYCXRXhbxZ4E+FGg81ZYG8TKYC/IjzV8p0rLnAI1qS7wdwv5UJ9vQJt6KcxdHHZsUlpIfaJC6N5DvAL/qUY8DoIymgz - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/idpmeta_share_cert.xml b/build/test/misc/idpmeta_share_cert.xml deleted file mode 100644 index 33b0d5b3..00000000 --- a/build/test/misc/idpmeta_share_cert.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - urn:oasis:names:tc:SAML:2.0:nameid-format:entity - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName - - - - - - diff --git a/build/test/misc/invalid_response.xml b/build/test/misc/invalid_response.xml deleted file mode 100644 index 7caf8d0b..00000000 --- a/build/test/misc/invalid_response.xml +++ /dev/null @@ -1,6 +0,0 @@ - - https://idp.example.com/metadata - - - - diff --git a/build/test/misc/logout_request.xml b/build/test/misc/logout_request.xml deleted file mode 100644 index db678cc7..00000000 --- a/build/test/misc/logout_request.xml +++ /dev/null @@ -1,4 +0,0 @@ - - http://sp.example.com/metadata - f92cc1834efc0f73e9c09f482fce80037a6251e7 - diff --git a/build/test/misc/multiple_entitydescriptor.xml b/build/test/misc/multiple_entitydescriptor.xml deleted file mode 100644 index 76659103..00000000 --- a/build/test/misc/multiple_entitydescriptor.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhY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QGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwrE5Lc1NQlQaxR5Gnb2NZApDORRZIVlNv2WUdi9QvM0yCzjQ90jP0OAogHhRYaxg0/vgNEye46h+PiY0CAwEAAaNQME4wHQYDVR0OBBYEFEVkjcLAITndky090Ay74QqCmQKIMB8GA1UdIwQYMBaAFEVkjcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - diff --git a/build/test/misc/request.xml b/build/test/misc/request.xml deleted file mode 100644 index 9bafb7d8..00000000 --- a/build/test/misc/request.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Password diff --git a/build/test/misc/response.xml b/build/test/misc/response.xml deleted file mode 100644 index fd3436ae..00000000 --- a/build/test/misc/response.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 diff --git a/build/test/misc/response_signed.xml b/build/test/misc/response_signed.xml deleted file mode 100644 index ebaa1d16..00000000 --- a/build/test/misc/response_signed.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadatahttps://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1sZOR3aMpVBn1CoSmP674OQfCcyg=h7Dk6GTh4MrNNx8b8Or12SeGsAGBM/ILd7Jgz/RuqR6ixMHrmkRAotou8LvKOzH9I9BfLthqgwcNJGm4hMPHcxoiyVlkqWqnpIMxlWc/vb1E/lXjwo86mZ/hBUJdRhgIfrgIDKCMBf98ftWtUF8I1Hd5qBvY7pTMk3ErQYOtqBfvCCFGwejAfOUKwtY4itQ7AILi4Er2IgALH0zJO7alPugTOwmICd998rafB2wAHWREJkaOfCgCasRkB8tqcWjpLx2oMqiYSTVq2d6PBgAFSmoN9ltO2neTz9pqd0BA1BKIi7PjQYN+F7dB/ffG7V8VjNoPMROrHzq6sY3Ondtv7w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA= diff --git a/build/test/misc/response_signed_cert1.xml b/build/test/misc/response_signed_cert1.xml deleted file mode 100644 index e5790248..00000000 --- a/build/test/misc/response_signed_cert1.xml +++ /dev/null @@ -1 +0,0 @@ -https://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DRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/response_signed_cert2.xml b/build/test/misc/response_signed_cert2.xml deleted file mode 100644 index 1686dab3..00000000 --- a/build/test/misc/response_signed_cert2.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataiPlh1ZRFuCBV07ayPRWVk7xU9SB5JN8mu6xAab3lEo0=ECKTz4y6czJx+KGlZNb8E6mBnFrMQC8hL7YDlAi8dko=JgrKOwRaj4swHYgLra3MOG92BeekCyRgbDfxAk5KLmzeRk1u0w6AmB/qW32mrlM4bn8LtwTq33PiHk6NMbkOfg5X2jQ8vjRyog+tgxDmwdiVkMMHfTWHcOqI5Gou572GayDLC0M9rOv4iHXUoDaul4ozhke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Ep7yFE8z1eduYN6W/7qdtss9BGpnyS5X7LuYfDvd1dHP6/JuqJDbfSVG9prYWcaMRd3FzSC7jBeetJgMyj4dunfqw8R16aONhwvICtzdFa93hYrDvTyo3ae80KFi0WGgApKeoqO5t3l1PAcaA==https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_request_sha1.xml b/build/test/misc/signed_request_sha1.xml deleted file mode 100644 index 7df1a59f..00000000 --- a/build/test/misc/signed_request_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://sp.example.org/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:PasswordtQDisBXKTQ+9OXJO5r7KuJga+KI=oxRkvau7UvYgFEZ7YNAUNf3067V7Tn5C9XSIiet1aZw2FYevNW5bUy/0mxp3aj6AvfFjnmpzAb88BjdwAz2BErDTomRcuZB7Lb0fYTf31N2oZOX0MiPiQOH54I63qJW4Xo3VqdF7GBuFZZHyllfSBv7gfCtjJDwFSCzWK70B9r3cFMRJZLhCJ9oPen+4U9scSYO6g+szBZLl6AiJ06PHc8jzEKGwfQrcZk8kDKUlvNfJMULyq8dpx2VvUAx4p5ewfMOwB9W3Hl3PPa0dO77zZif3CglpcN06f+m6UYG/wnoTQEyKW9hOe+2vGM80W77eWu0dmiaPuqT1ok8LXPuq1A== diff --git a/build/test/misc/signed_request_sha256.xml b/build/test/misc/signed_request_sha256.xml deleted file mode 100644 index 675b732a..00000000 --- a/build/test/misc/signed_request_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=EjCY0hdmiULo0qRy8tJeSANz3uINpdyFmCISiid4vl3KtszPa1mLvx1wGO2RJiFW8Sa18JOS0l8rYP2gwoUYmxU5WS/Cl1QEMlDj46fPpOj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jcLAITndky090Ay74QqCmQKIMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG4lYX3KQXenez4LpDnZhcFBEZi9YstUKPF5EKd+WplpVbcTQc1A3/Z+uHRmyV8h+pQzeF6Liob37G87YpacPplJI66cf2Rj7j8hSBNbdr+66E2qpcEhAF1iJmzBNyhb/ydlEuVpn8/EsoP+HvBeiDl5gon3562MzZIgV/pLdTfxHyW6hzAQhjGq2UhcvR+gXNVJvHP2eS4jlHnJkB9bfo0kvf87Q+D6XKX3q5c3mO8tqW6UpqHSC+uLEpzZiNLeuFa4TUIhgBgjDjlRrNDKu8ndancSn3yBHYnqJ2t9cR+coFnnjYABQpNrvk4mtmXY8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_request_sha512.xml b/build/test/misc/signed_request_sha512.xml deleted file mode 100644 index 49800cb2..00000000 --- a/build/test/misc/signed_request_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -http://localhost:4002/sso/metadata9Ftynct5x7o+SdQM9iie2Z8VzZW95OTtXh4BD4O/HP8=dk+CI6UvXgsM0cHAGAz/Y3gbvehbab92i1jEUmDH0QB7d6/3l7j7TuOEvUFnmtwa0kwpigwpySwXybfiuvgdSBmhejwng5m28bYqaIA8FgCWe/BkBVL5BYeQH03gPbnqhBpC5EXUe52FtOlGAoTGNqaD0pyrshoGiOj/OzqVZC7RSBvvYt5iwpLyqj4KIFFao4yNAfIs2n7RwfcbGg3I2m2b5nuhVppRdzzukdQiLdDCuATPDxKJ3KdETbHb3yss+8L2iDPcAoqsZ+UTZ8VI5DhrQBcarcIe8Xp2FUKQnC4n0AEqCpb87l6txPz7GYDaw9yMqe2xD5LPWQ6/2guvqw==MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMS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8SXoBzYG9Y+lqeAun6+0YyE= diff --git a/build/test/misc/signed_response_sha1.xml b/build/test/misc/signed_response_sha1.xml deleted file mode 100644 index 120a657d..00000000 --- a/build/test/misc/signed_response_sha1.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataCocGj4j5psQ0OfZ1mOlAdQkfwjTqCb95tNqpiFtt6qhTlnn+1IIp9pDpMLubomf9LWwX176PPLWFYxsRmqyEBYlhT53hgAF+z2fEgJdlxXF7FYKsnsn+ujC0ZJP3QkUlWGT9eo74i67JrkAwmiOXPHBJAAN040L/uqmYgjqdnGIFZAyTk4SwplECf1yzVxh4wkETpkf1na1VgTpFC3QDHpXVmCdTbq4FgtgNyfcZmr10d81rmSLjwfHJswV8Qg+cuxXODcn0rxDA5ZA3abpIxGwHUMtKP8ak4amY1urWQTXkhaFjZIChA6E4p870MzfmzVExG6p8/svKf2vDHTAH0w==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDAeFw0xNTA3MDUxODAyMjdaFw0xODA3MDQxODAyMjdaMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxDDAKBgNVBAMMA0lEUDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAODZsWhCe+yG0PalQPTUoD7yko5MTWMCRxJ8hSm2k7mG3Eg/Y2v0EBdCmTw7iDCevRqUmbmFnq7MROyV4eriJzh0KabAdZf7/k6koghst3ZUtWOwzshyxkBtWDwGmBpQGTGsKxJ8M1js3aSqNRXBT4OBWM9w2Glt1+8ty30RhYv3pSF+/HHLH7Ac+vLSIAlokaFW34RWTcJ/8rADuRWlXih4GfnIu0W/ncm5nTSaJiRAvr3dGDRO/khiXoJdbbOj7dHPULxVGbH9IbPK76TCwLbF7ikIMsPovVbTrpyL6vsbVUKeEl/5GKppTwp9DLAOeoSYpCYkkDkYKu9TRQjF02MCAwEAAaNQME4wHQYDVR0OBBYEFP2ut2AQdy6D1dwdwK740IHmbh38MB8GA1UdIwQYMBaAFP2ut2AQdy6D1dwdwK740IHmbh38MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBANMZUoPNmHzgja2PYkbvBYMHmpvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha256.xml b/build/test/misc/signed_response_sha256.xml deleted file mode 100644 index 928dcc90..00000000 --- a/build/test/misc/signed_response_sha256.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadata0TJreH5fvSPwTL8cMGtvYkc8mDQDirHL/0KAU0PPjWXKUqyWSVi7FtDhnAuUakJpfPaYowrHBaUkX+SoJC9uQjXNCgvx5Z7DJfNq+h/vFxoSoxMT/1qeKMKWoNQFVmUErIPMCl0Wou/MfDR8qd+0ofUyLF4pEglczqNBVGi23RirDMZGSgS9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pvUkVoiuvQ9cJPlqGTB2CRfG68BNNs/Clz8P7cIrAdkhCUwi1rSBhDuslGFNrSaIpv6B10FpBuKwef3G7YrPWFNEN6khY7aHNWSTHqKgs1DrGef2B9hvkrnHWbQVSVXrBFKe1wTCqcgGcOpYoSK7L8C6iX6uIA/uZYnVQ4NgBrizJ0azkjdegz3hwO/gt4malEURy8D85/AAVt6PAzhpb9VJUGxSXr/EfntVUEz3L2gUFWWk1CnZFyz0rIOEt/zPmeAY8BLyd/Tjxm4Y+gwNazKq5y9AJS+m858b/nM4QdCnUE4yyoWAJDUHiAmvFA=https://idp.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/signed_response_sha512.xml b/build/test/misc/signed_response_sha512.xml deleted file mode 100644 index 8f268a99..00000000 --- a/build/test/misc/signed_response_sha512.xml +++ /dev/null @@ -1 +0,0 @@ -https://idp.example.com/metadataRkgzPlU7snHmrHTA6tCt0DRqQFyQeNypGIFzaY+2/6OLsNNH0B4gdBWYUWrwMpOGNqHr9Wo+th248ABVoUBtbdQ2pT8M49D0JDGwvl6L8CscTK0xzLGaqaAhHwszmk61WGVOxrbkiZQqOQA8VDiua5bDoXOqiCqEIB6TlSuJ+HH4Lc6u10WSXChI5iC9YwsHoWS8tqFLw6rsx4qPx4hFkZfBUh6JFZNT8hsWiSr4y6d359SIkRgkPUd85+I/3Od//al4HLnIjXaDsahO/YZ9AlvOnBxjUEuk/7kuxZ91LDeI6I8ekno83+ndhk34tnaBc3l1uGeHNhJhpY3eK+LiCw==MIIDlzCCAn+gAwIBAgIJAO1ymQc33+bWMA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNVBAYTAkhLMRMwEQYDVQQIDApTb21lLVN0YXRlMRowGAYDVQQKDBFJZGVudGl0eSBQcm92aWRlcjEUMBIGA1UECwwLRGV2ZWx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.example.com/metadata_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7https://sp.example.com/metadataurn:oasis:names:tc:SAML:2.0:ac:classes:Passwordtesttest@example.comusersexamplerole1 \ No newline at end of file diff --git a/build/test/misc/sp_metadata_98.xml b/build/test/misc/sp_metadata_98.xml deleted file mode 100644 index 40814588..00000000 --- a/build/test/misc/sp_metadata_98.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - - - \ No newline at end of file diff --git a/build/test/misc/spmeta.xml b/build/test/misc/spmeta.xml deleted file mode 100644 index 81068842..00000000 --- a/build/test/misc/spmeta.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKIxlfjmNB9ovhQPstBjP/UPQYp1Ip2IoHCYX9HDgMz3xyXKbHthUzZaECz+p+7WtgwhczRkBLDOm2k15qhPYGPw0vH2zbVRGWUBS9dy2Mp3tqlVbP0xZ9CDNkhCJkV9SMNfoCVW/VYPqK2QBo7ki4obm5x5ixFQSSHsKbVARVzyQH5iNjFe1TdAp3rDwr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IdjpbBgpGEMhGy1wwpwHJsadoBuX0PKyT4O4oHkj1gwWO14qYnK4biviNBqmjGjmN+py+lUcACsQt22abA4s8Xjm/tlvnkgNRE3H44ICvSr8m5MVhyYGoAUe7Qprn2BcsMXd9mrlZ5hEdalNUDRbKb+W7mrKEkKFCbE3wi/Ns2bc4fbNXvwcZoF3/TPzl936u2eivTQESjCLsymIqdYHwRiVLifWQIDAQABo4G7MIG4MB0GA1UdDgQWBBSdBiMAVhKrjzd72sncR13imevq/DCBiAYDVR0jBIGAMH6AFJ0GIwBWEquPN3vaydxHXeKZ6+r8oVukWTBXMQswCQYDVQQGEwJISzESMBAGA1UECBMJSG9uZyBLb25nMRYwFAYDVQQKEw1leHByZXNzLXNhbWwyMQwwCgYDVQQLEwNkZXYxDjAMBgNVBAMTBWVzYW1sggkA1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - - - diff --git a/build/test/misc/spmeta_noassertsign.xml b/build/test/misc/spmeta_noassertsign.xml deleted file mode 100644 index 984917ed..00000000 --- a/build/test/misc/spmeta_noassertsign.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzA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1KrW5S1eXgMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEARi25PJOR+x0ytYCmfXwG5LSXKNHx5BD6G+nBgXm1/DMMJ9ZY34FYMF3gDUu+NmQoVegqARTxetQcCICpAPdKnK0yQb6MXdj3VfQnEA+4hVGFmqnHTK90g0BudEmp1fWKBjJYpLd0oncVwJQJDK5OfS7fMUftN6/Kg6/fDuJMCNIECfKRE8tiXz2Ht924MjedKlH0+qoV1F2Fy5as+QRbj/QfrPTrZrfqhP04mavTPL2bdW6+ykeQWN3zMQtJA8kt2LI0y0CIGhFjLbqAceq+gDkp4drj7/Yw8qaqmxl6GP8w3GbfLu6mXCjCLCGgsATktvWq9dRfBuapaIpNDrv0NA== - - - - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - - - diff --git a/build/test/misc/spmeta_noauthnsign.xml b/build/test/misc/spmeta_noauthnsign.xml deleted file mode 100644 index 0fc8d2c6..00000000 --- a/build/test/misc/spmeta_noauthnsign.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - MIIDozCCAougAwIBAgIJAKNsmL8QbfpwMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTAeFw0xNTA3MDUxNzU2NDdaFw0xODA3MDQxNzU2NDdaMGgxCzAJBgNVBAYTAkhLMRIwEAYDVQQIDAlIb25nIEtvbmcxCzAJBgNVBAcMAkhLMRMwEQYDVQQKDApub2RlLXNhbWwyMSMwIQYJKoZIhvcNAQkBFhRub2RlLnNhbWwyQGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMQJAB8JrsLQbUuJa8akzLqO1EZqClS0tQp+w+5wgufp07WwGn/shma8dcQNj1dbjszI5HBeVFjOKI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