Skip to content

Commit

Permalink
feat(jans-cedarling): first take on doing something useful with ident…
Browse files Browse the repository at this point in the history
…ity_source

Signed-off-by: John Anderson <[email protected]>
  • Loading branch information
djellemah committed Nov 5, 2024
1 parent 5c36d68 commit 917f560
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions jans-cedarling/cedarling/src/init/service_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ impl ServiceConfig {
})
.collect::<Result<Vec<_>, _>>()?;

// TODO Is this where identity_source should be handled?
let _identity_source_and_openid = policy_store
.identity_source
.clone() // we need clone to avoid borrowing
.unwrap_or_default()
.values()
.map(|identity_source| {
// TODO This will need to be generalised.
// TrustedIssuerAndOpenIdConfig::fetch(identity_source.clone(), &client)
Ok(identity_source.openid_configuration_endpoint.clone())
})
.collect::<Result<Vec<String>, jwt::KeyServiceError>>()?;

let builder = ServiceConfig::builder()
.jwt_algorithms(parse_jwt_algorithms(bootstrap)?)
.policy_store(policy_store)
Expand Down

0 comments on commit 917f560

Please sign in to comment.