Content-Length: 263757 | pFad | https://github.com/sebadob/rauthy/commit/72f077f462e4b28624d101510cfb50b64700e425

EF Merge pull request #427 from sebadob/client-secret-from-get-to-post · sebadob/rauthy@72f077f · GitHub
Skip to content

Commit

Permalink
Merge pull request #427 from sebadob/client-secret-from-get-to-post
Browse files Browse the repository at this point in the history
change the `GET` for a client secret to `POST` for additional CSRF validation
  • Loading branch information
sebadob authored May 9, 2024
2 parents e697389 + 3df611f commit 72f077f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/utils/dataFetchingAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export async function deleteClientLogo(id) {

export async function getClientSecret(id) {
const res = await fetch(`/auth/v1/clients/${id}/secret`, {
method: 'GET',
headers: HEADERS,
method: 'POST',
headers: getHeaders(),
});
return await checkRedirectForbidden(res);
}
Expand Down
7 changes: 5 additions & 2 deletions rauthy-handlers/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ pub async fn get_client_by_id(

//github.com/ Returns the secret in cleartext for a given client by its *id*.
//github.com/
//github.com/ This is a `POST` request on purpose to do an additional CSRF token check for such a
//github.com/ sensitive endpoint.
//github.com/
//github.com/ **Permissions**
//github.com/ - rauthy_admin
#[utoipa::path(
get,
post,
path = "/clients/{id}/secret",
tag = "clients",
responses(
Expand All @@ -100,7 +103,7 @@ pub async fn get_client_by_id(
(status = 404, description = "NotFound"),
),
)]
#[get("/clients/{id}/secret")]
#[post("/clients/{id}/secret")]
pub async fn get_client_secret(
data: web::Data<AppState>,
path: web::Path<String>,
Expand Down

0 comments on commit 72f077f

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/72f077f462e4b28624d101510cfb50b64700e425

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy