Endpoint `ssh_authorized_keys` doesn't list all keys
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 115
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 51
Description
There are existing SSH keys
`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
Assessment
This issue has not been assessed yet.