mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-27 14:51:21 +00:00
Compare commits
90 commits
Author | SHA1 | Date | |
---|---|---|---|
9a47a2ae4f | |||
|
183b6fb99d | ||
daff68ff1b | |||
12dce85f1d | |||
|
d1fe52c071 | ||
|
99727cbea0 | ||
651fb07bfa | |||
|
39ec69cdc3 | ||
77bbef1fa5 | |||
0a1478556c | |||
af809886aa | |||
|
ec2ad7eafe | ||
e9d088acf2 | |||
|
b88b92bcdf | ||
|
2ecc6a63bb | ||
|
b30a73dc61 | ||
591a2a558d | |||
|
906dcb02fd | ||
204d8c76e8 | |||
bf8d86b6fd | |||
a1e89a5f2b | |||
|
7db9b7d14d | ||
e75d1b6556 | |||
|
c724d7604d | ||
4db5cf0fcd | |||
|
60ad985e3f | ||
0251190921 | |||
|
25a6d8bb85 | ||
6a319cd15e | |||
|
bea9049dee | ||
e9f3bbfb38 | |||
|
75f7adea20 | ||
deb649c1e2 | |||
|
a9023e5bf8 | ||
171b0c0cc9 | |||
ac4e2f37f2 | |||
|
57ffb39d0d | ||
|
2ae74badf3 | ||
03ad8b248c | |||
4bb6048ed6 | |||
|
501d4fdb9f | ||
|
b711a67a35 | ||
fb5d31e15a | |||
|
97f9aefac4 | ||
be864e9263 | |||
|
5030f4530d | ||
df4ba6b2a5 | |||
|
4114a4eb49 | ||
dc0955896a | |||
|
e2dff58fbc | ||
4940f6ab76 | |||
|
0316c9b62a | ||
f934b6decc | |||
d9e61ef965 | |||
87d1abb957 | |||
4cbe9d150b | |||
21f0ccb007 | |||
|
0a6c8e08a2 | ||
|
5b303a1c03 | ||
|
c3c29998dc | ||
|
48ba0fac9c | ||
|
7d045cb1cc | ||
fe60cb9b57 | |||
|
86f40179d4 | ||
4720bba3ef | |||
a112604add | |||
2a2496a9fa | |||
cd304e753d | |||
56fa06754d | |||
303245c65a | |||
ffdb0e840d | |||
45f78e67a2 | |||
dbfd200ff5 | |||
76a647b884 | |||
|
9ee9e3c462 | ||
|
b0c07d8987 | ||
|
b0a49b5215 | ||
|
ce27373cf0 | ||
|
9d5e1fcd3c | ||
094904ee20 | |||
d194dc0d94 | |||
b717210765 | |||
59d3c062e5 | |||
|
38a0d9811a | ||
|
7c4a7dfdff | ||
|
6d3cc9df79 | ||
|
fd3b5d83a1 | ||
|
b58fce276d | ||
68f669135b | |||
|
147c6ed04b |
9 changed files with 550 additions and 423 deletions
9
.github/renovate.json
vendored
9
.github/renovate.json
vendored
|
@ -1,5 +1,12 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base"],
|
||||
"reviewers": ["bartvdbraak"]
|
||||
"reviewers": ["bartvdbraak"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePrefixes": ["azure"],
|
||||
"groupName": "Azure Dependencies",
|
||||
"groupSlug": "azure-dependencies"
|
||||
}
|
||||
]
|
||||
}
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -70,7 +70,7 @@ jobs:
|
|||
experimental: false
|
||||
|
||||
- name: mac-arm64
|
||||
os: macos-11.0
|
||||
os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
cross: true
|
||||
experimental: true
|
||||
|
|
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
|
@ -56,9 +56,10 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- uses: azure/login@v2
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
client-id: ${{ secrets.AZURE_CLIENT_ID_BICEP }}
|
||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
|
||||
- name: Deploy Bicep template
|
||||
uses: azure/arm-deploy@v2
|
||||
with:
|
||||
|
|
934
Cargo.lock
generated
934
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "keyweave"
|
||||
version = "0.2.7"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
authors = ["Bart van der Braak <bart@vanderbraak.nl>"]
|
||||
keywords = ["azure", "keyvault", "env"]
|
||||
|
@ -11,9 +11,9 @@ repository = "https://github.com/bartvdbraak/keyweave/"
|
|||
|
||||
[dependencies]
|
||||
anyhow = "1.0.82"
|
||||
azure_core = "0.19.0"
|
||||
azure_identity = "0.19.0"
|
||||
azure_security_keyvault = "0.19.0"
|
||||
azure_core = "0.21.0"
|
||||
azure_identity = "0.21.0"
|
||||
azure_security_keyvault = "0.21.0"
|
||||
clap = { version = "4.5.4", features = ["derive"] }
|
||||
futures = "0.3.30"
|
||||
paris = { version = "1.5.15", features = ["macros"] }
|
||||
|
@ -26,4 +26,4 @@ openssl = { version = "0.10", features = ["vendored"] }
|
|||
assert_cmd = "2.0.14"
|
||||
assert_fs = "1.1.1"
|
||||
predicates = "3.1.0"
|
||||
serial_test = "3.0.0"
|
||||
serial_test = "3.1.0"
|
||||
|
|
|
@ -31,7 +31,7 @@ var nameFormat = '${name.tenantId}-${name.projectId}-${environment}-${name.regio
|
|||
Resource Group
|
||||
*/
|
||||
|
||||
resource ResourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = {
|
||||
resource ResourceGroup 'Microsoft.Resources/resourceGroups@2024-03-01' = {
|
||||
name: format(nameFormat, 'RG', 1)
|
||||
location: location
|
||||
tags: tags
|
||||
|
|
|
@ -16,7 +16,7 @@ var accessPolicies = [for identity in identities: {
|
|||
Log Analytics Workspace (existing)
|
||||
*/
|
||||
|
||||
resource _logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' existing = {
|
||||
resource _logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' existing = {
|
||||
name: format(nameFormat, 'LAW', 1)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ param tags object
|
|||
Log Analytics Workspace
|
||||
*/
|
||||
|
||||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
|
||||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
|
||||
name: format(nameFormat, 'LAW', 1)
|
||||
location: location
|
||||
tags: tags
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use anyhow::Result;
|
||||
use azure_identity::DefaultAzureCredential;
|
||||
use azure_identity::{DefaultAzureCredential, TokenCredentialOptions};
|
||||
use azure_security_keyvault::prelude::KeyVaultGetSecretsResponse;
|
||||
use azure_security_keyvault::KeyvaultClient;
|
||||
use clap::Parser;
|
||||
|
@ -237,7 +237,12 @@ async fn main() -> Result<()> {
|
|||
let vault_url = format!("https://{}.vault.azure.net", opts.vault_name);
|
||||
|
||||
log.loading("Detecting credentials.");
|
||||
let credential = DefaultAzureCredential::default();
|
||||
let credential_options = TokenCredentialOptions::default();
|
||||
let credential =
|
||||
DefaultAzureCredential::create(credential_options).map_err(|e| CustomError {
|
||||
message: format!("Failed to create DefaultAzureCredential: {}", e),
|
||||
})?;
|
||||
|
||||
let client = match KeyvaultClient::new(&vault_url, std::sync::Arc::new(credential)) {
|
||||
Ok(c) => c,
|
||||
Err(err) => {
|
||||
|
|
Loading…
Reference in a new issue