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

feat(windows-agent): Hide unnecessarily exposed fields in the registry #369

Merged
merged 23 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3e647a0
Config: Rename config.SubsriptionSource to config.Source
EduardGomezEscandell Oct 27, 2023
e2deabb
Config: Implement layering system
EduardGomezEscandell Oct 26, 2023
8231e1c
Config: Use layering system
EduardGomezEscandell Oct 27, 2023
ad3b5cb
Config: Implement source-wise subscription getter and setter
EduardGomezEscandell Oct 27, 2023
c156e4c
Config: Rewrite config load/dump
EduardGomezEscandell Oct 27, 2023
a932d13
Config: Rewrite checksum validator
EduardGomezEscandell Oct 26, 2023
73b3c3a
Adapt callers to new config function signatures
EduardGomezEscandell Oct 26, 2023
2aa9fef
Update documentation
EduardGomezEscandell Oct 26, 2023
e0cb976
Adapt tests to new Config
EduardGomezEscandell Oct 26, 2023
c71b0fa
Config: fix log messages refering to the registry
EduardGomezEscandell Oct 27, 2023
b30fffb
Rename GUI-sourced config to User-sourced
EduardGomezEscandell Oct 27, 2023
cb552bc
Rename config_layering.go to config_source.go
EduardGomezEscandell Oct 27, 2023
dc6accf
Clarify semantics of `hasChanged`
EduardGomezEscandell Oct 27, 2023
7c2dbf0
Code formatting in config_marshal.go
EduardGomezEscandell Oct 27, 2023
a75f102
Update docstring for config.LandscapeClientConfig
EduardGomezEscandell Oct 27, 2023
52d438b
Hide config backup inside loadRegistry
EduardGomezEscandell Oct 27, 2023
2e2dd04
Shift marshal/unmarshal responsability to the marshalHelper
EduardGomezEscandell Oct 27, 2023
b083637
Config: dump no longer writes to the regisry
EduardGomezEscandell Oct 27, 2023
5c2effc
Update tests: User config is no longer called GUI
EduardGomezEscandell Oct 27, 2023
3418252
Update tests: key access rights are no longer relevant to Setters
EduardGomezEscandell Oct 27, 2023
2fab362
Change UI wantErr test now that registry access is not relevant
EduardGomezEscandell Oct 27, 2023
400871b
Add wantError test to Subscription setter
EduardGomezEscandell Oct 27, 2023
0cef1de
Remove config runtime setter: we only need it at compile-time
EduardGomezEscandell Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading