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

fix: register api functions for ssh key security. #285

Closed
Closed
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions neurons/register_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ async def check_miner_status(hotkey_list: List[str], query_version: bool = False
"description": "An error occurred while restarting docker.",
},
})
async def restart_docker(hotkey: str, uuid_key: str) -> JSONResponse:
async def restart_docker(hotkey: str, uuid_key: str, ssh_key:str) -> JSONResponse:
# Instantiate the connection to the db
db = ComputeDb()
cursor = db.get_cursor()
Expand All @@ -943,7 +943,7 @@ async def restart_docker(hotkey: str, uuid_key: str) -> JSONResponse:

docker_action = {
"action": "restart",
"ssh_key": "",
"ssh_key": ssh_key,
}

if uuid_key_db == uuid_key:
Expand Down Expand Up @@ -1019,7 +1019,7 @@ async def restart_docker(hotkey: str, uuid_key: str) -> JSONResponse:
"description": "An error occurred while pausing docker.",
},
})
async def pause_docker(hotkey: str, uuid_key: str) -> JSONResponse:
async def pause_docker(hotkey: str, uuid_key: str, ssh_key:str) -> JSONResponse:
# Instantiate the connection to the db
db = ComputeDb()
cursor = db.get_cursor()
Expand All @@ -1046,7 +1046,7 @@ async def pause_docker(hotkey: str, uuid_key: str) -> JSONResponse:

docker_action = {
"action": "pause",
"ssh_key": "",
"ssh_key": ssh_key,
}

if uuid_key_db == uuid_key:
Expand Down Expand Up @@ -1123,7 +1123,7 @@ async def pause_docker(hotkey: str, uuid_key: str) -> JSONResponse:
"description": "An error occurred while unpausing docker.",
},
})
async def unpause_docker(hotkey: str, uuid_key: str) -> JSONResponse:
async def unpause_docker(hotkey: str, uuid_key: str, ssh_key: str) -> JSONResponse:
# Instantiate the connection to the db
db = ComputeDb()
cursor = db.get_cursor()
Expand All @@ -1150,7 +1150,7 @@ async def unpause_docker(hotkey: str, uuid_key: str) -> JSONResponse:

docker_action = {
"action": "unpause",
"ssh_key": "",
"ssh_key": ssh_key,
}

if uuid_key_db == uuid_key:
Expand Down