cloudviz
cloudviz

Reputation: 1001

Python flask saml throwing saml2.sigver.SigverError Error Message

Has anyone succesfully implemented flask-saml using Windows as dev environment, Python 3.6 and Flask 1.0.2?

I was given the link to the SAML METADATA XML file by our organisation and had it configured on my flask app.

app.config.update({
    'SECRET_KEY': 'changethiskeylaterthisisoursecretkey',
    'SAML_METADATA_URL': 'https://<url>/FederationMetadata.xml',
})

flask_saml.FlaskSAML(app)

According to the documentation this extension will setup the following routes:

When I go to one of the routes http://localhost:5000/saml/sso/ I get the error below

saml2.sigver.SigverError saml2.sigver.SigverError: Cannot find ['xmlsec.exe', 'xmlsec1.exe']

I then went to this site https://github.com/mehcode/python-xmlsec/releases/tag/1.3.5 to get xmlsec and install it. However, I'm still getting the same issue.

Here is a screenshot of how I installed xmlsec

where does not seem to find the xmlsec.exe

enter image description here

Upvotes: 11

Views: 5120

Answers (2)

Sathiamoorthy
Sathiamoorthy

Reputation: 11542

xmlsec won't work properly in windows, better use Linux environment

Type the below command before giving pip install xmlsec

sudo apt-get install xmlsec1

Upvotes: 1

Arun Karunagath
Arun Karunagath

Reputation: 1578

documentationis asking to have xmlsec1 pre-installed. What you installed is a python binding to xmlsec1.

Get a windows build of xmlsec1 from here or build it from source And make it available in the PATH.

Upvotes: 6

Related Questions