Skip to content

Commit

Permalink
add aggregator metadata validation
Browse files Browse the repository at this point in the history
  • Loading branch information
damikael committed May 12, 2020
1 parent 964827c commit 5503f9a
Show file tree
Hide file tree
Showing 19 changed files with 679 additions and 173 deletions.
35 changes: 0 additions & 35 deletions specs-compliance-tests/readSPMetadata

This file was deleted.

35 changes: 0 additions & 35 deletions specs-compliance-tests/readSPMetadata.1

This file was deleted.

35 changes: 0 additions & 35 deletions specs-compliance-tests/readSPMetadata.2

This file was deleted.

2 changes: 0 additions & 2 deletions specs-compliance-tests/test.txt

This file was deleted.

45 changes: 0 additions & 45 deletions specs-compliance-tests/test/sp/metadata_strict.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,51 +131,6 @@ def tearDown(self):
if self.failures:
self.fail(common.helpers.dump_failures(self.failures))

def test_xsd(self):
'''Validate the SP metadata against the SAML 2.0 Medadata XSD'''

cmd = ' '.join(['xmllint',
'--noout',
'--schema ./xsd/saml-schema-metadata-2.0.xsd',
METADATA])
is_valid = True
msg = 'the metadata must validate against the XSD'
try:
subprocess.run(cmd, shell=True, check=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except subprocess.CalledProcessError as err:
is_valid = False
lines = [msg]
if err.stderr:
stderr = (
'stderr: ' +
'\nstderr: '.join(
list(
filter(
None,
err.stderr.decode('utf-8').split('\n')
)
)
)
)
lines.append(stderr)
if err.stdout:
stdout = (
'stdout: ' +
'\nstdout: '.join(
list(
filter(
None,
err.stdout.decode('utf-8').split('\n')
)
)
)
)
lines.append(stdout)
msg = '\n'.join(lines)

self._assertTrue(is_valid, msg)

def test_xmldsig(self):
'''Verify the SP metadata signature'''

Expand Down
Loading

0 comments on commit 5503f9a

Please sign in to comment.