fix(core): Allow Azure's SAML metadata XML containing WS-Federation nodes to pass validation (#11724)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
Danny Martini 2024-11-14 14:33:37 +01:00 committed by GitHub
parent 61fac4f93f
commit 3b62bd58c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 2828 additions and 62 deletions

View file

@ -0,0 +1,352 @@
import { Logger } from '@/logging/logger.service';
import { mockInstance } from '@test/mocking';
import { validateMetadata, validateResponse } from '../saml-validator';
describe('saml-validator', () => {
mockInstance(Logger);
describe('validateMetadata', () => {
test('successfully validates metadata containing ws federation tags', async () => {
// ARRANGE
const metadata = `<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor ID="_1069c6df-0612-4058-ae4e-1987ca45431b"
entityID="https://sts.windows.net/random-issuer/"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="#_1069c6df-0612-4058-ae4e-1987ca45431b">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>hoeupPMPzijHu6caNarGYjsG0eKm4DOFUhjo0bPo0Ls=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
DQnnT/5se4dqYN86R35MCdbyKVl64lGPLSIVrxFxrOQ9YRK1br7Z1Bt1/LQD4f92z+GwAl+9tZTWhuoy6OGHCV6LlqBEztW43KnlCKw6eaNg4/6NluzJ/XeknXYLURDnfFVyGbLQAYWGND4Qm8CUXO/GjGfWTZuArvrDDC36/2FA41jKXtf1InxGFx1Bbaskx3n3KCFFth/V9knbnc1zftEe022aQluPRoGccROOI4ZeLUFL6+1gYlxjx0gFIOTRiuvrzR765lHNrF7iZ4aD+XukqtkGEtxTkiLoB+Bnr8Fd7IF5rV5FKTZWSxo+ZFcLimrDGtFPItVrC/oKRc+MGA==</SignatureValue>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>
MIIC8DCCAdigAwIBAgIQf+iroClVKohAtsyk0Ne13TANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDExMTMxMDEwNTNaFw0yNzExMTMxMDEwNTNaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE8Ad1OMQKfaHi6YrsEcmMNwIAQ86h7JmnuABf5xLNd27jaMF4FVxHbEtC/BYxtcmwld5zbkCVXQ6PT6VoeYIjHMVnptFXg15EGgjnqpxWsjLDQNoSdSQu8VhG+8Yb5M7KPt+UEZfsRZVrgqMjdSEMVrOzPMD8KMB7wnghYX6npcZhn7D5w/F9gVDpI1Um8M/FIUKYVSYFjky1i24WvKmcBf71mAacZp48Zuj5by/ELIb6gAjpW5xpd02smpLthy/Yo4XDIQQurFOfjqyZd8xAZu/SfPsbjtymWw59tgd9RdYISl6O/241kY9h6Ojtx6WShOVDi6q+bJrfj9Z8WKcQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCiVxiQ9KpjihliQzIW45YO0EvRJtoPtyVAh9RiSGozbTl4otfrUJf8nbRtj7iZBRuuW4rrtRAH5kDb+i1wNUUQED2Pl/l4x5cN0oBytP3GSymq6NJx1gUOBO1BrNY+c3r5yHOUyj5qpbw9UkqpG1AqQkLLeZqB/yVCyOBQT7SKTbXVYhGefFM/+6z0/rGsWZN5OF6/2NC06ws1v4In28Atgpg4XxFh5TL7rPMJ11ca5MN9lHJoIUsvls053eQBcd7vJneqzd904B6WtPld6KOJK4dzIt9edHzPhaz158awWwx3iHsMn1Y/T0WVy5/4ZTzxY/i4U3t1Yt8ktxewVJYT</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</Signature>
<RoleDescriptor xsi:type="fed:SecurityTokenServiceType"
protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706">
<KeyDescriptor use="signing">
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>
MIIC8DCCAdigAwIBAgIQf+iroClVKohAtsyk0Ne13TANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDExMTMxMDEwNTNaFw0yNzExMTMxMDEwNTNaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE8Ad1OMQKfaHi6YrsEcmMNwIAQ86h7JmnuABf5xLNd27jaMF4FVxHbEtC/BYxtcmwld5zbkCVXQ6PT6VoeYIjHMVnptFXg15EGgjnqpxWsjLDQNoSdSQu8VhG+8Yb5M7KPt+UEZfsRZVrgqMjdSEMVrOzPMD8KMB7wnghYX6npcZhn7D5w/F9gVDpI1Um8M/FIUKYVSYFjky1i24WvKmcBf71mAacZp48Zuj5by/ELIb6gAjpW5xpd02smpLthy/Yo4XDIQQurFOfjqyZd8xAZu/SfPsbjtymWw59tgd9RdYISl6O/241kY9h6Ojtx6WShOVDi6q+bJrfj9Z8WKcQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCiVxiQ9KpjihliQzIW45YO0EvRJtoPtyVAh9RiSGozbTl4otfrUJf8nbRtj7iZBRuuW4rrtRAH5kDb+i1wNUUQED2Pl/l4x5cN0oBytP3GSymq6NJx1gUOBO1BrNY+c3r5yHOUyj5qpbw9UkqpG1AqQkLLeZqB/yVCyOBQT7SKTbXVYhGefFM/+6z0/rGsWZN5OF6/2NC06ws1v4In28Atgpg4XxFh5TL7rPMJ11ca5MN9lHJoIUsvls053eQBcd7vJneqzd904B6WtPld6KOJK4dzIt9edHzPhaz158awWwx3iHsMn1Y/T0WVy5/4ZTzxY/i4U3t1Yt8ktxewVJYT</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>
<fed:ClaimTypesOffered>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Name</auth:DisplayName>
<auth:Description>The mutable display name of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Subject</auth:DisplayName>
<auth:Description>An immutable, globally unique, non-reusable identifier of the user that is
unique to the application for which a token is issued.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Given Name</auth:DisplayName>
<auth:Description>First name of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Surname</auth:DisplayName>
<auth:Description>Last name of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/displayname"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Display Name</auth:DisplayName>
<auth:Description>Display name of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/nickname"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Nick Name</auth:DisplayName>
<auth:Description>Nick name of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType
Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Authentication Instant</auth:DisplayName>
<auth:Description>The time (UTC) when the user is authenticated to Windows Azure Active
Directory.</auth:Description>
</auth:ClaimType>
<auth:ClaimType
Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Authentication Method</auth:DisplayName>
<auth:Description>The method that Windows Azure Active Directory uses to authenticate users.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/objectidentifier"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>ObjectIdentifier</auth:DisplayName>
<auth:Description>Primary identifier for the user in the directory. Immutable, globally
unique, non-reusable.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/tenantid"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>TenantId</auth:DisplayName>
<auth:Description>Identifier for the user's tenant.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/identityprovider"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>IdentityProvider</auth:DisplayName>
<auth:Description>Identity provider for the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Email</auth:DisplayName>
<auth:Description>Email address of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/groups"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Groups</auth:DisplayName>
<auth:Description>Groups of the user.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/accesstoken"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>External Access Token</auth:DisplayName>
<auth:Description>Access token issued by external identity provider.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>External Access Token Expiration</auth:DisplayName>
<auth:Description>UTC expiration time of access token issued by external identity provider.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/identity/claims/openid2_id"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>External OpenID 2.0 Identifier</auth:DisplayName>
<auth:Description>OpenID 2.0 identifier issued by external identity provider.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/claims/groups.link"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>GroupsOverageClaim</auth:DisplayName>
<auth:Description>Issued when number of user's group claims exceeds return limit.</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>Role Claim</auth:DisplayName>
<auth:Description>Roles that the user or Service Principal is attached to</auth:Description>
</auth:ClaimType>
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/wids"
xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706">
<auth:DisplayName>RoleTemplate Id Claim</auth:DisplayName>
<auth:Description>Role template id of the Built-in Directory Roles that the user is a member
of</auth:Description>
</auth:ClaimType>
</fed:ClaimTypesOffered>
<fed:SecurityTokenServiceEndpoint>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://login.microsoftonline.com/random-issuer/wsfed</wsa:Address>
</wsa:EndpointReference>
</fed:SecurityTokenServiceEndpoint>
<fed:PassiveRequestorEndpoint>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://login.microsoftonline.com/random-issuer/wsfed</wsa:Address>
</wsa:EndpointReference>
</fed:PassiveRequestorEndpoint>
</RoleDescriptor>
<RoleDescriptor xsi:type="fed:ApplicationServiceType"
protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706">
<KeyDescriptor use="signing">
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>
MIIC8DCCAdigAwIBAgIQf+iroClVKohAtsyk0Ne13TANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDExMTMxMDEwNTNaFw0yNzExMTMxMDEwNTNaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE8Ad1OMQKfaHi6YrsEcmMNwIAQ86h7JmnuABf5xLNd27jaMF4FVxHbEtC/BYxtcmwld5zbkCVXQ6PT6VoeYIjHMVnptFXg15EGgjnqpxWsjLDQNoSdSQu8VhG+8Yb5M7KPt+UEZfsRZVrgqMjdSEMVrOzPMD8KMB7wnghYX6npcZhn7D5w/F9gVDpI1Um8M/FIUKYVSYFjky1i24WvKmcBf71mAacZp48Zuj5by/ELIb6gAjpW5xpd02smpLthy/Yo4XDIQQurFOfjqyZd8xAZu/SfPsbjtymWw59tgd9RdYISl6O/241kY9h6Ojtx6WShOVDi6q+bJrfj9Z8WKcQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCiVxiQ9KpjihliQzIW45YO0EvRJtoPtyVAh9RiSGozbTl4otfrUJf8nbRtj7iZBRuuW4rrtRAH5kDb+i1wNUUQED2Pl/l4x5cN0oBytP3GSymq6NJx1gUOBO1BrNY+c3r5yHOUyj5qpbw9UkqpG1AqQkLLeZqB/yVCyOBQT7SKTbXVYhGefFM/+6z0/rGsWZN5OF6/2NC06ws1v4In28Atgpg4XxFh5TL7rPMJ11ca5MN9lHJoIUsvls053eQBcd7vJneqzd904B6WtPld6KOJK4dzIt9edHzPhaz158awWwx3iHsMn1Y/T0WVy5/4ZTzxY/i4U3t1Yt8ktxewVJYT</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>
<fed:TargetScopes>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://sts.windows.net/random-issuer/</wsa:Address>
</wsa:EndpointReference>
</fed:TargetScopes>
<fed:ApplicationServiceEndpoint>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://login.microsoftonline.com/random-issuer/wsfed</wsa:Address>
</wsa:EndpointReference>
</fed:ApplicationServiceEndpoint>
<fed:PassiveRequestorEndpoint>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://login.microsoftonline.com/random-issuer/wsfed</wsa:Address>
</wsa:EndpointReference>
</fed:PassiveRequestorEndpoint>
</RoleDescriptor>
<IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<KeyDescriptor use="signing">
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>
MIIC8DCCAdigAwIBAgIQf+iroClVKohAtsyk0Ne13TANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDExMTMxMDEwNTNaFw0yNzExMTMxMDEwNTNaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwE8Ad1OMQKfaHi6YrsEcmMNwIAQ86h7JmnuABf5xLNd27jaMF4FVxHbEtC/BYxtcmwld5zbkCVXQ6PT6VoeYIjHMVnptFXg15EGgjnqpxWsjLDQNoSdSQu8VhG+8Yb5M7KPt+UEZfsRZVrgqMjdSEMVrOzPMD8KMB7wnghYX6npcZhn7D5w/F9gVDpI1Um8M/FIUKYVSYFjky1i24WvKmcBf71mAacZp48Zuj5by/ELIb6gAjpW5xpd02smpLthy/Yo4XDIQQurFOfjqyZd8xAZu/SfPsbjtymWw59tgd9RdYISl6O/241kY9h6Ojtx6WShOVDi6q+bJrfj9Z8WKcQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCiVxiQ9KpjihliQzIW45YO0EvRJtoPtyVAh9RiSGozbTl4otfrUJf8nbRtj7iZBRuuW4rrtRAH5kDb+i1wNUUQED2Pl/l4x5cN0oBytP3GSymq6NJx1gUOBO1BrNY+c3r5yHOUyj5qpbw9UkqpG1AqQkLLeZqB/yVCyOBQT7SKTbXVYhGefFM/+6z0/rGsWZN5OF6/2NC06ws1v4In28Atgpg4XxFh5TL7rPMJ11ca5MN9lHJoIUsvls053eQBcd7vJneqzd904B6WtPld6KOJK4dzIt9edHzPhaz158awWwx3iHsMn1Y/T0WVy5/4ZTzxY/i4U3t1Yt8ktxewVJYT</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://login.microsoftonline.com/random-issuer/saml2" />
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://login.microsoftonline.com/random-issuer/saml2" />
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://login.microsoftonline.com/random-issuer/saml2" />
</IDPSSODescriptor>
</EntityDescriptor>`;
// ACT
const result = await validateMetadata(metadata);
// ASSERT
expect(result).toBe(true);
});
test('rejects invalid metadata', async () => {
// ARRANGE
// Invalid because required children are missing
const metadata = `<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor ID="_1069c6df-0612-4058-ae4e-1987ca45431b"
entityID="https://sts.windows.net/random-issuer/"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
</EntityDescriptor>`;
// ACT
const result = await validateMetadata(metadata);
// ASSERT
expect(result).toBe(false);
});
});
describe('validateResponse', () => {
test('successfully validates response', async () => {
// ARRANGE
const response = `<samlp:Response ID="random_id" Version="2.0"
IssueInstant="2024-11-13T14:58:00.371Z" Destination="random-url"
InResponseTo="random_id"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
https://sts.windows.net/random-issuer/</Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
</samlp:Status>
<Assertion ID="_random_id" IssueInstant="2024-11-13T14:58:00.367Z"
Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<Issuer>https://sts.windows.net/random-issuer/</Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="#_random_id">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>random_digest</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
cmFuZG9tX3NpZ25hdHVyZQo=</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
cmFuZG9tX3NpZ25hdHVyZQo=</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
<Subject>
<NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
random_name_id</NameID>
<SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<SubjectConfirmationData InResponseTo="random_id"
NotOnOrAfter="2024-11-13T15:58:00.284Z"
Recipient="random-url" />
</SubjectConfirmation>
</Subject>
<Conditions NotBefore="2024-11-13T14:53:00.284Z" NotOnOrAfter="2024-11-13T15:58:00.284Z">
<AudienceRestriction>
<Audience>http://localhost:5678/rest/sso/saml/metadata</Audience>
</AudienceRestriction>
</Conditions>
<AttributeStatement>
<Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid">
<AttributeValue>random-issuer</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier">
<AttributeValue>4663f730-51c5-4490-a38a-19dda804865a</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.microsoft.com/identity/claims/displayname">
<AttributeValue>Danny n8n</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider">
<AttributeValue>mail</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
<AttributeValue>Danny</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
<AttributeValue>Martini</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
<AttributeValue>danny@n8n.io</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
<AttributeValue>random_name_id</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstname/firstname">
<AttributeValue>Danny</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/lastname/lastname">
<AttributeValue>Martini</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn/upn">
<AttributeValue>danny@n8n.io</AttributeValue>
</Attribute>
</AttributeStatement>
<AuthnStatement AuthnInstant="2024-11-13T14:51:51.267Z"
SessionIndex="_random_id">
<AuthnContext>
<AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Unspecified</AuthnContextClassRef>
</AuthnContext>
</AuthnStatement>
</Assertion>
</samlp:Response>`;
// ACT
const result = await validateResponse(response);
// ASSERT
expect(result).toBe(true);
});
test('rejects invalidate response', async () => {
// ARRANGE
// Invalid because required children are missing
const response = `<samlp:Response ID="random_id" Version="2.0"
IssueInstant="2024-11-13T14:58:00.371Z" Destination="random-url"
InResponseTo="random_id"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
</samlp:Response>`;
// ACT
const result = await validateResponse(response);
// ASSERT
expect(result).toBe(false);
});
});
});

View file

@ -98,7 +98,7 @@ describe('SamlService', () => {
expect(samlService.reset).toHaveBeenCalledTimes(0); expect(samlService.reset).toHaveBeenCalledTimes(0);
}); });
test('does not call reset if no error is trown', async () => { test('does not call reset if no error is thrown', async () => {
// ARRANGE // ARRANGE
jest.spyOn(samlService, 'reset'); jest.spyOn(samlService, 'reset');

View file

@ -3,61 +3,36 @@ import type { XMLFileInfo } from 'xmllint-wasm';
import { Logger } from '@/logging/logger.service'; import { Logger } from '@/logging/logger.service';
let xml: XMLFileInfo;
let xmldsigCore: XMLFileInfo;
let xmlXenc: XMLFileInfo;
let xmlMetadata: XMLFileInfo; let xmlMetadata: XMLFileInfo;
let xmlAssertion: XMLFileInfo;
let xmlProtocol: XMLFileInfo; let xmlProtocol: XMLFileInfo;
let preload: XMLFileInfo[] = [];
// eslint-disable-next-line @typescript-eslint/consistent-type-imports // eslint-disable-next-line @typescript-eslint/consistent-type-imports
let xmllintWasm: typeof import('xmllint-wasm') | undefined; let xmllintWasm: typeof import('xmllint-wasm') | undefined;
// dynamically load schema files // dynamically load schema files
async function loadSchemas(): Promise<void> { async function loadSchemas(): Promise<void> {
if (!xml || xml.contents === '') { xmlProtocol = (await import('./schema/saml-schema-protocol-2.0.xsd')).xmlFileInfo;
Container.get(Logger).debug('Loading XML schema files for SAML validation into memory'); xmlMetadata = (await import('./schema/saml-schema-metadata-2.0.xsd')).xmlFileInfo;
const f = await import('./schema/xml.xsd'); preload = (
xml = { await Promise.all([
fileName: 'xml.xsd', // SAML
contents: f.xsdXml, import('./schema/saml-schema-assertion-2.0.xsd'),
}; import('./schema/xmldsig-core-schema.xsd'),
} import('./schema/xenc-schema.xsd'),
if (!xmldsigCore || xmldsigCore.contents === '') { import('./schema/xml.xsd'),
const f = await import('./schema/xmldsig-core-schema.xsd');
xmldsigCore = { // WS-Federation
fileName: 'xmldsig-core-schema.xsd', import('./schema/ws-federation.xsd'),
contents: f.xsdXmldsigCore, import('./schema/oasis-200401-wss-wssecurity-secext-1.0.xsd'),
}; import('./schema/oasis-200401-wss-wssecurity-utility-1.0.xsd'),
} import('./schema/ws-addr.xsd'),
if (!xmlXenc || xmlXenc.contents === '') { import('./schema/metadata-exchange.xsd'),
const f = await import('./schema/xenc-schema.xsd'); import('./schema/ws-securitypolicy-1.2.xsd'),
xmlXenc = { import('./schema/ws-authorization.xsd'),
fileName: 'xenc-schema.xsd', ])
contents: f.xsdXenc, ).map((m) => m.xmlFileInfo);
};
}
if (!xmlMetadata || xmlMetadata.contents === '') {
const f = await import('./schema/saml-schema-metadata-2.0.xsd');
xmlMetadata = {
fileName: 'saml-schema-metadata-2.0.xsd',
contents: f.xsdSamlSchemaMetadata20,
};
}
if (!xmlAssertion || xmlAssertion.contents === '') {
const f = await import('./schema/saml-schema-assertion-2.0.xsd');
xmlAssertion = {
fileName: 'saml-schema-assertion-2.0.xsd',
contents: f.xsdSamlSchemaAssertion20,
};
}
if (!xmlProtocol || xmlProtocol.contents === '') {
const f = await import('./schema/saml-schema-protocol-2.0.xsd');
xmlProtocol = {
fileName: 'saml-schema-protocol-2.0.xsd',
contents: f.xsdSamlSchemaProtocol20,
};
}
} }
// dynamically load xmllint-wasm // dynamically load xmllint-wasm
@ -82,7 +57,7 @@ export async function validateMetadata(metadata: string): Promise<boolean> {
], ],
extension: 'schema', extension: 'schema',
schema: [xmlMetadata], schema: [xmlMetadata],
preload: [xmlProtocol, xmlAssertion, xmldsigCore, xmlXenc, xml], preload: [xmlProtocol, ...preload],
}); });
if (validationResult?.valid) { if (validationResult?.valid) {
logger.debug('SAML Metadata is valid'); logger.debug('SAML Metadata is valid');
@ -118,7 +93,7 @@ export async function validateResponse(response: string): Promise<boolean> {
], ],
extension: 'schema', extension: 'schema',
schema: [xmlProtocol], schema: [xmlProtocol],
preload: [xmlMetadata, xmlAssertion, xmldsigCore, xmlXenc, xml], preload: [xmlMetadata, ...preload],
}); });
if (validationResult?.valid) { if (validationResult?.valid) {
logger.debug('SAML Response is valid'); logger.debug('SAML Response is valid');

View file

@ -0,0 +1,117 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'MetadataExchange.xsd',
contents: `<?xml version='1.0' encoding='UTF-8' ?>
<!--
(c) 2004-2006 BEA Systems Inc., Computer Associates International, Inc.,
International Business Machines Corporation, Microsoft Corporation,
Inc., SAP AG, Sun Microsystems, and webMethods. All rights reserved.
Permission to copy and display the WS-MetadataExchange Specification
(the "Specification"), in any medium without fee or royalty is hereby
granted, provided that you include the following on ALL copies of the
Specification that you make:
1. A link or URL to the Specification at this location.
2. The copyright notice as shown in the Specification.
BEA Systems, Computer Associates, IBM, Microsoft, SAP, Sun, and
webMethods (collectively, the "Authors") each agree to grant you a
license, under royalty-free and otherwise reasonable,
non-discriminatory terms and conditions, to their respective essential
patent claims that they deem necessary to implement the
WS-MetadataExchange Specification.
THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE
SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
USE OR DISTRIBUTION OF THE SPECIFICATIONS.
The name and trademarks of the Authors may NOT be used in any manner,
including advertising or publicity pertaining to the Specifications or
their contents without specific, written prior permission. Title to
copyright in the Specifications will at all times remain with the
Authors.
No other rights are granted by implication, estoppel or otherwise.
-->
<xs:schema
targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
xmlns:tns='http://schemas.xmlsoap.org/ws/2004/09/mex'
xmlns:wsa10='http://www.w3.org/2005/08/addressing'
xmlns:wsa04='http://schemas.xmlsoap.org/ws/2004/08/addressing'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
elementFormDefault='qualified'
blockDefault='#all' >
<!-- Get Metadata request -->
<xs:element name='GetMetadata' >
<xs:complexType>
<xs:sequence>
<xs:element ref='tns:Dialect' minOccurs='0' />
<xs:element ref='tns:Identifier' minOccurs='0' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
</xs:element>
<xs:element name='Dialect' type='xs:anyURI' />
<xs:element name='Identifier' type='xs:anyURI' />
<!-- Get Metadata response -->
<xs:element name='Metadata' >
<xs:complexType>
<xs:sequence>
<xs:element ref='tns:MetadataSection'
minOccurs='0'
maxOccurs='unbounded' />
<xs:any namespace='##other' processContents='lax'
minOccurs='0'
maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
</xs:element>
<xs:element name='MetadataSection' >
<xs:complexType>
<xs:choice>
<xs:any namespace='##other' processContents='lax' />
<xs:element ref='tns:MetadataReference' />
<xs:element ref='tns:Location' />
</xs:choice>
<xs:attribute name='Dialect' type='xs:anyURI' use='required' />
<xs:attribute name='Identifier' type='xs:anyURI' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
</xs:element>
<!--
Ideally, the type of the MetadataReference would have been
the union of wsa04:EndpointReferenceType and
wsa10:EndpointReferenceType but unfortunately xs:union only
works for simple types. As a result, we have to define
the mex:MetadataReference using xs:any.
-->
<xs:element name='MetadataReference'>
<xs:complexType>
<xs:sequence>
<xs:any minOccurs='1' maxOccurs='unbounded'
processContents='lax' namespace='##other' />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='Location'
type='xs:anyURI' />
</xs:schema>`,
};

View file

@ -0,0 +1,200 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'oasis-200401-wss-wssecurity-secext-1.0.xsd',
contents: `<?xml version="1.0" encoding="UTF-8"?>
<!--
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
Copyright © OASIS Open 2002-2004. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an AS IS basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->
<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="0.2">
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
<xsd:complexType name="AttributedString">
<xsd:annotation>
<xsd:documentation>This type represents an element with arbitrary attributes.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="wsu:Id"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="PasswordString">
<xsd:annotation>
<xsd:documentation>This type is used for password elements per Section 4.1.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="wsse:AttributedString">
<xsd:attribute name="Type" type="xsd:anyURI"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EncodedString">
<xsd:annotation>
<xsd:documentation>This type is used for elements containing stringified binary data.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="wsse:AttributedString">
<xsd:attribute name="EncodingType" type="xsd:anyURI"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="UsernameTokenType">
<xsd:annotation>
<xsd:documentation>This type represents a username token per Section 4.1</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Username" type="wsse:AttributedString"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute ref="wsu:Id"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="BinarySecurityTokenType">
<xsd:annotation>
<xsd:documentation>A security token that is encoded in binary</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="wsse:EncodedString">
<xsd:attribute name="ValueType" type="xsd:anyURI"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="KeyIdentifierType">
<xsd:annotation>
<xsd:documentation>A security token key identifier</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="wsse:EncodedString">
<xsd:attribute name="ValueType" type="xsd:anyURI"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="tUsage">
<xsd:annotation>
<xsd:documentation>Typedef to allow a list of usages (as URIs).</xsd:documentation>
</xsd:annotation>
<xsd:list itemType="xsd:anyURI"/>
</xsd:simpleType>
<xsd:attribute name="Usage" type="tUsage">
<xsd:annotation>
<xsd:documentation>This global attribute is used to indicate the usage of a referenced or indicated token within the containing context</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:complexType name="ReferenceType">
<xsd:annotation>
<xsd:documentation>This type represents a reference to an external security token.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="URI" type="xsd:anyURI"/>
<xsd:attribute name="ValueType" type="xsd:anyURI"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="EmbeddedType">
<xsd:annotation>
<xsd:documentation>This type represents a reference to an embedded security token.</xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:any processContents="lax"/>
</xsd:choice>
<xsd:attribute name="ValueType" type="xsd:anyURI"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="SecurityTokenReferenceType">
<xsd:annotation>
<xsd:documentation>This type is used reference a security token.</xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:any processContents="lax"/>
</xsd:choice>
<xsd:attribute ref="wsu:Id"/>
<xsd:attribute ref="wsse:Usage"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="SecurityHeaderType">
<xsd:annotation>
<xsd:documentation>This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The use of "any" is to allow extensibility and different forms of security data.</xsd:documentation>
</xsd:annotation>
</xsd:any>
</xsd:sequence>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:complexType name="TransformationParametersType">
<xsd:annotation>
<xsd:documentation>This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The use of "any" is to allow extensibility from any namespace.</xsd:documentation>
</xsd:annotation>
</xsd:any>
</xsd:sequence>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
<xsd:element name="UsernameToken" type="wsse:UsernameTokenType">
<xsd:annotation>
<xsd:documentation>This element defines the wsse:UsernameToken element per Section 4.1.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="BinarySecurityToken" type="wsse:BinarySecurityTokenType">
<xsd:annotation>
<xsd:documentation>This element defines the wsse:BinarySecurityToken element per Section 4.2.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Reference" type="wsse:ReferenceType">
<xsd:annotation>
<xsd:documentation>This element defines a security token reference</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Embedded" type="wsse:EmbeddedType">
<xsd:annotation>
<xsd:documentation>This element defines a security token embedded reference</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="KeyIdentifier" type="wsse:KeyIdentifierType">
<xsd:annotation>
<xsd:documentation>This element defines a key identifier reference</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="SecurityTokenReference" type="wsse:SecurityTokenReferenceType">
<xsd:annotation>
<xsd:documentation>This element defines the wsse:SecurityTokenReference per Section 4.3.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Security" type="wsse:SecurityHeaderType">
<xsd:annotation>
<xsd:documentation>This element defines the wsse:Security SOAP header element per Section 4.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="TransformationParameters" type="wsse:TransformationParametersType">
<xsd:annotation>
<xsd:documentation>This element contains properties for transformations from any namespace, including DSIG.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Password" type="wsse:PasswordString"/>
<xsd:element name="Nonce" type="wsse:EncodedString"/>
<xsd:simpleType name="FaultcodeEnum">
<xsd:restriction base="xsd:QName">
<xsd:enumeration value="wsse:UnsupportedSecurityToken"/>
<xsd:enumeration value="wsse:UnsupportedAlgorithm"/>
<xsd:enumeration value="wsse:InvalidSecurity"/>
<xsd:enumeration value="wsse:InvalidSecurityToken"/>
<xsd:enumeration value="wsse:FailedAuthentication"/>
<xsd:enumeration value="wsse:FailedCheck"/>
<xsd:enumeration value="wsse:SecurityTokenUnavailable"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>`,
};

View file

@ -0,0 +1,113 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'oasis-200401-wss-wssecurity-utility-1.0.xsd',
contents: `<?xml version="1.0" encoding="UTF-8"?>
<!--
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
Copyright © OASIS Open 2002-2004. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an AS IS basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->
<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1">
<!-- // Fault Codes /////////////////////////////////////////// -->
<xsd:simpleType name="tTimestampFault">
<xsd:annotation>
<xsd:documentation>
This type defines the fault code value for Timestamp message expiration.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:QName">
<xsd:enumeration value="wsu:MessageExpired"/>
</xsd:restriction>
</xsd:simpleType>
<!-- // Global attributes //////////////////////////////////// -->
<xsd:attribute name="Id" type="xsd:ID">
<xsd:annotation>
<xsd:documentation>
This global attribute supports annotating arbitrary elements with an ID.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attributeGroup name="commonAtts">
<xsd:annotation>
<xsd:documentation>
Convenience attribute group used to simplify this schema.
</xsd:documentation>
</xsd:annotation>
<xsd:attribute ref="wsu:Id" use="optional"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:attributeGroup>
<!-- // Utility types //////////////////////////////////////// -->
<xsd:complexType name="AttributedDateTime">
<xsd:annotation>
<xsd:documentation>
This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attributeGroup ref="wsu:commonAtts"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="AttributedURI">
<xsd:annotation>
<xsd:documentation>
This type is for elements whose [children] is an anyURI and can have arbitrary attributes.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attributeGroup ref="wsu:commonAtts"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- // Timestamp header components /////////////////////////// -->
<xsd:complexType name="TimestampType">
<xsd:annotation>
<xsd:documentation>
This complex type ties together the timestamp related elements into a composite type.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="wsu:Created" minOccurs="0"/>
<xsd:element ref="wsu:Expires" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:sequence>
<xsd:attributeGroup ref="wsu:commonAtts"/>
</xsd:complexType>
<xsd:element name="Timestamp" type="wsu:TimestampType">
<xsd:annotation>
<xsd:documentation>
This element allows Timestamps to be applied anywhere element wildcards are present,
including as a SOAP header.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- global element decls to allow individual elements to appear anywhere -->
<xsd:element name="Expires" type="wsu:AttributedDateTime">
<xsd:annotation>
<xsd:documentation>
This element allows an expiration time to be applied anywhere element wildcards are present.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Created" type="wsu:AttributedDateTime">
<xsd:annotation>
<xsd:documentation>
This element allows a creation time to be applied anywhere element wildcards are present.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:schema>`,
};

View file

@ -1,4 +1,8 @@
export const xsdSamlSchemaAssertion20 = `<?xml version="1.0" encoding="US-ASCII"?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'saml-schema-assertion-2.0.xsd',
contents: `<?xml version="1.0" encoding="US-ASCII"?>
<schema <schema
targetNamespace="urn:oasis:names:tc:SAML:2.0:assertion" targetNamespace="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"
@ -280,4 +284,5 @@ export const xsdSamlSchemaAssertion20 = `<?xml version="1.0" encoding="US-ASCII"
</complexType> </complexType>
<element name="AttributeValue" type="anyType" nillable="true"/> <element name="AttributeValue" type="anyType" nillable="true"/>
<element name="EncryptedAttribute" type="saml:EncryptedElementType"/> <element name="EncryptedAttribute" type="saml:EncryptedElementType"/>
</schema>`; </schema>`,
};

View file

@ -1,4 +1,8 @@
export const xsdSamlSchemaMetadata20 = `<?xml version="1.0" encoding="UTF-8"?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'saml-schema-metadata-2.0.xsd',
contents: `<?xml version="1.0" encoding="UTF-8"?>
<schema <schema
targetNamespace="urn:oasis:names:tc:SAML:2.0:metadata" targetNamespace="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
@ -18,6 +22,8 @@ export const xsdSamlSchemaMetadata20 = `<?xml version="1.0" encoding="UTF-8"?>
schemaLocation="saml-schema-assertion-2.0.xsd"/> schemaLocation="saml-schema-assertion-2.0.xsd"/>
<import namespace="http://www.w3.org/XML/1998/namespace" <import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/> schemaLocation="xml.xsd"/>
<import namespace="http://docs.oasis-open.org/wsfed/authorization/200706"
schemaLocation="ws-federation.xsd"/>
<annotation> <annotation>
<documentation> <documentation>
Document identifier: saml-schema-metadata-2.0 Document identifier: saml-schema-metadata-2.0
@ -333,4 +339,5 @@ export const xsdSamlSchemaMetadata20 = `<?xml version="1.0" encoding="UTF-8"?>
<anyAttribute namespace="##other" processContents="lax"/> <anyAttribute namespace="##other" processContents="lax"/>
</complexType> </complexType>
<element name="AffiliateMember" type="md:entityIDType"/> <element name="AffiliateMember" type="md:entityIDType"/>
</schema>`; </schema>`,
};

View file

@ -1,4 +1,8 @@
export const xsdSamlSchemaProtocol20 = `<?xml version="1.0" encoding="UTF-8"?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'saml-schema-protocol-2.0.xsd',
contents: `<?xml version="1.0" encoding="UTF-8"?>
<schema <schema
targetNamespace="urn:oasis:names:tc:SAML:2.0:protocol" targetNamespace="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"
@ -299,4 +303,5 @@ export const xsdSamlSchemaProtocol20 = `<?xml version="1.0" encoding="UTF-8"?>
</extension> </extension>
</complexContent> </complexContent>
</complexType> </complexType>
</schema>`; </schema>`,
};

View file

@ -0,0 +1,142 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'ws-addr.xsd',
contents: `<?xml version="1.0" encoding="utf-8"?>
<!--
W3C XML Schema defined in the Web Services Addressing 1.0 specification
http://www.w3.org/TR/ws-addr-core
Copyright © 2005 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium for
Informatics and Mathematics, Keio University). All Rights Reserved. This
work is distributed under the W3C® Software License [1] in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
$Id: ws-addr.xsd,v 1.2 2008/07/23 13:38:16 plehegar Exp $
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2005/08/addressing" targetNamespace="http://www.w3.org/2005/08/addressing" blockDefault="#all" elementFormDefault="qualified" finalDefault="" attributeFormDefault="unqualified">
<!-- Constructs from the WS-Addressing Core -->
<xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
<xs:complexType name="EndpointReferenceType" mixed="false">
<xs:sequence>
<xs:element name="Address" type="tns:AttributedURIType"/>
<xs:element ref="tns:ReferenceParameters" minOccurs="0"/>
<xs:element ref="tns:Metadata" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:element name="ReferenceParameters" type="tns:ReferenceParametersType"/>
<xs:complexType name="ReferenceParametersType" mixed="false">
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:element name="Metadata" type="tns:MetadataType"/>
<xs:complexType name="MetadataType" mixed="false">
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
<xs:element name="MessageID" type="tns:AttributedURIType"/>
<xs:element name="RelatesTo" type="tns:RelatesToType"/>
<xs:complexType name="RelatesToType" mixed="false">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="RelationshipTypeOpenEnum">
<xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
</xs:simpleType>
<xs:simpleType name="RelationshipType">
<xs:restriction base="xs:anyURI">
<xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
<xs:element name="From" type="tns:EndpointReferenceType"/>
<xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
<xs:element name="To" type="tns:AttributedURIType"/>
<xs:element name="Action" type="tns:AttributedURIType"/>
<xs:complexType name="AttributedURIType" mixed="false">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Constructs from the WS-Addressing SOAP binding -->
<xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
<xs:simpleType name="FaultCodesOpenEnumType">
<xs:union memberTypes="tns:FaultCodesType xs:QName"/>
</xs:simpleType>
<xs:simpleType name="FaultCodesType">
<xs:restriction base="xs:QName">
<xs:enumeration value="tns:InvalidAddressingHeader"/>
<xs:enumeration value="tns:InvalidAddress"/>
<xs:enumeration value="tns:InvalidEPR"/>
<xs:enumeration value="tns:InvalidCardinality"/>
<xs:enumeration value="tns:MissingAddressInEPR"/>
<xs:enumeration value="tns:DuplicateMessageID"/>
<xs:enumeration value="tns:ActionMismatch"/>
<xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
<xs:enumeration value="tns:DestinationUnreachable"/>
<xs:enumeration value="tns:ActionNotSupported"/>
<xs:enumeration value="tns:EndpointUnavailable"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
<xs:complexType name="AttributedUnsignedLongType" mixed="false">
<xs:simpleContent>
<xs:extension base="xs:unsignedLong">
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
<xs:complexType name="AttributedQNameType" mixed="false">
<xs:simpleContent>
<xs:extension base="xs:QName">
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
<xs:element name="ProblemAction" type="tns:ProblemActionType"/>
<xs:complexType name="ProblemActionType" mixed="false">
<xs:sequence>
<xs:element ref="tns:Action" minOccurs="0"/>
<xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
</xs:schema>`,
};

View file

@ -0,0 +1,150 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'ws-authorization.xsd',
contents: `<?xml version="1.0" encoding="utf-8"?>
<!--
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the
implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available;
neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS
specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users
of this specification, can be obtained from the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may
cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
Copyright © OASIS Open 2002-2007. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist
in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the
above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified
in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications,
in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate
it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an AS IS basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:xenc='http://www.w3.org/2001/04/xmlenc#'
xmlns:tns='http://docs.oasis-open.org/wsfed/authorization/200706'
targetNamespace='http://docs.oasis-open.org/wsfed/authorization/200706'
elementFormDefault='qualified' >
<xs:import namespace='http://www.w3.org/2001/04/xmlenc#'
schemaLocation='xenc-schema.xsd'/>
<!-- Section 9.2 -->
<xs:element name='AdditionalContext' type='tns:AdditionalContextType' />
<xs:complexType name='AdditionalContextType' >
<xs:sequence>
<xs:element name='ContextItem' type='tns:ContextItemType' minOccurs='0' maxOccurs='unbounded' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='ContextItemType' >
<xs:choice minOccurs='0'>
<xs:element name='Value' type='xs:string' minOccurs='1' maxOccurs='1' />
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='1' />
</xs:choice>
<xs:attribute name='Name' type='xs:anyURI' use='required' />
<xs:attribute name='Scope' type='xs:anyURI' use='optional' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 9.3 -->
<xs:element name='ClaimType' type='tns:ClaimType' />
<xs:complexType name='ClaimType' >
<xs:sequence>
<xs:element name="DisplayName" type="tns:DisplayNameType" minOccurs="0" maxOccurs="1" />
<xs:element name="Description" type="tns:DescriptionType" minOccurs="0" maxOccurs="1" />
<xs:element name="DisplayValue" type="tns:DisplayValueType" minOccurs="0" maxOccurs="1" />
<xs:choice minOccurs='0'>
<xs:element name='Value' type='xs:string' minOccurs='1' maxOccurs='1' />
<xs:element name='EncryptedValue' type='tns:EncryptedValueType' minOccurs='1' maxOccurs='1' />
<xs:element name='StructuredValue' type='tns:StructuredValueType' minOccurs='1' maxOccurs='1' />
<xs:element name='ConstrainedValue' type='tns:ConstrainedValueType' minOccurs='1' maxOccurs='1' />
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='1' />
</xs:choice>
</xs:sequence>
<xs:attribute name='Uri' type='xs:anyURI' use='required' />
<xs:attribute name='Optional' type='xs:boolean' use='optional' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name="DisplayNameType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="DescriptionType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="DisplayValueType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="##other" processContents="lax" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="EncryptedValueType">
<xs:sequence>
<xs:element ref="xenc:EncryptedData" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="DecryptionCondition" type="xs:anyURI" use="optional"/>
</xs:complexType>
<xs:complexType name="StructuredValueType">
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 9.3.1 -->
<xs:complexType name='ConstrainedValueType'>
<xs:sequence>
<xs:choice minOccurs='1'>
<xs:element name='ValueLessThan' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueLessThanOrEqual' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueGreaterThan' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueGreaterThanOrEqual' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueInRangen' type='tns:ValueInRangeType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueOneOf' type='tns:ConstrainedManyValueType' minOccurs='1' maxOccurs='1'/>
</xs:choice>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute name='AssertConstraint' type='xs:boolean' use='optional' />
</xs:complexType>
<xs:complexType name='ValueInRangeType'>
<xs:sequence>
<xs:element name='ValueUpperBound' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
<xs:element name='ValueLowerBound' type='tns:ConstrainedSingleValueType' minOccurs='1' maxOccurs='1'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='ConstrainedSingleValueType'>
<xs:choice minOccurs='0'>
<xs:element name='Value' type='xs:string' minOccurs='1' maxOccurs='1' />
<xs:element name='StructuredValue' type='tns:StructuredValueType' minOccurs='1' maxOccurs='1' />
</xs:choice>
</xs:complexType>
<xs:complexType name='ConstrainedManyValueType'>
<xs:choice minOccurs='0'>
<xs:element name='Value' type='xs:string' minOccurs='1' maxOccurs='unbounded' />
<xs:element name='StructuredValue' type='tns:StructuredValueType' minOccurs='1' maxOccurs='unbounded' />
</xs:choice>
</xs:complexType>
</xs:schema>`,
};

View file

@ -0,0 +1,475 @@
import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'ws-federation.xsd',
contents: `<?xml version="1.0" encoding="UTF-8" ?>
<!--
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the
implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available;
neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS
specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users
of this specification, can be obtained from the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may
cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
Copyright © OASIS Open 2002-2007. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist
in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the
above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified
in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications,
in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate
it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an AS IS basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:sp='http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702'
xmlns:tns='http://docs.oasis-open.org/wsfed/federation/200706'
xmlns:wsa='http://www.w3.org/2005/08/addressing'
xmlns:mex='http://schemas.xmlsoap.org/ws/2004/09/mex'
xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata'
xmlns:auth='http://docs.oasis-open.org/wsfed/authorization/200706'
targetNamespace='http://docs.oasis-open.org/wsfed/federation/200706'
elementFormDefault='qualified' >
<xs:import namespace='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
schemaLocation='oasis-200401-wss-wssecurity-secext-1.0.xsd' />
<xs:import namespace='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
schemaLocation='oasis-200401-wss-wssecurity-utility-1.0.xsd' />
<xs:import namespace='http://www.w3.org/2005/08/addressing'
schemaLocation='ws-addr.xsd' />
<xs:import namespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
schemaLocation='MetadataExchange.xsd' />
<xs:import namespace='urn:oasis:names:tc:SAML:2.0:metadata'
schemaLocation='saml-schema-metadata-2.0.xsd' />
<xs:import namespace='http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702'
schemaLocation='ws-securitypolicy-1.2.xsd'/>
<xs:import namespace='http://docs.oasis-open.org/wsfed/authorization/200706'
schemaLocation='ws-authorization.xsd'/>
<!-- Section 3.1 -->
<!-- Note: Use of this root element is discouraged in favor of use of md:EntitiesDescriptor or md EntityDescriptor -->
<xs:element name='FederationMetadata' type='tns:FederationMetadataType' />
<xs:complexType name='FederationMetadataType' >
<xs:sequence>
<!--
*** Accurate content model is nondeterministic ***
<xs:element name='Federation' type='tns:FederationType' minOccurs='1' maxOccurs='unbounded' />
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
-->
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='FederationType' >
<xs:sequence>
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute name='FederationID' type='xs:anyURI' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.2.1 -->
<xs:complexType name="WebServiceDescriptorType" abstract="true">
<xs:complexContent>
<xs:extension base="md:RoleDescriptorType">
<xs:sequence>
<xs:element ref="tns:LogicalServiceNamesOffered" minOccurs="0" maxOccurs="1" />
<xs:element ref="tns:TokenTypesOffered" minOccurs="0" maxOccurs="1" />
<xs:element ref="tns:ClaimDialectsOffered" minOccurs="0" maxOccurs="1" />
<xs:element ref="tns:ClaimTypesOffered" minOccurs="0" maxOccurs="1" />
<xs:element ref="tns:ClaimTypesRequested" minOccurs="0" maxOccurs="1" />
<xs:element ref="tns:AutomaticPseudonyms" minOccurs="0" maxOccurs="1"/>
<xs:element ref="tns:TargetScopes" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="ServiceDisplayName" type="xs:string" use="optional"/>
<xs:attribute name="ServiceDescription" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name='LogicalServiceNamesOffered' type='tns:LogicalServiceNamesOfferedType' />
<xs:element name='TokenTypesOffered' type='tns:TokenTypesOfferedType' />
<xs:element name='ClaimDialectsOffered' type='tns:ClaimDialectsOfferedType' />
<xs:element name='ClaimTypesOffered' type='tns:ClaimTypesOfferedType' />
<xs:element name='ClaimTypesRequested' type='tns:ClaimTypesRequestedType' />
<xs:element name="AutomaticPseudonyms" type="xs:boolean"/>
<xs:element name='TargetScopes' type='tns:EndpointType'/>
<!-- Section 3.1.2.2 -->
<xs:complexType name="SecurityTokenServiceType">
<xs:complexContent>
<xs:extension base="tns:WebServiceDescriptorType">
<xs:sequence>
<xs:element ref="tns:SecurityTokenServiceEndpoint" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="tns:SingleSignOutSubscriptionEndpoint" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="tns:SingleSignOutNotificationEndpoint" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="tns:PassiveRequestorEndpoint" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="SecurityTokenServiceEndpoint" type="tns:EndpointType"/>
<xs:element name="SingleSignOutSubscriptionEndpoint" type="tns:EndpointType"/>
<xs:element name="SingleSignOutNotificationEndpoint" type="tns:EndpointType"/>
<xs:element name="PassiveRequestorEndpoint" type="tns:EndpointType"/>
<!-- Section 3.1.2.3 -->
<xs:complexType name="PseudonymServiceType">
<xs:complexContent>
<xs:extension base="tns:WebServiceDescriptorType">
<xs:sequence>
<xs:element ref="tns:PseudonymServiceEndpoint" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="tns:SingleSignOutNotificationEndpoint" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="PseudonymServiceEndpoint" type="tns:EndpointType"/>
<!-- Defined above -->
<!-- <xs:element name="SingleSignOutNotificationEndpoint" type="tns:EndpointType"/> -->
<!-- Section 3.1.2.4 -->
<xs:complexType name="AttributeServiceType">
<xs:complexContent>
<xs:extension base="tns:WebServiceDescriptorType">
<xs:sequence>
<xs:element ref="tns:AttributeServiceEndpoint" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="tns:SingleSignOutNotificationEndpoint" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="AttributeServiceEndpoint" type="tns:EndpointType"/>
<!-- Defined above -->
<!-- <xs:element name="SingleSignOutNotificationEndpoint" type="tns:EndpointType"/> -->
<!-- Section 3.1.2.5 -->
<xs:complexType name="ApplicationServiceType">
<xs:complexContent>
<xs:extension base="tns:WebServiceDescriptorType">
<xs:sequence>
<xs:element ref="tns:ApplicationServiceEndpoint" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="tns:SingleSignOutNotificationEndpoint" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="tns:PassiveRequestorEndpoint" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="ApplicationServiceEndpoint" type="tns:EndpointType"/>
<!-- Defined above -->
<!-- <xs:element name="SingleSignOutNotificationEndpoint" type="tns:EndpointType"/> -->
<!-- <xs:element name="PassiveRequestorEndpoint" type="tns:EndpointType"/> -->
<!-- Section 3.1.3 -->
<!-- Defined above -->
<!--<xs:element name='LogicalServiceNamesOffered' type='tns:LogicalServiceNamesOfferedType' />-->
<xs:complexType name='LogicalServiceNamesOfferedType' >
<xs:sequence>
<xs:element name='IssuerName' type='tns:IssuerNameType' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='IssuerNameType' >
<xs:attribute name='Uri' type='xs:anyURI' use='required' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.4 -->
<xs:element name='PsuedonymServiceEndpoints' type='tns:EndpointType' />
<xs:complexType name='EndpointType' >
<xs:sequence>
<xs:element ref='wsa:EndpointReference' minOccurs='1' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
<!-- Section 3.1.5 -->
<xs:element name='AttributeServiceEndpoints' type='tns:EndpointType' />
<!-- Section 3.1.6 -->
<xs:element name='SingleSignOutSubscriptionEndpoints' type='tns:EndpointType' />
<!-- Section 3.1.7 -->
<xs:element name='SingleSignOutNotificationEndpoints' type='tns:EndpointType' />
<!-- Section 3.1.8 -->
<!-- Defined above -->
<!--<xs:element name='TokenTypesOffered' type='tns:TokenTypesOfferedType' />-->
<xs:complexType name='TokenTypesOfferedType' >
<xs:sequence>
<xs:element name='TokenType' type='tns:TokenType' minOccurs='1' maxOccurs='unbounded' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='TokenType' >
<xs:sequence>
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute name='Uri' type='xs:anyURI' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.9 -->
<!-- Defined above -->
<!-- <xs:element name='ClaimTypesOffered' type='tns:ClaimTypesOfferedType' /> -->
<xs:complexType name='ClaimTypesOfferedType'>
<xs:sequence>
<xs:element ref='auth:ClaimType' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.10 -->
<!-- Defined above -->
<!-- <xs:element name='ClaimTypesRequested' ype='tns:ClaimTypesRequestedType' /> -->
<xs:complexType name='ClaimTypesRequestedType'>
<xs:sequence>
<xs:element ref='auth:ClaimType' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.11 -->
<!-- Defined above -->
<!--<xs:element name='ClaimDialectsOffered' type='tns:ClaimDialectsOfferedType' />-->
<xs:complexType name='ClaimDialectsOfferedType'>
<xs:sequence>
<xs:element name='ClaimDialect' type='tns:ClaimDialectType' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='ClaimDialectType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute name='Uri' type='xs:anyURI' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 3.1.12 -->
<!-- Defined above -->
<!-- <xs:element name='AutomaticPseudonyms' type='xs:boolean' /> -->
<!-- Section 3.1.13 -->
<xs:element name='PassiveRequestorEnpoints' type='tns:EndpointType'/>
<!-- Section 3.1.14 -->
<!-- Defined above -->
<!--<xs:element name='TargetScopes' type='tns:EndpointType'/>-->
<!-- Section 3.2.4 -->
<xs:element name='FederationMetadataHandler' type='tns:FederationMetadataHandlerType' />
<xs:complexType name='FederationMetadataHandlerType' >
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 4.1 -->
<xs:element name='SignOut' type='tns:SignOutType' />
<xs:complexType name='SignOutType' >
<xs:sequence>
<xs:element ref='tns:Realm' minOccurs='0' />
<xs:element name='SignOutBasis' type='tns:SignOutBasisType' minOccurs='1' maxOccurs='1' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute ref='wsu:Id' use='optional' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='SignOutBasisType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 4.2 -->
<xs:element name='Realm' type='xs:anyURI' />
<!-- Section 6.1 -->
<xs:element name='FilterPseudonyms' type='tns:FilterPseudonymsType' />
<xs:complexType name='FilterPseudonymsType' >
<xs:sequence>
<xs:element ref='tns:PseudonymBasis' minOccurs='0' maxOccurs='1' />
<xs:element ref='tns:RelativeTo' minOccurs='0' maxOccurs='1' />
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:element name='PseudonymBasis' type='tns:PseudonymBasisType' />
<xs:complexType name='PseudonymBasisType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='1' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:element name='RelativeTo' type='tns:RelativeToType' />
<xs:complexType name='RelativeToType' >
<xs:sequence>
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 6.2 -->
<xs:element name='Pseudonym' type='tns:PseudonymType' />
<xs:complexType name='PseudonymType' >
<xs:sequence>
<!--
*** Accurate content model is nondeterministic ***
<xs:element ref='tns:PseudonymBasis' minOccurs='1' maxOccurs='1' />
<xs:element ref='tns:RelativeTo' minOccurs='1' maxOccurs='1' />
<xs:element ref='wsu:Expires' minOccurs='0' maxOccurs='1' />
<xs:element ref='tns:SecurityToken' minOccurs='0' maxOccurs='unbounded' />
<xs:element ref='tns:ProofToken' minOccurs='0' maxOccurs='unbounded' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
-->
<xs:element ref='tns:PseudonymBasis' minOccurs='1' maxOccurs='1' />
<xs:element ref='tns:RelativeTo' minOccurs='1' maxOccurs='1' />
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:element name='SecurityToken' type='tns:SecurityTokenType' />
<xs:complexType name='SecurityTokenType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='1' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:element name='ProofToken' type='tns:ProofTokenType' />
<xs:complexType name='ProofTokenType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='1' maxOccurs='1' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 7.1 -->
<xs:element name='RequestPseudonym' type='tns:RequestPseudonymType' />
<xs:complexType name='RequestPseudonymType' >
<xs:sequence>
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:attribute name='SingleUse' type='xs:boolean' use='optional' />
<xs:attribute name='Lookup' type='xs:boolean' use='optional' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 8.1 -->
<xs:element name='ReferenceToken' type='tns:ReferenceTokenType' />
<xs:complexType name='ReferenceTokenType'>
<xs:sequence>
<xs:element name='ReferenceEPR' type='wsa:EndpointReferenceType' minOccurs='1' maxOccurs='unbounded' />
<xs:element name='ReferenceDigest' type='tns:ReferenceDigestType' minOccurs='0' maxOccurs='1' />
<xs:element name='ReferenceType' type='tns:AttributeExtensibleURI' minOccurs='0' maxOccurs='1' />
<xs:element name='SerialNo' type='tns:AttributeExtensibleURI' minOccurs='0' maxOccurs='1' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='ReferenceDigestType' >
<xs:simpleContent>
<xs:extension base='xs:base64Binary' >
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name='AttributeExtensibleURI' >
<xs:simpleContent>
<xs:extension base='xs:anyURI' >
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Section 8.2 -->
<xs:element name='FederationID' type='tns:AttributeExtensibleURI' />
<!-- Section 8.3 -->
<xs:element name='RequestProofToken' type='tns:RequestProofTokenType' />
<xs:complexType name='RequestProofTokenType' >
<xs:sequence>
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 8.4 -->
<xs:element name='ClientPseudonym' type='tns:ClientPseudonymType' />
<xs:complexType name='ClientPseudonymType' >
<xs:sequence>
<xs:element name='PPID' type='tns:AttributeExtensibleString' minOccurs='0' />
<xs:element name='DisplayName' type='tns:AttributeExtensibleString' minOccurs='0' />
<xs:element name='EMail' type='tns:AttributeExtensibleString' minOccurs='0' />
<xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<xs:complexType name='AttributeExtensibleString' >
<xs:simpleContent>
<xs:extension base='xs:string' >
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Section 8.5 -->
<xs:element name='Freshness' type='tns:Freshness' />
<xs:complexType name='Freshness'>
<xs:simpleContent>
<xs:extension base='xs:unsignedInt' >
<xs:attribute name='AllowCache' type='xs:boolean' use='optional' />
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Section 14.1 -->
<xs:element name='RequireReferenceToken' type='sp:TokenAssertionType' />
<xs:element name='ReferenceToken11' type='tns:AssertionType' />
<xs:complexType name='AssertionType' >
<xs:sequence>
<xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
</xs:sequence>
<xs:anyAttribute namespace='##other' processContents='lax' />
</xs:complexType>
<!-- Section 14.2 -->
<xs:element name='WebBinding' type='sp:NestedPolicyType' />
<xs:element name='AuthenticationToken' type='sp:NestedPolicyType' />
<!-- ReferenceToken defined above -->
<xs:element name='RequireSignedTokens' type='tns:AssertionType' />
<xs:element name='RequireBearerTokens' type='tns:AssertionType' />
<xs:element name='RequireSharedCookies' type='tns:AssertionType' />
<!-- Section 14.3 -->
<xs:element name='RequiresGenericClaimDialect' type='tns:AssertionType' />
<xs:element name='IssuesSpecificPolicyFault' type='tns:AssertionType' />
<xs:element name='AdditionalContextProcessed' type='tns:AssertionType' />
</xs:schema>`,
};

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,8 @@
export const xsdXenc = `<?xml version="1.0" encoding="utf-8"?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'xenc-schema.xsd',
contents: `<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" <!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
"http://www.w3.org/2001/XMLSchema.dtd" "http://www.w3.org/2001/XMLSchema.dtd"
[ [
@ -142,4 +146,5 @@ export const xsdXenc = `<?xml version="1.0" encoding="utf-8"?>
<anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/> <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/>
</complexType> </complexType>
</schema>`; </schema>`,
};

View file

@ -1,4 +1,8 @@
export const xsdXml = `<?xml version='1.0'?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'xml.xsd',
contents: `<?xml version='1.0'?>
<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" > <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en"> <xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
@ -114,4 +118,5 @@ export const xsdXml = `<?xml version='1.0'?>
<xs:attribute ref="xml:space"/> <xs:attribute ref="xml:space"/>
</xs:attributeGroup> </xs:attributeGroup>
</xs:schema>`; </xs:schema>`,
};

View file

@ -1,4 +1,8 @@
export const xsdXmldsigCore = `<?xml version="1.0" encoding="utf-8"?> import type { XMLFileInfo } from 'xmllint-wasm';
export const xmlFileInfo: XMLFileInfo = {
fileName: 'xmldsig-core-schema.xsd',
contents: `<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE schema <!DOCTYPE schema
PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
[ [
@ -315,4 +319,5 @@ export const xsdXmldsigCore = `<?xml version="1.0" encoding="utf-8"?>
<!-- End Signature --> <!-- End Signature -->
</schema>`; </schema>`,
};