-
Notifications
You must be signed in to change notification settings - Fork 161
feat (jans-cedarling): Load trusted issuers on startup on the background #13125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 28 commits
a130aaa
8c89e89
720a0fa
cc7c720
a0115ce
f844b47
45d0887
99ed28f
bbf870c
24cc68e
a183dc3
bc62313
513d158
9bc827f
9f0375b
4732690
2636d75
10c9f7b
9b950e8
46d3386
a4cfec4
61b702a
bc26ed6
5fdd95a
48911bc
54b6488
4b81c8d
86ef562
95f8932
965ac00
edf8370
c8f230b
73b0b29
2d4aa2b
7ede7b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ use std::collections::{HashMap, HashSet}; | |
| use std::env; | ||
| use std::fmt::Display; | ||
| use std::fs; | ||
| use std::num::NonZeroUsize; | ||
| use std::path::Path; | ||
| use std::str::FromStr; | ||
|
|
||
|
|
@@ -20,6 +21,7 @@ use super::{ | |
| MemoryLogConfig, PolicyStoreConfig, PolicyStoreSource, | ||
| }; | ||
| use super::{BootstrapConfigRaw, LockServiceConfig}; | ||
| use crate::jwt_config::{TrustedIssuerLoaderConfig, TrustedIssuerLoaderTypeRaw}; | ||
| use crate::log::{LogLevel, StdOutLoggerMode}; | ||
| use jsonwebtoken::Algorithm; | ||
| use serde::{Deserialize, Deserializer, Serialize}; | ||
|
|
@@ -112,6 +114,9 @@ impl BootstrapConfig { | |
| }) | ||
| .transpose()?; | ||
|
|
||
| let trusted_issuer_workers = NonZeroUsize::new(raw.trusted_issuer_loader_workers) | ||
| .unwrap_or_else(|| unsafe { NonZeroUsize::new_unchecked(1) }); | ||
|
||
|
|
||
| // JWT Config | ||
| let jwt_config = JwtConfig { | ||
| jwks, | ||
|
|
@@ -121,6 +126,9 @@ impl BootstrapConfig { | |
| token_cache_max_ttl_secs: raw.token_cache_max_ttl, | ||
| token_cache_capacity: raw.token_cache_capacity, | ||
| token_cache_earliest_expiration_eviction: raw.token_cache_earliest_expiration_eviction, | ||
| trusted_issuer_loader: raw | ||
| .trusted_issuer_loader_type | ||
| .to_config(trusted_issuer_workers), | ||
| }; | ||
|
|
||
| let authorization_config = AuthorizationConfig { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.