azure-identity-java
यह क्या करती है
यह टूल आपके Java कोड को Microsoft Azure services से सुरक्षित तरीके से जोड़ने में मदद करता है। यह Microsoft Entra ID नाम की एक प्रणाली का इस्तेमाल करता है, जो जाँचती है कि आपके प्रोग्राम को इन services तक पहुँचने की अनुमति है या नहीं।
कब इस्तेमाल करें
- ✓जब आपके Java प्रोग्राम को Azure में डेटा सेव करना हो।
- ✓जब आपके Java प्रोग्राम को किसी Azure service से जानकारी पढ़नी हो।
- ✓जब आप चाहते हैं कि Azure services को सिर्फ आपका प्रोग्राम ही एक्सेस करे।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-identity-java/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरा Java प्रोग्राम Azure से सुरक्षित तरीके से कैसे जुड़ सकता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप अपने Java project में एक library जोड़ते हैं और तय करते हैं कि वह Azure के सामने अपनी पहचान कैसे बताएगा। सबसे आम तरीका 'DefaultAzureCredential' है, जो अपने आप कई तरीकों से जुड़ने की कोशिश करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Azure Identity (Java)
Authenticate Java applications with Azure services using Microsoft Entra ID (Azure AD).
Installation
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.15.0</version>
</dependency>
Key Concepts
| Credential | Use Case |
|---|---|
DefaultAzureCredential |
Recommended - Works in dev and production |
ManagedIdentityCredential |
Azure-hosted apps (App Service, Functions, VMs) |
EnvironmentCredential |
CI/CD pipelines with env vars |
ClientSecretCredential |
Service principals with secret |
ClientCertificateCredential |
Service principals with certificate |
AzureCliCredential |
Local dev using az login |
InteractiveBrowserCredential |
Interactive login flow |
DeviceCodeCredential |
Headless device authentication |
DefaultAzureCredential (Recommended)
The DefaultAzureCredential tries multiple authentication methods in order:
- Environment variables
- Workload Identity
- Managed Identity
- Azure CLI
- Azure PowerShell
- Azure Developer CLI
import com.azure.identity.DefaultAzureCredential;
import com.azure.identity.DefaultAzureCredentialBuilder;
// Simple usage
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
// Use with any Azure client
BlobServiceClient blobClient = new BlobServiceClientBuilder()
.endpoint("https://<storage-account>.blob.core.windows.net")
.credential(credential)
.buildClient();
KeyClient keyClient = new KeyClientBuilder()
.vaultUrl("https://<vault-name>.vault.azure.net")
.credential(credential)
.buildClient();
Configure DefaultAzureCredential
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder()
.managedIdentityClientId("<user-assigned-identity-client-id>") // For user-assigned MI
.tenantId("<tenant-id>") // Limit to specific tenant
.excludeEnvironmentCredential() // Skip env vars
.excludeAzureCliCredential() // Skip Azure CLI
.build();
Managed Identity
For Azure-hosted applications (App Service, Functions, AKS, VMs).
import com.azure.identity.ManagedIdentityCredential;
import com.azure.identity.ManagedIdentityCredentialBuilder;
// System-assigned managed identity
ManagedIdentityCredential credential = new ManagedIdentityCredentialBuilder()
.build();
// User-assigned managed identity (by client ID)
ManagedIdentityCredential credential = new ManagedIdentityCredentialBuilder()
.clientId("<user-assigned-client-id>")
.build();
// User-assigned managed identity (by resource ID)
ManagedIdentityCredential credential = new ManagedIdentityCredentialBuilder()
.resourceId("/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<name>")
.build();
Service Principal with Secret
import com.azure.identity.ClientSecretCredential;
import com.azure.identity.ClientSecretCredentialBuilder;
ClientSecretCredential credential = new ClientSecretCredentialBuilder()
.tenantId("<tenant-id>")
.clientId("<client-id>")
.clientSecret("<client-secret>")
.build();
Service Principal with Certificate
import com.azure.identity.ClientCertificateCredential;
import com.azure.identity.ClientCertificateCredentialBuilder;
// From PEM file
ClientCertificateCredential credential = new ClientCertificateCredentialBuilder()
.tenantId("<tenant-id>")
.clientId("<client-id>")
.pemCertificate("<path-to-cert.pem>")
.build();
// From PFX file with password
ClientCertificateCredential credential = new ClientCertificateCredentialBuilder()
.tenantId("<tenant-id>")
.clientId("<client-id>")
.pfxCertificate("<path-to-cert.pfx>", "<pfx-password>")
.build();
// Send certificate chain for SNI
ClientCertificateCredential credential = new ClientCertificateCredentialBuilder()
.tenantId("<tenant-id>")
.clientId("<client-id>")
.pemCertificate("<path-to-cert.pem>")
.sendCertificateChain(true)
.build();
Environment Credential
Reads credentials from environment variables.
import com.azure.identity.EnvironmentCredential;
import com.azure.identity.EnvironmentCredentialBuilder;
EnvironmentCredential credential = new EnvironmentCredentialBuilder().build();
…
अक्सर पूछे जाने वाले सवाल
Microsoft Entra ID (Azure AD) क्या है?
यह Microsoft की वह प्रणाली है जो तय करती है कि कौन किन resources को एक्सेस कर सकता है। इसे आप अपनी cloud services के लिए एक digital gatekeeper मान सकते हैं।
'DefaultAzureCredential' क्या है?
यह एक विकल्प है जो Azure से कई अलग-अलग तरीकों से जुड़ने की कोशिश करता है, जैसे आपके computer पर सेव credentials या environment की जानकारी। इससे इसे अलग-अलग स्थितियों में इस्तेमाल करना आसान हो जाता है।
क्या इसके लिए मुझे Azure का password जानना ज़रूरी है?
हमेशा नहीं। आपके setup के हिसाब से आपका प्रोग्राम अपनी पहचान बताने के दूसरे तरीके भी इस्तेमाल कर सकता है, जैसे Azure services पर managed identities, या आपके computer पर Azure CLI से किया गया login।
जानकारी
लेखक का मूल विवरण
Authenticate Java applications with Azure services using Microsoft Entra ID (Azure AD).
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #3935
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।