Posts

Showing posts from May, 2025

Authentication in microservices

 Authentication in microservices SSO - Single Sign On is a authentication mechanism that used by websites or applications to make authentication process easier. When you click SSO button available in the website it, first redirect you to the identity provider's website where you have to login and Identity Provider will redirect you to the actual website you wanted to login at first place. SSO can be implemented via OpenID, Kerberos, SAML etc. Basic Authentication - This is one of the simplest authentication mechanism to implement. User just need to combine client_id and secret like this :  client_id:secret.  and then encode it base64 then send it in the Authentication header. mTLS - mutual TLS allows microservices communicate securely without dealing with security tokens etc.  OAuth2 - (Authorization protocol for example let service to access your google data.) Can be implemented for service to service (server to server) communication as well. Client needs to have c...

Applications of encryption in modern systems

 Asymmetric encryption applications By nature asymmetric encryption allowed us to sign and verify information easily. Here are some application areas and we will deep dive into some complicated questions.  JWT  HTTPs Json Web Tokens by nature considered secure authentication tokens. Its simple and effective implementation allowed developers to sign and verify tokens easily. JWT consists of 3 parts - header, payload and signature. header - contains all the signing algorithm related information mostly (such as which algorithm used, token type etc.) payload - contains information developer wants to store in the token. These information should not be long and private but rather user specific values (such as session id, user id, expire date etc.). signature - This part is the most important part of JWT which used to verify the token itself.  Signature formed by header and payload values namely :  SHA256( Base64(header) + "." + Base64(payload) + SECRET ) Output of ...