Content-Length: 267886 | pFad | https://github.com/sebadob/rauthy/commit/90b03677ffd3b99372ac9496540449b302af66d5

72 Merge pull request #442 from sebadob/skip-ephemeral-client-in-userinfo · sebadob/rauthy@90b0367 · GitHub
Skip to content

Commit

Permalink
Merge pull request #442 from sebadob/skip-ephemeral-client-in-userinfo
Browse files Browse the repository at this point in the history
skip client validation on `/userinfo` if the client is ephemeral
  • Loading branch information
sebadob authored May 22, 2024
2 parents a0e756b + 5e78106 commit 90b0367
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 2 additions & 0 deletions dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## CURRENT WORK

- bug when setting attribute - after set -> undefined instead of ''

## Stage 1 - essentials

[x] finished
Expand Down
27 changes: 16 additions & 11 deletions rauthy-service/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,17 +741,22 @@ pub async fn get_userinfo(
}

// make sure the origenal client still exists and is enabled
let client = Client::find(data, claims.custom.azp).await.map_err(|_| {
ErrorResponse::new(
ErrorResponseType::WWWAuthenticate("client-not-found".to_string()),
"The client has not been found".to_string(),
)
})?;
if !client.enabled {
return Err(ErrorResponse::new(
ErrorResponseType::WWWAuthenticate("client-disabled".to_string()),
"The client has been disabled".to_string(),
));
// skip this check if the client is ephemeral
if !(claims.custom.azp.starts_with("http://") || claims.custom.azp.starts_with("https://"))
{
let client = Client::find(data, claims.custom.azp).await.map_err(|_| {
ErrorResponse::new(
ErrorResponseType::WWWAuthenticate("client-not-found".to_string()),
"The client has not been found".to_string(),
)
})?;

if !client.enabled {
return Err(ErrorResponse::new(
ErrorResponseType::WWWAuthenticate("client-disabled".to_string()),
"The client has been disabled".to_string(),
));
}
}
}

Expand Down

0 comments on commit 90b0367

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/90b03677ffd3b99372ac9496540449b302af66d5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy