Skip to main content

Posts

Showing posts from July, 2020

AZ-204 KeyVault

Rather than storing credentials in the application, we can use Azure keyvault to store user secrets. We can also use it to store  1. secret , application that stores the secrets in files can be at risk if someone gets a peek at the source code. KV happens at runtime. 2. keys (for encryption/decryption)  3. certificates (SSL certificates) 4. Storage accounts have access keys and KV can be used to manage them. 5. Azure VM disks encryption. We can encrypt the data stored on VMS using azure disk encryption. 6. In AKS  DATA PROTECTION  An Azure app service app can use certificates stored in KV to encrypt the data (in transit) or it can be used to encrypt the data stored in a database (in rest)  Access control should follow the principle of least privilege. Add new Resource => Keyvault Create a Keyvault Using Keyvault when using azure AD NUGETS:  Azure.Identity and Azure.Security.KeyVault.Secrets _______________________________________________________________...

AZ-204 Azure Redis Cache

Why should we cache? 1. Because we dont want to hit the database everytime. 2. Caches store data in memory, so its faster to query them. 3. Caches use a key value pair to store data rather than any complex data structure , So the time complexity is less. 4. Also it improves availability , as if the backend in unavailable we can still get the data from the cache. Not all of it but the most frequently used ones. So its important to make sure that we are caching the right data. Azure Cache 1. Geo Replication: The main copy remains writable whereas the other copies are maintained as readable. So not only is the data available in a new region but also available in case the primary cache is down. In such a scenario the secondary instance becomes writable. DATA Types NUGET Microsoft.Extensions.Caching.StackExchangeRedis -- allows more data types and operations  services.AddStackExchangeRedisCache(op => {                 op.Configuration = "Conn...