Skip to content

Commit

Permalink
version 2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrozor committed Jan 25, 2020
1 parent 5f92ee3 commit 83539e3
Show file tree
Hide file tree
Showing 217 changed files with 2,497 additions and 1,211 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
2019-11-27 Version 2.7.1 (stable)
2020-01-24 Version 2.8.0 (stable)
myrtille is now available as a docker image (see DOCUMENTATION.MD)
resynced FreeRDP (among many things, fixes some issues related to the clipboard and audio)
fixed session disconnect occuring under some circumstances on clipboard paste
fixed an issue where only the first letter of the clipboard content was displayed on clipboard paste
simplified hosts management (no domain or enterprise mode required); default login: admin/admin (changed upon first login)
updated the enterprise mode so that a member of "EnterpriseAdminGroup" can connect an host whatever the allowed groups or users defined on it (thanks dgcom)
fixed an issue with the enterprise mode, which prompted to change the password due to expiration whereas the expiration date was just not set (thanks dgcom)
the installer is now shipped without bootstraper (Setup.exe); open Myrtille.msi directly instead
the installer now installs the myrtille pre-requisites automatically (roles and features); the related script (Myrtille.Web\Install.ps1) can also be run manually from outside the installer, if needed
the installer now supports upgrading (thanks to Orca, which allows finer control over msi files), removing the need to uninstall a previous version first
security protocol is now configurable for RDP over VM bus
user domain is now configurable whatever the protocol and displayed into the toolbar, if defined
updated comments to drain disconnected sessions when using a connection broker in HA mode (myrtille services config)
starting with Windows Server 2019 (or Windows 10 release 1903), RDS introduces changes with NLA and the way disconnected sessions are handled (see DOCUMENTATION.MD); myrtille now default to scale instead of reconnect
if scaling the display on browser resize, you can choose whether to preserve or not the aspect ratio (config.js, default = don't keep)
various minor fixes

2019-11-27 Version 2.7.1 (stable)
* HOTFIX * fixed a potential crash of myrtille services when sending a disconnect notification (https://github.com/cedrozor/myrtille/issues/187, thanks gtmsew)
the automatic application pool recycling is now disabled by default, and is not applicable if using the enterprise mode (this prevents enterprise sessions to be dropped unexpectedly!)
if recycling is enabled, a new http session is now acquired on disconnect; this prevents a subsequent login failure (due to the old http session being invalid) without any error message
Expand Down
2 changes: 1 addition & 1 deletion DISCLAIMERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ END OF TERMS AND CONDITIONS

The MIT License (MIT)

Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Copyright (c) 2017-2020, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)

Expand Down
41 changes: 39 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- [Introduction](#introduction)
- [History](#history)
- [Installation](#installation)
- [Docker](#docker)
- [Remote Desktop Services](#remote-desktop-services)
- [Auto-connect / Start remote application from URL](#auto-connect--start-remote-application-from-url)
- [Syntax](#syntax)
Expand Down Expand Up @@ -54,6 +55,36 @@ All releases here: https://github.com/cedrozor/myrtille/releases
- Setup.exe (preferred installation method): setup bootstrapper
- Myrtille.msi: MSI package (x86)

## Docker
From version 2.8.0, Myrtille is available as a docker image.

No installation is required, you just need Docker Desktop or Toolbox for Windows (Windows 10 Pro or Windows Server 2016 or greater) with Windows containers enabled and Hyper-V isolation.

Myrtille is fully functional as a container, but there are also some limitations (inherent to Windows containers): print and audio redirection (through RDP) is not supported at the moment (this may change into a future version).

You can pull it from Docker Hub with the following command (use a tag for a specific version, or latest otherwise):
docker pull cedrozor/myrtille(:tag)

To list the network adapters available to Docker:
docker network ls

Run the image (in detached mode) and provide the resulting container a network adapter able to connect your hosts:
docker run -d --network="<network adapter>" cedrozor/myrtille(:tag)

To list the containers:
docker ps -a

To open a shell into a container (and be able to explore it, check its **ip address**, logs, etc.):
docker exec -it <container ID> cmd
docker exec -it <container ID> powershell

To stop a container
docker stop <container ID>

If you intend to have custom settings, manage your hosts or keep track of the logs, you will need to perform additional steps (**data persistence**).

More details into **Dockerfile**.

## Remote Desktop Services

**For best experience**, and be able to go over the default limit of 2 concurrent users, you will need to install the [RDS role](https://www.exitthefastlane.com/2016/05/native-rds-in-server2016-part-1-basics.html) on your remote server(s). Optionally, you can install the [RD Connection Broker](https://www.tech-coffee.net/rds-2016-farm-deploy-the-farm-in-azure/) feature to allow load-balancing across an RDS farm (possibly hosted on Azure) and manage the applications allowed to run (and with which parameters) on session start.
Expand All @@ -62,6 +93,10 @@ You will also need to enable [multiple sessions per user](https://portal.databas

The RDS role offers you a **grace period of 120 days** after which you will need to use an [RD License Server](https://www.exitthefastlane.com/2016/06/native-rds-in-server2016-part-3-rdsh.html) with proper licenses (CALs) to suit your licensing mode ("Per Device" or "Per User").

**PLEASE READ!** starting with Windows Server 2019 (or Windows 10 release 1903), RDS doesn't reconnect a previously disconnected session (due to a network issue or a manual disconnect) when multiple sessions per user is enabled on the RDS host; instead, it creates a new session. A workaround to that behavior is to lock the session before disconnecting the session (see https://nakedsecurity.sophos.com/2019/06/06/microsoft-dismisses-new-windows-rdp-bug-as-a-feature/ and https://social.technet.microsoft.com/Forums/windowsserver/en-US/baa5cb75-2fed-4d90-bbc6-404eab4aa20d/2019-rdsh-not-able-reconnect-to-disconnected-session-every-time-new-session-with?forum=winserverTS).

Consequently, starting from version 2.8.0, Myrtille scales the session display instead of reconnecting the session (with the new browser size), when the browser is resized. To change that default setting, edit (myrtille path)\js\config.js ("display" section). In addition, you can choose whether or not to keep the aspect ratio of the display (default = don't keep).

## Auto-connect / Start remote application from URL
Starting from version 1.3.0, it's possible to connect and run a program automatically, on session start, from an URL. It's a feature comparable to remoteApp (.rdp files).

Expand Down Expand Up @@ -241,7 +276,7 @@ NOTE: If you have enabled Enterprise Mode and wish to sync your Active Directory
- Create an application (choose Applications from the menu), then click New, enter a Name and save. You will be directed to the application details page, grant access to the user group created in Step 2
- Within the application page, click the button Application Key, this will display the information to configure myrtille

Once these steps are completed, edit the app.config file of Myrtille.Services and uncomment the following appSettings:
Once these steps are completed, edit [myrtille path]\bin\Myrtille.Services.exe.config and uncomment the following appSettings:
- `MFAAuthAdapter`, this is the OASIS MFA adapter
- `OASISApiKey`, this is the API Key found when you clicked Application Key in step 5
- `OASISAppID`, this is the App ID found when you clicked Application Key in step 5
Expand All @@ -264,7 +299,7 @@ The enterprise mode provides the following additional features:
- Access to hosts can be restricted based on the groups the authenticated users belongs to
- Administrators can create a single use session url to a specific host (with specific login credentials) which can be shared with external (non domain) users and only be used once

To enable enterprise mode, edit the app.config file of Myrtille.Services and uncomment the following appSettings:
To enable enterprise mode, edit [myrtille path]\bin\Myrtille.Services.exe.config and uncomment the following appSettings:
- `EnterpriseAdapter`, this is the adapter to use for enterprise mode
- `EnterpriseAdminGroup`, this is the security group which will define a user as an administrator who can create, edit, delete hosts, define access to hosts and create single use sessions
- `EnterpriseDomain`, this is the name of your domain (i.e. MYDOMAIN or mydomain.local) if myrtille is part of it or the domain controller FQDN or IP otherwise
Expand All @@ -274,6 +309,8 @@ To specify a custom path for the MyrtilleEnterprise database or use another SQL

If you wish to create your own enterprise adapter (with a different authentication, database or behavior), `Myrtille.Services.Contracts` contains the interfaces you need.

From version 2.8.0, myrtille provides a simplified host management designed for a local administrator, without the need for a domain and without group access restrictions. The default credentials are "**admin**"/"**admin**" (username/password) and are changed upon first login. See comments into (myrtille path)\bin\Myrtille.Services.exe.config.

## REST APIs

Myrtille can support custom REST APIs, to have additional controls over connections and remote sessions.
Expand Down
100 changes: 100 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# IMAGE BUILD
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# base image
# myrtille works with all versions of Windows (desktop and server), starting from Windows 7 and Windows Server 2008; choose the base image you want to use (size may vary)
# the myrtille installer will anyway install the roles and features required by myrtille (see Install.ps1), if they are not already installed on the base image
FROM mcr.microsoft.com/windows/servercore:ltsc2019
#FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8
#FROM mcr.microsoft.com/windows:1909

# copy the installer into the container
ADD myrtille.msi /myrtille.msi

# run the installer within the container
# passing params to msiexec to override the default settings of the installer doesn't work; the custom actions just ignore them
# TODO: dig this issue, maybe use orca to change that unwanted behavior?
#RUN msiexec /i myrtille.msi /quiet PDFPRINTER=""
RUN msiexec /i myrtille.msi /quiet

# open http and https ports on the container
EXPOSE 80
EXPOSE 443

# entry point
SHELL ["powershell"]
RUN Invoke-WebRequest -UseBasicParsing -Uri 'https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.6/ServiceMonitor.exe' -OutFile 'C:\ServiceMonitor.exe'
ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# NOTES AND LIMITATIONS
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Docker must be configured to use Windows containers, with Hyper-V isolation (see https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container)
# if you want to run Docker within a VM, you will need to enable nested virtualization with Hyper-V (see https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization)
# the host can be Windows 10 Pro or Windows Server 2016 or greater

# printer and audio redirection through RDP is not supported by Windows containers at the moment
# the myrtille installer used by this Dockerfile must be built with the PDF printer option unchecked

# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# DATA PERSISTENCE
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# the myrtille image will use the default settings, empty database and logs
# every new container based on it will have the same default settings, empty database and logs

# if you intend to have custom settings, manage your hosts or keep track of the logs, you can (non-exhaustively):
# - create a Dockerfile with myrtille as a base image and copy your modified files over the original ones (replacing them)
# - commit a modified container into a new image (i.e.: "myrtille_custom") that will be your new image reference

# the 1st method is preferred because it will help you to keep track of your changes
# this will be helpful when you want to use a newer myrtille version (using a different tag) and report these changes
# for example, you could set the myrtille admin password (bin\myrtille.services.exe.config, "LocalAdminPassword") once for all
# regarding the hosts management, you could use an external database (bin\myrtille.services.exe.config, "enterpriseDBConnection"), so that every container will share the same data
# build your Dockerfile with a different image name (i.e.: "myrtille_custom")

# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# USEFUL COMMANDS
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# IMPORTANT! if you have a ~ 15 secs delay on each Docker command under Windows, disable NETBIOS over TCP/IP on each of your network adapters (TCP/IP v4 Properties)
# see https://github.com/docker/for-win/issues/2131#issuecomment-505286617

# to list the network adapters available to Docker:
# docker network ls

# to build the myrtille image (using Docker Desktop or Toolbox), have this Dockerfile and the myrtille installer (.msi file) into a folder, move into this folder then run this command:
# you also need to provide a network adapter able to download the service monitor during the build. Optionally, you can add a version tag to the image (useful to manage different versions of myrtille)
# docker build --network="<network adapter>" -t myrtille(:tag) .

# to run an image (in detached mode) and provide the resulting container a network adapter able to connect your hosts:
# docker run -d --network="<network adapter>" <image name>(:tag)

# to list the containers:
# docker ps -a

# to open a shell into a container (and be able to explore it, check its ip address, logs, etc.):
# docker exec -it <container ID> cmd
# docker exec -it <container ID> powershell

# to stop a container:
# docker stop <container ID>

# to commit a container into a new image (and be able to persist its config, data and logs):
# docker commit <container ID> <image name>(:tag)

# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# DISK CLEANUP
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# after a while, you might want to clean the unused containers and images to free some space

# remove all containers (powershell):
# docker rm $ (docker ps -a -q)

# remove all dangling images:
# docker image prune

# more help: https://docs.docker.com/
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Myrtille: A native HTML4/5 Remote Desktop Protocol client.
Copyright(c) 2014-2019 Cedric Coste
Copyright(c) 2014-2020 Cedric Coste
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions Myrtille.Admin.Services/Myrtille.Admin.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<Content Include="Myrtille.Admin.Services.Install.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Myrtille.Admin.Services.Uninstall.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand Down
2 changes: 1 addition & 1 deletion Myrtille.Admin.Services/MyrtilleApiHost.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Myrtille: A native HTML4/5 Remote Desktop Protocol client.
Copyright(c) 2014-2019 Cedric Coste
Copyright(c) 2014-2020 Cedric Coste
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
20 changes: 19 additions & 1 deletion Myrtille.Admin.Services/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
using System;
/*
Myrtille: A native HTML4/5 Remote Desktop Protocol client.
Copyright(c) 2014-2020 Cedric Coste
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

using System;
using System.ServiceProcess;

namespace Myrtille.Admin.Services
Expand Down
6 changes: 3 additions & 3 deletions Myrtille.Admin.Services/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Myrtille")]
[assembly: AssemblyCopyright("Copyright © 2014-2019 Cedric Coste")]
[assembly: AssemblyCopyright("Copyright © 2014-2020 Cedric Coste")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7.1.0")]
[assembly: AssemblyFileVersion("2.7.1.0")]
[assembly: AssemblyVersion("2.8.0.0")]
[assembly: AssemblyFileVersion("2.8.0.0")]
2 changes: 1 addition & 1 deletion Myrtille.Admin.Services/Services/ConnectionService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Myrtille: A native HTML4/5 Remote Desktop Protocol client.
Copyright(c) 2014-2019 Cedric Coste
Copyright(c) 2014-2020 Cedric Coste
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 83539e3

Please sign in to comment.