HTTP/HTTPs access: Difference between revisions

From Grid5000
Jump to navigation Jump to search
No edit summary
(→‎HTTP reverse proxy: add exemple to clarify "mysite")
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
{{Portal|Tutorial}}
{{Portal|Tutorial}}
{{TutorialHeader}}
{{TutorialHeader}}
This page details some methods to access web content or web services inside Grid'5000. For the '''Grid'5000 Rest API''', see the [[API all in one Tutorial]].
This page details some methods to access web content or web services inside Grid'5000. For the '''Grid'5000 Rest API''', see the [[API]] documentation.
__TOC__
__TOC__


Line 22: Line 22:
Whenever you need to connect to a web interface or web API served by a Grid'5000 node using HTTP or HTTPS, you can use Grid'5000 reverse proxy.
Whenever you need to connect to a web interface or web API served by a Grid'5000 node using HTTP or HTTPS, you can use Grid'5000 reverse proxy.


* The base URL to use is ''https://<code class='replace'>mynode</code>.<code class='replace'>mysite</code>.'''http'''.proxy.grid5000.fr/'' for HTTP ;
* The base URL to use is ''https://<code class='replace'>mynode</code>.<code class='replace'>mysite</code>.'''http'''.proxy.grid5000.fr/'' for HTTP, for instance: <code>https://paravance-81.rennes.http.proxy.grid5000.fr</code> ;
* And ''https://<code class='replace'>mynode</code>.<code class='replace'>mysite</code>.'''https'''.proxy.grid5000.fr/'' for HTTPS.
* And ''https://<code class='replace'>mynode</code>.<code class='replace'>mysite</code>.'''https'''.proxy.grid5000.fr/'' for HTTPS.


Line 33: Line 33:
(Also if you reach the default apache web page instead of your web service, that's probably because you miss-typed the URL :-) ).
(Also if you reach the default apache web page instead of your web service, that's probably because you miss-typed the URL :-) ).


{{Warning|text=You may by asked to add a security exception as required by your web browser, to access the target web service. This is normal for the Grid'5000 reverse proxy and you can accept with no risk in that specific case. This is due to a mismatch in the Grid'5000 SSL certificate which does not certify ''*.proxy.grid'5000.fr'' for now. }}
{{Warning|text=You may by asked to add a security exception as required by your web browser, to access the target web service. This is normal for the Grid'5000 reverse proxy and you can accept with no risk in that specific case. This is due to a mismatch in the Grid'5000 SSL certificate which does not certify ''*.proxy.grid5000.fr'' for now. }}


== Proxying with SSH  ==
== Proxying with SSH  ==
Another way to access a web service running inside Grid'5000 (on a node), is to use the OpenSSH forwarding feature, either with local (-L) or remote (-R) port forwarding or (more powerful) with the SOCKS forwarding (-D option). See the [[SSH]] page for more details.
Another way to access a web service running inside Grid'5000 (on a node), is to use the OpenSSH forwarding feature, either with the embedded SOCKS proxy (-D option) or with local (-L) or remote (-R) port forwarding. See the [[SSH]] page for more details.

Latest revision as of 11:56, 5 June 2023

Note.png Note

This page is actively maintained by the Grid'5000 team. If you encounter problems, please report them (see the Support page). Additionally, as it is a wiki page, you are free to make minor corrections yourself if needed. If you would like to suggest a more fundamental change, please contact the Grid'5000 team.

This page details some methods to access web content or web services inside Grid'5000. For the Grid'5000 Rest API, see the API documentation.

User webpages

A public directory is automatically created in your home directory in every Grid'5000 site. All files inside that directory are published over HTTP.

From inside the Grid'5000 network, the content is available at
http://public.site.grid5000.fr/~username/

(mind the ~)

From anywhere, with basic authentication
https://api.grid5000.fr/stable/sites/site/public/username/

Replace:

  • site with the target Grid'5000 site.
  • username with your Grid'5000 username.

HTTP reverse proxy

Note.png Note

Network connections (tcp, udp, ...) to any Grid'5000 node from outside Grid'5000 are possible using Grid'5000 VPN.

Whenever you need to connect to a web interface or web API served by a Grid'5000 node using HTTP or HTTPS, you can use Grid'5000 reverse proxy.

If you can't run your service on the standard HTTP port (80) or HTTPS port (443) (because you don't want to run the service as root for instance), you can use a port 8080 or 8443.

  • You can then use https://mynode.mysite.http8080.proxy.grid5000.fr/ for HTTP ;
  • and https://mynode.mysite.https8443.proxy.grid5000.fr/ for HTTPS.

Please note that the reverse proxy needs authentication using your Grid'5000 credentials.

(Also if you reach the default apache web page instead of your web service, that's probably because you miss-typed the URL :-) ).

Warning.png Warning

You may by asked to add a security exception as required by your web browser, to access the target web service. This is normal for the Grid'5000 reverse proxy and you can accept with no risk in that specific case. This is due to a mismatch in the Grid'5000 SSL certificate which does not certify *.proxy.grid5000.fr for now.

Proxying with SSH

Another way to access a web service running inside Grid'5000 (on a node), is to use the OpenSSH forwarding feature, either with the embedded SOCKS proxy (-D option) or with local (-L) or remote (-R) port forwarding. See the SSH page for more details.