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

add configuration flag to allow self signed cert for relying party #252

Open
frhack opened this issue Feb 22, 2023 · 1 comment
Open

add configuration flag to allow self signed cert for relying party #252

frhack opened this issue Feb 22, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@frhack
Copy link

frhack commented Feb 22, 2023

For test/development could be useful to have the possibility to use self signed certs for relying party

Please provide a configuration flag/switch to accept self signed certs.

I successful achieved to register a self signed relying party (https://127.0.0.1:8443/oidc/rp/) modifying the source code of the file spid_cie_oidc/entity/http_client.py as follow:

async def http_get(urls, httpc_params: dict = {}):
async with aiohttp.ClientSession(**httpc_params.get("session", {}),connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
text = await fetch_all(session, urls, httpc_params)
return text

@peppelinux
Copy link
Member

Got the point,

you can do that overloading this variable HTTPC_PARAMS in the general settings (settings.py of your project, without chaning application source code)
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/entity/settings.py#L55

@peppelinux peppelinux added the documentation Improvements or additions to documentation label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants