Comments (6)
using :
springboot 3.2.2
sring-cloud-azure-dependencies 5.9.1
JavaSE-17 (OpenJDK 21.0.1)
az cli 2.57.0
running on MacOS 14.3
from azure-sdk-for-java.
logs
[2m2024-02-28T11:46:45.153-05:00 [0;39m [32m INFO [0;39m [35m34603 [0;39m [2m--- [0;39m [2m[ main] [0;39m [2m [0;39m [36mm.p.s.SpringbootAzureKeyvaultApplication [0;39m [2m: [0;39m Starting SpringbootAzureKeyvaultApplication using Java 21.0.1 with PID 34603 (/Users/lavercr/src/springboot-azure-keyvault/target/classes started by lavercr in /Users/lavercr/src/springboot-azure-keyvault)
[2m2024-02-28T11:46:45.154-05:00 [0;39m [32m INFO [0;39m [35m34603 [0;39m [2m--- [0;39m [2m[ main] [0;39m [2m [0;39m [36mm.p.s.SpringbootAzureKeyvaultApplication [0;39m [2m: [0;39m No active profile set, falling back to 1 default profile: "default"
[2m2024-02-28T11:46:45.642-05:00 [0;39m [32m INFO [0;39m [35m34603 [0;39m [2m--- [0;39m [2m[ main] [0;39m [2m [0;39m [36mAbstractAzureServiceClientBuilderFactory [0;39m [2m: [0;39m Will configure the default credential of type DefaultAzureCredential for class com.azure.identity.DefaultAzureCredentialBuilder.
[2m2024-02-28T11:46:45.710-05:00 [0;39m [32m INFO [0;39m [35m34603 [0;39m [2m--- [0;39m [2m[ main] [0;39m [2m [0;39m [36mm.p.s.SpringbootAzureKeyvaultApplication [0;39m [2m: [0;39m Started **SpringbootAzureKeyvaultApplication in 141.667 seconds (process running for 142.235)**
from azure-sdk-for-java.
Hi @lavercr thanks for reaching out to us via this github issue. @saragluna @backwind1233 could you please follow up?
/cc @vcolin7
from azure-sdk-for-java.
Hi @lavercr , thanks for reaching out, Could help provide more info about how to use AzureCliCredential
directly?
from azure-sdk-for-java.
If I create my own secretClient using AzureCliCredentialBuilder I can connect and pull passwords, but this way I have to write all the code. I would like to keep to the one liner that spring.cloud.azure.keyvault.secret.property-sources[0].endpoint gives us. This loads all the secrets and makes them available to the spring beans right away. If I do it myself it is more code, and the beans with secrets have to depend on this bean loading first. That gets messy quick.
@Configuration
public class AzureKeyVaultConfig {
@Value("${spring.cloud.azure.keyvault.secret.uri}")
private String keyVaultUri;
@Bean
SecretClient secretClient() {
AzureCliCredential cliCredential = new AzureCliCredentialBuilder().build();
// Azure SDK client builders accept the credential as a parameter.
return new SecretClientBuilder()
.vaultUrl(keyVaultUri)
.credential(cliCredential)
.buildClient();
}
}
from azure-sdk-for-java.
Hi @lavercr , we don't support use AzureCliCredential
directly, but you can add this code to only use AzureCliCredential for authentication.
@Bean(name = DEFAULT_TOKEN_CREDENTIAL_BEAN_NAME)
TokenCredential tokenCredential( ) {
return new AzureCliCredentialBuilder().build();
}
from azure-sdk-for-java.
Related Issues (20)
- [BUG] When prompt trigger the content filter, the serialized object with returned JSON is incorrect HOT 9
- [BUG] java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-epoll-1, when using uploadWithResponse method of BlobClient HOT 5
- [OpenAI] Investigate the error message POJO that works for both AOAI and OAI HOT 2
- [BUG] Spring presents Bean selection issues when passwordless and resource-manager are used together. HOT 2
- Test Issue, please ignore HOT 1
- Test issue HOT 1
- Setup of JMS message listener invoker failed for destination 'queue-name' - trying to recover. Cause: Local transactions cannot span multiple top-level entities such as queue or topic. TrackingId:some_tracking_id, SystemTracker:gateway5, Timestamp:2024-02-29T21:57:11 [condition = amqp:not-allowed] HOT 6
- [BUG] java.lang.NoSuchMethodError: 'void com.azure.core.util.BinaryData.writeTo(java.nio.channels.WritableByteChannel)' HOT 1
- How to know the number of tokens returned when calling the GPT-35 streaming chat interface? HOT 3
- [QUERY] OAuth Logging noise HOT 1
- [BUG] Postgresql passwordless mode does not work with Flyway and server certificate verification HOT 2
- [Kafka V2]Avro/Json/ProtoBuf support
- Add support for non-String type expandable enums
- [OpenAI] Create a sample to show how to use the external tokenizer to compute tokens in Chat Completion Streaming API
- [BUG]ReturnBarrierRequestOnceQuorumHasBeenRead
- Videos bigger than 256MB are not uploading to Blob Storage using BlobAsyncClient HOT 10
- [BUG] sessionIdleTimeout property is missing in the Spring Cloud binder HOT 2
- [FEATURE REQ] Improve documentation for max-concurrent-calls property HOT 2
- [BUG] Java SDK - Private DNS - Delete virtual link doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sdk-for-java.