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

support optionally esgf x509 certificates for access control #25

Closed
cehbrecht opened this issue Jan 24, 2018 · 6 comments
Closed

support optionally esgf x509 certificates for access control #25

cehbrecht opened this issue Jan 24, 2018 · 6 comments

Comments

@cehbrecht
Copy link
Member

... we might need to provide this for copernicus.

Some hints:

Python requests:

http://docs.python-requests.org/en/master/user/advanced/?highlight=ssl#client-side-certificates

curl: use --cert and -–key options

gunicorn SSL settings:

http://docs.gunicorn.org/en/latest/settings.html#cert-reqs

@cehbrecht cehbrecht self-assigned this Jan 24, 2018
@cehbrecht cehbrecht added this to the 0.4.0 milestone Jan 24, 2018
@cehbrecht
Copy link
Member Author

one needs to configure nginx with ssl client certificate verification:

ssl_client_certificate /etc/ssl/esgf-ca-bundle.crt;
#ssl_crl /etc/ssl/ca.crl;
ssl_verify_client on;
ssl_verify_depth          2;
ssl_session_timeout 5m;

The esgf-ca-bundle.crt bundle is available on ESGF github:
https://github.com/ESGF/esgf-dist

A client request needs an ESGF X.509 proxy certificate, cert.pem for example:

$ curl --cert cert.pem --key cert.pem -k "https://localhost:5000/ows/wps?service=WPS&request=GetCapabilities"

@tomLandry
Copy link

I think you can label that PAVICS too. If we can't implement it with you, we'll at least test it in the upcoming year.

@cehbrecht
Copy link
Member Author

cehbrecht commented Mar 7, 2018

oops, wrong ticket ...

@cehbrecht
Copy link
Member Author

To let twitcher make the decision if the client proxy is needed for the request one needs to set:

ssl_verify_client    optional;

To pass the client certificate and verification information to the twitcher one can use proxy parameters, like:

proxy_set_header        X-SSL-Client-Cert $ssl_client_cert;
proxy_set_header        X-SSL-Client-Verify $ssl_client_verify;
proxy_set_header        X-SSL-Client-S-DN $ssl_client_s_dn;

@cehbrecht
Copy link
Member Author

possible values of ssl_verify_client:
https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_verify_client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants