Skip to content

Commit 89b83e6

Browse files
committed
improve answer in readme
1 parent e05c56c commit 89b83e6

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,37 @@ func TestRedisConnection(t *testing.T) {
634634
A: The library handles token expiration automatically. Tokens are refreshed when they reach 70% of their lifetime (configurable via `ExpirationRefreshRatio`). You can customize this behavior using `TokenManagerOptions`.
635635

636636
### Q: What's the difference between managed identity types?
637-
A:
638-
- System Assigned: Automatically created and managed by Azure
639-
- User Assigned: Created and managed by you, can be shared across resources
640-
- Default Azure: Uses environment-based authentication, good for development
637+
A: There are three main types of managed identities in Azure:
638+
639+
1. **System Assigned Managed Identity**:
640+
- Automatically created and managed by Azure
641+
- Tied directly to a specific Azure resource (VM, App Service, etc.)
642+
- Cannot be shared between resources
643+
- Automatically deleted when the resource is deleted
644+
- Best for single-resource applications with dedicated identity
645+
646+
2. **User Assigned Managed Identity**:
647+
- Created and managed independently of resources
648+
- Can be assigned to multiple Azure resources
649+
- Has its own lifecycle independent of resources
650+
- Can be shared across multiple resources
651+
- Best for applications that need a shared identity or run across multiple resources
652+
653+
3. **Default Azure Identity**:
654+
- Uses environment-based authentication
655+
- Automatically tries multiple authentication methods in sequence:
656+
1. Environment variables
657+
2. Managed Identity
658+
3. Visual Studio Code
659+
4. Azure CLI
660+
5. Visual Studio
661+
- Best for development and testing environments
662+
- Provides flexibility during development without changing code
663+
664+
The choice between these types depends on your specific use case:
665+
- Use System Assigned for single-resource applications
666+
- Use User Assigned for shared identity scenarios
667+
- Use Default Azure Identity for development and testing
641668

642669
### Q: How do I handle connection failures?
643670
A: The library includes built-in retry mechanisms in the TokenManager. You can configure retry behavior using `RetryOptions`:

0 commit comments

Comments
 (0)