Notes on Ruth2 settings (edited)

Starflower’s usual appearance (no mesh body). Skin is Eloh Eliot’s Wrath (LE) from Seven Deadly Sins. Somewhat punky today. Standing on the sea bed. No distractions here!
Starflower’s twelve-year-old “makeup all over my face” look with a mesh body. This needs needed to be fixed before I can could use Ruth2.

In the use of mesh avatars, I have come late to the party. I’d been meaning to try it for ages but I’d simply avoided the effort until lately when I felt slightly shamed when appearing in photos for Thirza Ember’s amazing Hypergrid Safari. I am her latest fan – I am sure she has lots. She is REALLY nice.

However, it’s going to take me a lot longer to migrate than I had expected. The feet and hands are loads better – probably the biggest “tell” that somebody is or isn’t using a mesh avatar. Surprisingly, there were some initial disadvantages for me but I resolved these. The settings appear to be rather different.

The head was really different. I simply couldn’t just migrate my shape settings directly. The chin is was smaller to the point of overbite, the eyes less normally or naturally sunken, i.e. slightly bulging with too little eye sockets, making makeup bleed out all over my face. The cheekbones seemed lower and the ears are clearly were different too. I will need to make changes and assess whether or not I can use the Ruth2 head and still look like myself. It currently makes made me look rather like a twelve year old. I no longer look characteristically like myself. This, I think, is the main thing I need to resolve by spending time altering the settings to approximate my current facial appearance.

[Ed.] Modifying the sliders does seem to have resolved my issues with the head. The settings are NOT the same as those required for the system avatar. You will need to tweak yours, as I did. Here follows a guide to what I had to do to approximate my system avatar appearance with Ruth2. (Your avatar may be different, so this will be purely as a guide to what you may need to do in achieving something similar.)

body fat +10

egg head -20
upper cheeks +20
cheek bones +20

eye opening +30
eye depth -10
eye bags +10

mouth corner +10

chin angle -10

torso muscles +20
shoulders +10
love handles +10
belly size +10

butt size -20
saddle bags -10
foot size +35

The hips were massively wider. I had to lower the sliders by 10%.

[Ed.] It now seems that it was not the hips but “saddle bags” and “butt size” combined with low “love handles” and “belly size” settings that made the hips look large.

The feet are great but they no longer work with my shoes. They are smaller even than the zero setting that I was previously using on the system avatar, so I may have had to experiment with the foot position settings, which appear to allow different angles, as well as increase the foot size to fill my shoes. Again, if I can’t wear my shoes then this is going to be rather difficult to sustain. [Note: different angles don’t work, as has been pointed out to me, as this makes the angle of the shoe change as well as the foot.]

[Ed.] After some more experimentation, it is possible to modify my shoes. The strange heel-in-foot thing of the system avatar wearing system shoes with heels > 0 is no more, thank goodness. You may need to use existing transparent system shoes as previously, as I did, or use the ones supplied in the Ruth2 Extras package (although altering the hover height of your avatar by about 1-2 points, depending on your shoe height, will have a similar effect). I am guessing that mine are something like the equivalent of 3″ heels in RL: these are 100 on the slider, even though I used the medium rather than the high foot. (I’ve also done some flat shoes with the flat foot.) The shoe mask will no longer be required. Obviously I had to reposition the shoes to make sure that no bits of feet showed through (and I had to widen the circumference of the straps slightly, but this is specific to my particular shoes). My feet were previously size 0 but now size 35. You may find that your shoes behave differently. Note that mine are prim shoes, not mesh. The Ruth2 avatar is definitely MUCH better than the system avatar. It is even worth shoe problems. However, you may well find that you can resolve these.

Lastly, the HUD only allows certain colours of nails by default. I often wear light blue, dark green or black nails. It does offer grey, which is better than nothing. I shall have to investigate if it It can be hacked in order to provide different colours than the rather staid range of default colours. The hands are otherwise great, though.

[Ed.] The HUD for the Ruth2 Business mesh avatar does allow nail colours to be altered by altering the notecard inside. Hooray! (Note: you will need to get the vectors for the colours, which can be obtained from the viewer by going to the colour picker and copying them from there. Firestorm makes this easy.)

It was surprisingly easy to use Ruth2. It’s a shame that IARs can only be imported directly into the Library on standalones rather than grids. I’d like to make Ruth2 and Roth2 available to my users. Oh yeah, I have precisely one other occasional or semi-regular user (who comes largely to humour me, being such a kind sort of chap and a really good friend.)

[Ed.] To clarify, you can pick up these avatars without using IARs but it would still be good to be able to put them into the library on a grid so that new registrants can use them.

I have no comment to make on Roth2 because I really don’t have an opinion on male bodies. They seem to be serviceable enough: and that is the extent of my personal expertise. It is, I admit, a gap in my education. Along with Hieratic, the biodiversity of yams, solar physics and crochet.

I have also made no real effort to acquire mesh clothes, with the result that my appearance, while radically improved from 2007 (when I even had a system skin and system hair!), is rather dated, maybe a decade or so out of date by OpenSim/SL standards. I really need a plain mesh skirt to replace my flexi skirt that I use as a component of nearly everything.

[Ed.] I have been given some guidance on the matter of mesh skirts and there may be a free one. Thank you to my kind advisor, who I shall not name here, but who dropped by out of the kindness of his own heart and took a LOT of trouble to help me out and inspire me to sort things out with Ruth2 ❤ What an absolutely lovely thing to do. Aren’t people nice in OpenSim grids?! Hooray! 🙂

Starflower’s original system skin and hair re-created from 2007. Old school! My current shape (shown here) evolved from the original one.

That was the first time I had been anywhere in company (more than two people) in the metaverse for years. The people all seemed polite and nice, which was refreshing after many less pleasant experiences in SL. But it did all seem rather like a blast from the past for me and very SL-like otherwise. I felt a lot less hermit-like because Apollo and Thirza were there, so at least I felt like I slightly knew somebody or had been invited, rather than just gatecrashing a random party and hiding at the back. This is my normal modus operandi at parties, as you may not be surprised to hear. Anyway, a big thank you to them for including me and being so kind.

Next time: back to more boring details about TLS implementation in OpenSim! 😀

Configuring secure HTTPS ports with TLS (“SSL”) on OpenSim

Background

It has already been remarked in an earlier post that it is now possible to configure the simulator to use secure ports on OpenSim with TLS (still erroneously but commonly known by the name of its defunct predecessor SSL), i.e. that you can run it on HTTPS instead of HTTP. However, there is no native ability within OpenSim to do this for the ROBUST services, including most critically the login service. This means that your password details are broadcast in plain text at the time of login. Obviously this is far from ideal.

In order to provide secure ports it is necessary to configure a reverse proxy, of which the most obvious and commonly suggested by OpenSim administrators is Nginx, which also happens to be the best all-round modern HTTP(S) server and an improvement (in my opinion) on the venerable but battle-tested and dependable Apache. (See here for a discussion, in which it is stated that OSGrid uses Nginx.) For all this, there appears to be no published advice on how to achieve any of this. It seems no surprise that few – if any? – publicly available OpenSim servers on the Hypergrid seem to be configured to use HTTPS ports with TLS. It is fiddly, so this is worth providing here.

Most other server software in live installations is configured to use secure ports as an industry standard – why should OpenSim not follow the same standards? Otherwise I would suggest that you can never store personal data in OpenSim and you can never be sure of not being hacked. It’s fairly unlikely that an OpenSim grid would be an attractive target for a hacker, being somewhat niche, but it is entirely possible and no doubt has happened. (Famously, SL was hacked with flying penises.)

Secure ports 9002 and 9003 on Ocean Grid

Ocean Grid is now an example of just such a grid. In fact, for reasons that we shall come to later, it remains possible to log into Ocean Grid using the insecure HTTP port 8002. However, as of 2 May 2020 it is now also possible to use the secure HTTPS port 9002. Furthermore, the traffic to the private port is also configured on 9003 instead of 8003 for reasons specific to Ocean Grid that you may not need to bother with: if your internal port does not need to be open to the Internet then only your subnet will be able to see that traffic anyway, so why add the (fairly small) overhead of encryption?

First of all I began by configuring a second instance of ROBUST. Ocean Grid now runs duplicate copies of all the services. I have never separated, for example, the asset server from the others and I have not done so now either, but this can be done too. This would use Nginx as a reverse proxy for its other purpose, namely to load balance between duplicate copies of services, whether the whole lot of them in one ROBUST instance as I have done or on a service-by-service basis. The obvious one to do this with is the asset server. It depends on the ancient Tiny Web Server, written in C#, which is very slow and probably ought to be replaced – I’d suggest with h2o because it is fast and can do HTTP/2 and (experimentally so far) the new HTTP/3 (formerly QUIC) over UDP. So far I have configured no load balancing for Ocean Grid. One large 1280×1280 test region/simulator (Rheged) communicates by HTTPS while the other four regions (again, all on separate simulators to prevent out-of-memory crashes) all still use the original HTTP port. This of course may change in future.

In case you are wondering how I have different regions on different simulators, I have adapted Gwyn Llewelyn’s brilliant instructions on how to run multiple instances concurrently. Thanks, Gwyn ❤ (Be still, my virtual heart!) I also use some scripts that use GNU Screen to automatically switch between the console interfaces of the regions/simulators and ROBUST.

The upshot of all this is that all the services are available by either port. You can log in locally or via Hypergrid by either and reach the same simulators with no apparent difference in performance between the two. In fact, removing a region/simulator that is 5×5 larger than a normal region (i.e. 25 times as big) to a separate asset service has considerably improved performance. Otherwise there are only four 256×256 traditional regions in Ocean Grid to date.

It would of course be possible to attach other people’s regions on other servers to Ocean Grid, although this has not ever been done to date because it is a small private grid with mainly just myself, Starflower Bracken, as the principal user. I get a small number of Hypergrid visitors and a tiny number of visits from old friends of 2007 vintage who I met years ago in SL and have registered accounts locally on my grid. This would add a little more impetus to use HTTPS for security reasons, as the internal services then need to be open to the public Internet and there are more targets to attack. In any case, the same principles apply about best security practices as outlined above.

Before moving on to the mechanics of the installation, it suffices to add that there will be further tweaks as time goes on, probably including the load balancing described above in order to provide a much-needed boost to performance, especially as regards load on the asset server.

Problem with https:// prefix in the viewer

One particular tweak, migrating entirely to HTTPS and removing the insecure ports, will have to be has been postponed for an unknown period of some time. The grid selector in the viewer has always previously contained a bug [FIRE-24068 fixed 2020-11-07, SV-2392 fixed at unknown date], since it was first added to the original viewer for OpenSim purposes, that adds the http:// prefix to any loginURI and makes it impossible to add https:// instead. The only workaround to this annoying problem is to manually edit grids.user.xml (or grids.xml in some viewers). On doing this, HTTPS logins work perfectly, including using free Let’s Encrypt certificates as are installed on Ocean Grid. But less experienced users may not know how to edit this XML file, so any total migration would shut them out of logging in locally to the grid. Now that the major viewers allow this, it may make sense to migrate to the secure port, which is currently under review. You may ask, who cares since only I log in locally for the most part, while other visitors come via Hypergrid. In my case I have one reasonably frequent visitor who logs in with a locally registered account, who happens to be a very welcome one. I don’t really want to put a barrier in the way of the few local visits that I do still receive or force people to come via Hypergrid. If you do visit me via Hypergrid then I urge you to use port 9002 and thus to do so securely!

NOTE 2021-09-15, edited 2021-09-26: It is now possible to use Firestorm and Singularity with secure ports. (Singularity has a recent OpenSim version from 2020 despite being listed as an inactive viewer or in an “unknown” state – what is the status of this viewer? I was unable to run Dayturn 1.8.10 or 1.8.9 on Windows 10 as it simply failed to start for me, so I have not been able to test it. The VL Cool Viewer also supports HTTPS (although it will let you add the grid with the secure port OR the insecure port but not both under different names!) Radegast (text-only viewer) supports HTTPS. SceneGate (viewer with reduced functionality) supports HTTPS and for bonus points gives a security warning when connecting to insecure HTTP ports. This seems like a much more healthy position than described above. If Dayturn allows secure ports, there appears to be little good reason not to migrate entirely to secure ports, which I am seriously considering.

Setting up the ROBUST server with HTTPS

First of all you need to configure and run a second copy of ROBUST. I copied Robust.HG.ini to a new file Robust.HG.tls.ini and then edited that. You will use -inifile=”$DIR/Robust.HG.tls.ini” where you can replace $DIR with the path to wherever you keep the file, if you don’t use the method that I use.

Then you need to edit the following in blue, adapting it as appropriate for your purposes:

[Const]
BaseURL = “https://oceangrid.net”
PublicPort = “8102″
; The proxied external public port of the Robust server
PublicPort2 = “9002”
PrivatePort = “8103″

[ServiceList]
VoiceConnector = “9004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector”

[Hypergrid]
HomeURI = “${Const|BaseURL}:${Const|PublicPort2}”
GatekeeperURI = “${Const|BaseURL}:${Const|PublicPort2}”

[LoginService]
MapTileURL = “${Const|BaseURL}:${Const|PublicPort2}/”;
SearchURL = “${Const|BaseURL}:${Const|PublicPort2}/”;
SRV_HomeURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_InventoryServerURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_AssetServerURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_ProfileServerURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_FriendsServerURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_IMServerURI = “${Const|BaseURL}:${Const|PublicPort2}”
SRV_GroupsServerURI = “${Const|BaseURL}:${Const|PublicPort2}”

[GridInfoService]
login = ${Const|BaseURL}:${Const|PublicPort2}/
gridname = “Ocean Grid TLS
gridnick = “Ocean Grid TLS
gatekeeper = ${Const|BaseURL}:${Const|PublicPort2}/
uas = ${Const|BaseURL}:${Const|PublicPort2}/

In the case of OpenSim, there are cascading copies of OpenSim.ini in order to override certain settings for each region/simulator and inherit the rest of the settings from the main file. You may not have that setup, of course. However, this is what I did for the copy for my region Rheged:

[Const]
BaseHostname = “oceangrid.net”
BaseURL = https://${Const|BaseHostname}
PublicPort = “9002″
PrivURL = https://localhost
PrivatePort = “9003″
;; the following line was for testing – ignore
;PrivatePort = “8103”

Step required only if you are using port 9003 HTTPS on localhost

There is also another step required for making the certificates for localhost (or 127.0.0.1) work if, like me, you are making the internal services function over HTTPS. There are better ways to do this and this is a bit of a hack but bear in mind that the loss in security is fairly inconsequential since it is only on the internal subnet with only trusted devices connecting. As noted above, you don’t even need to encrypt these if they are never accessed from the public Internet but in my case they are because I have an external proxy server as well, which provides a roundabout solution to the lack of NAT loopback (NAT hairpinning) on the rather rubbish router that my ISP has provided. A better solution would be to get a decent router (and preferably a fixed IP address, as I used to have, rather than Dynamic DNS) and then I could just keep port 8003 internal and dispense with 9003. (I could alternatively use the /etc/hosts file on any other machine on the network running a viewer to connect with the local grid.) As also noted, another possible reason to expose these ports to the Internet is if external simulators are connecting.

Anyway, here is what I did:

[Startup]
; #
; # SSL certificates validation options
; #

; SSL certificate validation options
; you can allow selfsigned certificates or no official CA with next option set to true
; NoVerifyCertChain = true
NoVerifyCertChain = true
; you can also bypass the hostname or domain verification
; NoVerifyCertHostname = true
NoVerifyCertHostname = true
; having both options true does provide encryption but with low security
; set both true if you don’t care to use SSL, they are needed to contact regions or grids that do use it.

Setting up the simulator to use HTTPS (separate, optional step)

Again, for completeness, another step that is strictly not necessary is to give it a secure port. I actually did this some time ago quite, separately from all of this, for just the simulator rather than ROBUST:

[Network]
http_listener_port = 9106 ; if http_listener_ssl = true then this will be ignored

;; THIS IS EXPERIMENTAL IN OPENSIM 0.9.1.0
; ssl config: Experimental!
http_listener_ssl = true ; if set to true main server is replaced by a ssl one
http_listener_sslport = 9206 ; Use this port for SSL connections
; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
; this will change is future
http_listener_cn = “oceangrid.net”
; if the cert doesnt have a official CA or is selfsigned viewers option NoVerifySSLCert need to be set true
http_listener_cert_path = “/opt/opensim/bin/certs/oceangrid.p12” ; path for the cert file that is valid for the ExternalHostName
http_listener_cert_pass = “your_password_here” ; the cert password

; the handler is in [opensim]/OpenSim/Server/Base/HttpServerBase.cs
http_listener_ssl_cert = “” ; as of 2019-10-11 this is not fetched by [opensim]/OpenSim/Framework/NetworkServersInfo.cs
; but the next undocumented lines are fetched, though who knows what, if anything, is done with them since it doesn’t
; work and you get the error “Error – certificate Parameter name: ‘certificate’ cannot be null.”

Nginx reverse proxy configuration

The next step is to provide the Nginx reverse proxy configuration as follows (tidied up a bit!) in a file called something like /etc/nginx/sites-available/oceangrid.net-9002-9003 as follows:

server {
listen 9002 ssl http2;
listen [::]:9002 ssl http2;

server_name oceangrid.net http://www.oceangrid.net;

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
#very secure, very compatible
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
#highly secure, less compatible
#ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://127.0.0.1:8102$1;
#resolver 8.8.8.8; #public Google IPv4 DNS resolver (insecure)
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location ~ \.php$ {
proxy_pass http://127.0.0.1:8102$1;
#resolver 8.8.8.8; #public Google IPv4 DNS resolver (insecure)
proxy_redirect off;
proxy_buffering off;;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

access_log /var/log/nginx/grid.oceangrid.access.log;
error_log /var/log/nginx/grid.oceangrid.error.log;

ssl_certificate /etc/letsencrypt/live/www.oceangrid.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.oceangrid.net/privkey.pem; # managed by Certbot

}

server {
listen 9003 ssl http2;
listen [::]:9003 ssl http2;

server_name oceangrid.net http://www.oceangrid.net;

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
#very secure, very compatible
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
#highly secure, less compatible
#ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://127.0.0.1:8103$1;
#resolver 8.8.8.8; #public Google IPv4 DNS resolver (insecure)
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location ~ \.php$ {
proxy_pass http://127.0.0.1:8103$1;
#resolver 8.8.8.8; #public Google IPv4 DNS resolver (insecure)
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

access_log /var/log/nginx/grid.oceangrid.access.log;
error_log /var/log/nginx/grid.oceangrid.error.log;

ssl_certificate /etc/letsencrypt/live/www.oceangrid.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.oceangrid.net/privkey.pem; # managed by Certbot

}

Finally make another copy of this file, for example called /etc/nginx/sites-available/localhost-9002-9002 but comment out (#) the lines that are your equivalent of server_name oceangrid.net; near the top. These will then work for localhost (127.0.0.1) on those ports. You will now need to type:

sudo ln -s /etc/nginx/sites-available/localhost-9002-9002 /etc/nginx/sites-enabled/localhost-9002-9003
sudo ln -s /etc/nginx/sites-available/oceangrid.net-9002-9003 /etc/nginx/sites-enabled/oceangrid.net-9002-9003
sudo systemctl restart nginx
OR
sudo service nginx restart

Here you have it. As discussed above, you won’t need to do the localhost part if 8003 is firewalled on your local network, in which case you will not be using 9003 and those sections can be ignored here in both files.

Bear in mind that the resolver setting may be different on different servers and I must leave you to discover the best and safest way to do this on your own configuration – don’t use an easily guessable public DNS resolver like the one commented out above because of the risk of interception.

The future of HTTPS in the open metaverse

You could adapt and simply these instructions easily enough for a standalone installation of OpenSim but, since I don’t use one, unless somebody contacts me for advice then I shall leave it to them to do so because I don’t see it should be too horribly difficult based on the instructions for a grid. Most people’s requirements will be simpler than mine but my grid has evolved over almost 10 years.

I hope that people use these instructions. I am asking people to adopt 9002 and 9003 for these secure ports, i.e. to establish a convention that is easily guessable like the present 8002 and 8003 convention. Please also add your voice to the call to fix the grid selector in the various viewers [FIRE-24068SV-2392]. I am looking forward to a more secure open metaverse in the future and hope I have contributed to that.