0001-hobo-generate-a-wscall-secrets-section-10022.patch
tests/test_hobo.py | ||
---|---|---|
200 | 200 |
assert (pub.get_site_option('authentic.example.net', 'api-secrets') |
201 | 201 |
== CmdCheckHobos.shared_secret(HOBO_JSON['services'][1]['secret_key'], |
202 | 202 |
HOBO_JSON['services'][2]['secret_key'])) |
203 |
assert (pub.get_site_option('authentic.example.net', 'wscall-secrets') |
|
204 |
== CmdCheckHobos.shared_secret(HOBO_JSON['services'][1]['secret_key'], |
|
205 |
HOBO_JSON['services'][2]['secret_key'])) |
|
203 | 206 | |
204 | 207 |
def test_update_configuration(): |
205 | 208 |
service = [x for x in HOBO_JSON.get('services', []) if x.get('service-id') == 'wcs'][0] |
wcs/ctl/check_hobos.py | ||
---|---|---|
319 | 319 | |
320 | 320 |
if not 'api-secrets' in config.sections(): |
321 | 321 |
config.add_section('api-secrets') |
322 |
if not 'wscall-secrets' in config.sections(): |
|
323 |
config.add_section('wscall-secrets') |
|
322 | 324 |
for key, value in api_secrets.items(): |
323 | 325 |
config.set('api-secrets', key, value) |
326 |
# for now the secrets are the same whatever the direction is. |
|
327 |
config.set('wscall-secrets', key, value) |
|
324 | 328 | |
325 | 329 |
# add known services |
326 | 330 |
for service in self.all_services.get('services', []): |
327 |
- |