Fix web api
This commit is contained in:
@ -9,7 +9,6 @@ import abc
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
|
|
||||||
from click import password_option
|
|
||||||
from pydantic.networks import IPvAnyAddress, IPvAnyNetwork
|
from pydantic.networks import IPvAnyAddress, IPvAnyNetwork
|
||||||
|
|
||||||
from .audit import audit_message
|
from .audit import audit_message
|
||||||
@ -218,6 +217,8 @@ class ClientManagementAPI(BaseSshecretAPI):
|
|||||||
secret_name=name,
|
secret_name=name,
|
||||||
source_address=self.api_client.source,
|
source_address=self.api_client.source,
|
||||||
)
|
)
|
||||||
|
if not secret:
|
||||||
|
raise RuntimeError("Could not fetch a new secret value.")
|
||||||
new_value = encrypt_string(secret, client_key)
|
new_value = encrypt_string(secret, client_key)
|
||||||
secrets[name] = new_value
|
secrets[name] = new_value
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
"""WebAPI."""
|
"""WebAPI."""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from functools import lru_cache
|
|
||||||
import logging
|
import logging
|
||||||
|
from functools import lru_cache
|
||||||
import secrets
|
import secrets
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user