Comments (5)
@chenrujun @moarychan @Netyyyy @saragluna
from azure-sdk-for-java.
Thank you for your feedback. Tagging and routing to the team member best able to assist.
from azure-sdk-for-java.
@kirankumar994 are you using the com.azure.spring spring-cloud-azure-starter-keyvault
to retrieve the kv property source, instead of using the kv secret client and get the secret by yourself?
from azure-sdk-for-java.
Hi @saragluna , here is the dependency I am using.
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-starter-keyvault</artifactId>
<version>5.11.0</version>
</dependency>
But, as I mentioned in the above I am able to run the application on my local by configurin the bean in my Reactive Mongo config as below
@Bean
public SecretClient createSecretClient() {
ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder()
.clientId(clientId)
.clientSecret(clientSecret)
.tenantId(tenantId)
.build();
// Azure SDK client builders accept the credential as a parameter.
return new SecretClientBuilder()
.vaultUrl(keyVaultEndpoint)
.credential(clientSecretCredential)
.buildClient();
}
The clientId, secret and tenantId are reading from the application properties file. I am not facing any issue on my local. Here is the following I am trying to do.
- Keeping clientId, secret and tenantId in the application properties file and reading in the above code. The application is up and runnin after I login with az login service principal.
- Later, I copied the same properties in the azure spring apps environment variables and tried to deploy the application on azure spring apps, then it is failing to start the application and throwing the below exception.
java.lang.IllegalStateException: Failed to configure KeyVault property source
I would like to know what I am doing wrong here. Thank you in advance.
from azure-sdk-for-java.
Hi @kirankumar994, what do you mean by The application is up and runnin after I login with az login service principal
?
What's the properties you set on Azure Spring Apps, I guess that the KV property source is enabled, but without any credential to connect to the KV client in the property source. The bean you defined in the following code is a different client object from the KV client newed in the KV property source.
return new SecretClientBuilder()
.vaultUrl(keyVaultEndpoint)
.credential(clientSecretCredential)
.buildClient();
from azure-sdk-for-java.
Related Issues (20)
- Migration directions from old azure-storage HOT 3
- [BUG] Failed to upload blob: Wrong number of arguments; expected 1, got 0 HOT 6
- [BUG] ChatRequestUserMessage content is binaryData HOT 3
- [BUG] azure-core-http-netty 1.15.1 contains wrong netty.version property HOT 5
- [FEATURE REQ] add a LIVE test for oracledatabase HOT 2
- Typo "a Azure"→"an Azure" HOT 1
- Typo "a Azure"→"an Azure" HOT 1
- [BUG] PagedIterable<BlobItem> stream().paralllel() is behaving as sequential HOT 2
- [BUG] Azure Communication Service Job Router RouterValue class Deserialize Issue HOT 1
- Factory method 'openAIClient' threw exception; nested exception is java.lang.NoClassDefFoundError: reactor/util/Loggers HOT 3
- Detected an instance of Random/SplittableRandom class in the image heap HOT 3
- [BUG] Cosmos hangs forever with CosmosEndToEndOperationLatencyPolicyConfig set HOT 2
- [OpenAI] Support token calculation in streaming API
- Use an access token directly instead of token credential HOT 1
- [BUG] Azure Communication Service Job Router Java SDK having Deserialize Issue for RouterValue class HOT 3
- Receive message connection from ServiceBusProcessorClient closes due to inactivity in service bus HOT 3
- [Question] Implementing Long-Running Operations with SyncPoller HOT 3
- Change BinaryData fromObject(Object) and toObject(Class<T>) / toObject(TypeReference<T>) behavior
- OpenRewrite recipes for moving usages from azure-core to io.clientcore
- Authentication window not opening in browser[BUG] HOT 3
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.