DefGuard / DefGuard/defguard

Endpoint `ssh_authorized_keys` doesn't list all keys

Open
#2,728 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.8k
Forks
115
Avg merge
1d 4h
Merged PRs (30d)
51

Description

There are existing SSH keys

Image

`ssh_authorized_keys` return null
```
[:)] admin ~/defguard > curl -X 'GET' \
'http://localhost:8000/api/v1/ssh_authorized_keys' \
-H 'accept: application/json' \
-H 'Authorization: Bearer dg-some-long-token'
[:)] admin ~/defguard >

```
However, using this endpoint with specified username works
```
[:)] admin ~/defguard > curl -X 'GET' \
'http://localhost:8000/api/v1/ssh_authorized_keys?username=admin' \
-H 'Authorization: Bearer dg-some-long-token''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4oi5NlaShRVXG6nZa4jqB6kO3sYeGd4Nhe5Tfr6EPa
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4oi5NlaShRVXG6nZa4jqB6kO3sYeGd4Nhe5Tfr6EPm%
```

additionally, this endpoint can't be found on `Swagger`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.