Skip to content

Commit

Permalink
feat(windows-agent): Hide unnecessarily exposed fields in the registry (
Browse files Browse the repository at this point in the history
#369)

The registry exposes a lot of fields that should not be exposed to the
user. It should really only show:

- Organization-provided pro token
- Organization-provided landscape config

The rest should be moved to a file. A side benefit is that the registry
becomes (almost) read-only to us, meaning we can rethink our disabled
virtualization.

---

UDENG-1685
  • Loading branch information
EduardGomezEscandell authored Oct 30, 2023
2 parents 67d37df + 0cef1de commit 79acfc8
Show file tree
Hide file tree
Showing 12 changed files with 612 additions and 560 deletions.
2 changes: 1 addition & 1 deletion docs/03-restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ If you want to restart UP4W with factory settings, do:
```
1. Remove folder `$env:LocalAppData\UbuntuPro`.
2. Remove registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`.
3. You're done. Next time you start the GUI it'll be like a fresh install.
3. You're done. Next time you start the GUI it'll be like a fresh install.
4 changes: 2 additions & 2 deletions docs/04-enable-pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
```

## Organisational pro enablement
1. Find registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`, field `ProTokenOrg`.
1. Find registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`, field `UbuntuProToken`.
2. Write your Ubuntu Pro Token into the registry key
3. The changes will take effect next time you start Ubuntu Pro For Windows. All new distros will automatically become pro-enabled. If you want them to be applied now, follow the steps on how to restart Ubuntu Pro For Windows. Otherwise, you're done.
3. The changes will take effect next time you start Ubuntu Pro For Windows. All new distros will automatically become pro-enabled. If you want them to be applied now, follow the steps on how to restart Ubuntu Pro For Windows. Otherwise, you're done.
2 changes: 1 addition & 1 deletion docs/05-attach-landscape.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to auto-register WSL distros to Landscape with UP4W
You can use a private Landscape instance (different from [landscape.canonical.com](https://landscape.canonical.com)). It must be over HTTP, as using certificates is not yet supported. To do so, follow these steps:
1. Find registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`, field `LandscapeClientConfig`.
1. Find registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`, field `LandscapeConfig`.
2. Copy the contents of the Landscape configuration file into the registry key:
```ini
[host]
Expand Down
Loading

0 comments on commit 79acfc8

Please sign in to comment.