-
Notifications
You must be signed in to change notification settings - Fork 8
Fix key rotation #160
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?
Fix key rotation #160
Conversation
aram356
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good overall. I added small nitpicks to address.
|
|
||
| Ok(Self { | ||
| api_key, | ||
| base_url: "https://api.fastly.com".to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Use const for "https://api.fastly.com"
| [local_server.secret_stores] | ||
| [[local_server.secret_stores.signing_keys]] | ||
| key = "ts-2025-01-01" | ||
| data = "NVnTYrw5xoyTJDOwoUWoPJO3A6UCCXOJJUzgGTxxx7k=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Use placeholder in place actual key
| ```toml | ||
| [request_signing] | ||
| enabled = true | ||
| config_store_id = "r8loXvD9GESm5Crw5oyS16" # Your jwks_store ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Use placeholder in place actual store id
| let secret_store = FastlySecretStore::new(store_name); | ||
| let api_key = secret_store.get(key_name)?; | ||
|
|
||
| log::info!("FastlyApiClient initialized with backend: {}", backend_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Could be debug
Previously using hardcoded backend names, we later added port number to the dynamic backend names which broke the key rotation.
Now the fastly client will use the generated backend name.
closes #185