Posts

Showing posts from January, 2023

SpringBoot App CLI start up

Image
Run Spring Boot app using Maven Spring Boot provide the plugin with maven go to your project directory and run >> mvn spring-boot:run Run Spring Boot app with java -jar command >> java -jar target/app-0.0.1-SNAPSHOT.jar Run Spring Boot App with Gradle >> gradle bootRun  Spring Cloud architecture   API gateway A gateway can take care of securing and routing messages, hiding services, throttling load, and many other useful things. Spring Cloud Gateway gives control of API layer, integrating Spring Cloud service discovery and client-side load-balancing solutions to simplify configuration and maintenance. Service Registry A service registry is a database used to keep track of the available instances of each microservice in an application. The service registry needs to be updated each time a new service comes online and whenever a service is taken offline or becomes unavailable. Spring Bean Scopes singleton - only one instance of the spring bean will be created fo...

Authentication Authorization

User knows credentials User have keys, tokens. User is with finger prints, facial identity  Authentication : process to verify the user identify / who you are 0) LDAP Server 1) Identity Provider 2) OAuth Server 3) OpenID Connect Authorization : process to user access to resource / what you can do SSO - Time based Token SAML - Access Token OAUTH -  Access Token (less time based), Refresh Token (longer time based), Bearer Token OIDC - ID Token, Access Token MFA - User knows + User Have +User is Token - ( Header + Data(Hashing Mechanism) + Digital Signature )

Ways to add Servlet Filters in Spring Boot

  Adding filters through OncePerRequestFilter bean Using @Component to make Spring Boot detect filter classes Registering Filters using  FilterRegistrationBean  for a specific path Using the @WebFilter and @ServletComponentScan annotations