Securing #microservices using #apigateway | #authentication & #authorisation in #microservices

preview_player
Показать описание
Your queries:-

Authentication & Authorisation in Microservices
authentication and authorization in spring boot microservices
token security microservices
token security pattern microservices
token security authentication
jwt token security
microservices security
microservices security using jwt authentication gateway
microservices security spring boot
microservices security architecture
microservices security with oauth2
microservices security patterns
Authentication in microservices

Authentication & Authorisation Microservices,securing microservices using api gateway, authentication and authorization in spring boot microservices,token security microservices,token security pattern microservices,token security authentication,jwt token security,microservices security,microservices security using jwt authentication gateway,microservices security spring boot,microservices security architecture,microservices security with oauth2,microservices security patterns,microservices security interview questions,Api gateway microservices security.
It’s very critical to provide authentication and authorization security to the microservices apps, when they communicate with each other. Mostly, microservices are exposed as REST APIs in distributed environments. REST APIs are stateless. It’s challenging to maintain client sessions with backend REST APIs. A strong API security mechanism is required to communicate between consumer and producer microservices. This API token security pattern provides a better Authentication & Authorization (A&A) service and maintains a session between client and backend REST APIs. For example, web/mobile clients connect to the API gateway first, which is a single point of entry of backend REST API microservices. The following diagram depicts how to get the API token by passing the access token to the authorization server which could be JWT/OAuth and get the API token to access backend APIs. Web/mobile clients will add this API token to the REST request call in the form of an HTTP request header and pass it to other backend services after A&A:
There are multiple open source and enterprise solutions to implement the API token security. OAuth and JavaScript Web Token (JWT) are popular, which create encrypted tokens and encrypt other information like user details, roles, and other key-value pairs. There is a provision to also add the expiry time of the API token. This token is generated by the server-side A&A service on demand. It can be added to a client’s service REST API header during the inter-microservice communication. This token is authenticated and validated for the expiry time on every request and then authorized to connect to backend business services and databases. So, with a design pattern, only authorized services can be granted access to microservices APIs. The API gateway is a recommended way to expose all backend microservices to client services like mobile, web, and other clients. It provides a single point of entry to the backend APIs. It uses this API access token internally to get access. It internally integrates with the access token API. Advantages The advantages are as follows: Secures inter-communication between microservices. Provides secure and strong encrypted authorization. Also provides user roles, which can be checked and accessed at the backend authorization service. Tokens can be encrypted with a strong encryption algorithm and expiry time.
Access token can be also created to access a new security token, if it’s expired. Use cases The use cases are as follows: User login authentication. User role authorization like admin, read only access, and so on. Use the API gateway with microservices.

What to expect: (0:00)
Why is it required? Problem and Solution!: (0:11)
Where is Token Security Pattern deployed? API Gateway: (1:50)
Basic Authentication Flow: (2:18)
When two Microservices are involved: (3:58)
Thank You: (5:43)
Рекомендации по теме
Комментарии
Автор

Your Authorization Server is acting as a session manager, which is how it was done in the old applications. In modern microservices architecture, the clients get a JWT from the Authentication Server, which may also authorize the user on some permissions. The JWT is then passed on to the resource services, which internally only verifies if the token is valid and not expired. The resource services do not go to any other service for authorization. Yeah, for revoked tokens, the resource services may maintain a small cache of revoked tokens that will be expired in a while.

esafzay
Автор

Best youtube channel for java developers

arnabchowdhury
Автор

Really greatful to watch ur videos, why the architecture of securing is like that is cleared firstly with ur key points. thanku so much sir ji :)

deepa
Автор

Really very good explanation, easy to understand

devireddyfavreddy
Автор

baji or video banao ...we need video like this keep going

showteeth
Автор

Hi Can you provide resources on microservices authentication and authorization?

nadigatlapraveen
Автор

Sasriyakaal Sir ji,
We have 2 microservices(rest API) ex- Product and Customer, registered with Eureka API Gateway.
Anyone can access these 2 services through only API Gateway.
Noone can access directly like localhost:8081/product
What steps should I follow, So that these services can access only through API gateway only.

parmodprajapati
Автор

3:40, why customer service has to call auth server to confirm the token is valid? if it is a signed token, based on the roles and claims it can trust the access token right?

yesubabu
Автор

I think the gateway should be taking care of authorization instead of delegating that task to each called service. This can be achieved through security config filters, once authorized, the request would be passed to tge concerned service by gateway.

vazzdoin
Автор

Does this apply to Rabit MQ-based console background services?

carlandres
Автор

if the token is stolen by the hacker and he mock the request with same token he can getthe response right? How we avoid that

cookiestechies
Автор

How you will handle permissions checking for each microservice ?
Assuming, each microservice has own access permissions and of course, that will not included into token.
Let's explain :)

davida.
Автор

Why will resources service go to Authorization server for validation. This is not in the flow i suppose. You must be clear in this regard sir ji. Kindly clear this in the video. You Jwt flow video of 1minute is not matching with this Authorization flow video.

mohammadwazir
Автор

nice explanation .. make coding video

nikhil
Автор

Sir, is Any source code available for this. Pls🙏

gopinathr
Автор

I think this tutorial is kind ambiguous and misleading.

md.mahfuzurrahman
visit shbcf.ru