Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyFF > 2.0.0 doesn't appear to check metadata signatures #264

Open
alanbuxey opened this issue May 7, 2024 · 0 comments
Open

pyFF > 2.0.0 doesn't appear to check metadata signatures #264

alanbuxey opened this issue May 7, 2024 · 0 comments

Comments

@alanbuxey
Copy link
Contributor

alanbuxey commented May 7, 2024

pyFF does not appear to be using the certificates to check the Metadata signature. When an XRD file is used in batch mode with incorrect certificate the metadata is still ingested, pipelines continue and entries consumed/exported etc.

When rolling back to 2.0.0 the configuration is indeed detected to be wrong and signatures fail, metadata not processed.

Code Version

2.1.2 and 2.1.1, or newer

Expected Behavior

when running with the XRD example file, the certificates should be used to verify the collected Metadata

Current Behavior

The Metadata is collected and worked on with no signature check being performed

Possible Solution

Added a debug log to the utils.py (line 267) to check if we 'have' a key

def check_signature(t: ElementTree, key: Optional[str], only_one_signature: bool = False) -> ElementTree:
    if key is None:
        log.debug("We dont have a key")

and that got printed out after MD was collected - so looks like the parser isn't parsing the x509 sections correctly.

Steps to Reproduce

  • take the examples/links.xrd file (and re-enable the InCommon section),
  • then swap the 2 certificate sections around - so the InCommon cert is used for SWAMID and SWAMID cert is used for InCommon,
  • then run pyFF in batch mode with that XRD file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant