Merge ~tshinn/snap-store-proxy-charm:self_signed_cert_support into snap-store-proxy-charm:main
Status: | Merged |
---|---|
Approved by: | Tong Shinn |
Approved revision: | ef4d6148316922e75ffd6d603deef16dfb2a9ac1 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~tshinn/snap-store-proxy-charm:self_signed_cert_support |
Merge into: | snap-store-proxy-charm:main |
Diff against target: |
186 lines (+63/-11) 5 files modified
README.md (+5/-0) src/charm.py (+15/-3) src/helpers.py (+10/-2) tests/test_charm.py (+14/-0) tests/test_helpers.py (+19/-6) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Wouter van Bommel (community) | Approve | ||
Jonathan Hartley (community) | Approve | ||
Review via email: mp+436227@code.launchpad.net |
Commit message
Add support for configuring the proxy nginx with self signed certificate by setting both the "certificate" and "private_key" configurations to "selfsigned".
The reason for overloading the existing "certificate" and "private_key" configurations is that if a new configuration variable is created for enabling self-signed certs, the charm's behaviour becomes unclear when both the new variable and the existing variables are populated.
Description of the change
This change allows for easier local testing of the store proxy deployed using the charm.
The following juju config commands can be executed to generate and configure self signed certificate on the proxy:
juju config snap-store-proxy certificate=
juju config snap-store-proxy private_
Successful deployment looks like the following:
ubuntu@
Store URL: https:/
Store DB: ok
Store ID: JFmKgUMENL7o6Xs
Status: approved
Connected Devices (updated daily): 0
Device Limit: 25
Internal Service Status:
memcached: running
nginx: running
snapauth: running
snapdevicegw: running
snapdevicegw-
snapproxy: running
snaprevs: running
ubuntu@
snapcraft.io store API service - Copyright 2018-2022 Canonical.
LGTM, but best if Wouter takes a look.