You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

1 Días
13 Hrs
15 Min
30 Seg

Diseño de un servicio que integre autenticación

23/25
Resources

What is the objective of the second challenge of this course?

The second challenge of the course focuses on the creation of a completely isolated authentication service. This challenge arises after the design and implementation of the reading service. The main objective is to abstract the authentication process as a separate service to enable system and business scalability. It is critical that participants develop a design document detailing the implementation of this service and how it should operate efficiently.

Why should the authentication service be separated?

Separating the authentication service is crucial for a number of strategic and scalability reasons:

  • One Service, Multiple Usages: A separate authentication service allows you to verify whether a user is authorized to perform certain actions, such as uploading reviews, efficiently without replicating code across different services.

  • Business scalability: By separating services, the business can grow and adapt to new needs such as offering exclusive reviews to registered users or rewarding users with special access.

  • Simplified maintenance: Having a single place to manage and update the authentication process reduces errors and facilitates the implementation of future changes.

How would the authentication service be integrated into existing systems?

Integrating a standalone authentication service is an excellent way to modernize and make a system more robust. A general way to achieve this integration is described below:

  1. External authentication request: Upon receiving a request in the system, either through an Azure Function or Lambda Function, this can bind to the authentication service to verify the validity of the user.

  2. User verification: The service will evaluate the token or credential provided and return a positive or negative authentication response.

  3. Response-Based Action Flow: If the user is authenticated, the system will proceed; otherwise, it will block actions such as posting reviews.

  4. Future-proofing: The service allows to adapt to potential business changes, such as offering premium content under certain access conditions.

What are the benefits of abstracting authentication into a separate service?

Abstracting the authentication service provides multiple benefits from both a technical and business perspective, including:

  • Ease of Scalability: Systems can grow in line with the business, allowing the addition of functionality without major technical effort.

  • Error Reduction: Minimizes potential discrepancies or errors in authentication implementation by centralizing control in a single service.

  • Customization and Flexibility: Offers the opportunity to design systems that adapt to different types of users, allowing features such as access to exclusive content only to authenticated users.

This challenge not only invites participants to develop technical skills, but also to think strategically about system scalability and efficiency. It remains as a task to investigate tools and methodologies to implement this authentication system, with the certainty that this experience will be preparatory for future challenges in the industry.

Contributions 8

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

Adjunto Imagen, Paso explicar lo plasmado en imagen de Arquitectura con relación a Autentificación o Seguridad de Api Expuesto:

Para ello utilizare un servicio de AWS llamado Cognito, el cual nos facilita la seguridad de Api-s Mediante autentificación, en este caso realizare la autentifican de Api mediante Tokens, Este protejerá ambas Apis de Lectura y escritura.

Vale, en mi práctica lo plantee de esta forma:
.
El cliente tiene que autenticarse primero, es decir, tiene que solicitar un token al servidor de autenticación, una vez que tenga listo el token, deberá mandar ese token junto con su solicitud POST (me equivoqué en el diagrama y puse PUT jaja, prometo corregirlo), esta solicitud llegará a un Droplet de Digital Ocean que contendrá la parte de la lógica del API para insertar el dato en mongoDB mediante Node.
.
Como serán pocos usuarios los que harán POST, basta con un pequeño droplet en Digital Ocean, este servidor primero validará el token, para ello, hará una solicitud de verificación del token al servidor de autenticación. Este servidor dirá si el token es válido o no, y dependiendo de ello, el servidor dará una respuesta al cliente con su solicitud completada o rechazada.
.
Por último, el servidor de autenticación será manejado mediante Laravel Sanctum que es una dependencia de Laravel encargada de generarar tokens de autenticación y almacenarlos (básicamente el sistema de autenticación ya terminado)

Comparto mi aporte

Hola, que tal?
dejo un link de Drive que lleva a la carpeta de la tarea:
https://drive.google.com/drive/folders/1T_4hpEiuAvFCyhziCMMEYFSnSTPqoZA6?usp=sharing
Gracias, saludos!

Para quien le interese, hace un tiempo hice este boilerplate de react para hacer un login con AWS Cognito. Con esta clase, me acorde de ese repositorio que hice en el 2022 (el que guste puede hacerle fork y mejorarlo) <https://github.com/jlbousing/react-cognito-auth>
Buenas tardes, este es mi diagrama de arquitectura. En el centro de mi arquitectura tengo un proxy (traefik) este servicio se encarga de enrutar las peticiones a mis servicios En el backend tengo una API en el Framework laravel con un escalado horizontal balanceando la carga entre 4 microservicios Tengo un sistema de cache, para optimizar las peticiones de consulta Tengo 2 base de datos MongoDB - Para lectura PostgreSQL - Para escritura Sistema de caché Redis - Optimizacion de las consultas El front-end de mi arquitectura esta en Vuejs ![](https://static.platzi.com/media/user_upload/image-9f407ff5-6a1d-4397-a8bb-8f80aabacf0a.jpg)

Acá debería ser autorización. Puedes estar autenticado pero no tener autorización(roles)