oidc configuration not being removed when config is unset

Bug #2059193 reported by James Simpson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Charm
New
Undecided
Unassigned

Bug Description

I have the following config options set via Juju:
 * oidc_client_id
 * oidc_client_secret
 * oidc_issuer
 * oidc_logout_url

These are correctly reflected in "/etc/landscape/service.conf":

```
ubuntu@juju-979dd6-stg-is-landscape-testing-88:~$ sudo grep oidc /etc/landscape/service.conf
oidc-issuer = https://accounts.google.com
oidc-client-id = <redacted>
oidc-client-secret = <redacted>
oidc-logout-url =
```

When I set those config options back to their defaults:

```
juju config landscape-server --reset oidc_client_id --reset oidc_client_secret --reset oidc_issuer --reset oidc_logout_url
```

I see the following in the unit log:

```
2024-03-27 03:58:16 INFO unit.landscape-server/22.juju-log server.go:325 Starting services
2024-03-27 03:58:35 INFO juju.worker.uniter.operation runhook.go:186 ran "config-changed" hook (via hook dispatching script: dispatch)
```

But the OIDC keys are not removed from "/etc/landscape/service.conf".

As a workaround I can set "additional_service_config" as below:

```
stg-is-landscape-testing@is-bastion-ps6:~/plan$ juju config landscape-server additional_service_config

[landscape]
oidc-issuer =
oidc-client-id =
oidc-client-secret =
oidc-logout-url =
```

This blanks out those settings:
```
ubuntu@juju-979dd6-stg-is-landscape-testing-88:~$ sudo grep oidc /etc/landscape/service.conf
oidc-issuer =
oidc-client-id =
oidc-client-secret =
oidc-logout-url =
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.