Spring Boot: Dockerization
- Oauth
- https://speakerdeck.com/championswimmer/authentication-done-right-consuming-and-serving-oauth2-dot-0?slide=21
- Identification -> Identifying the request uniquely(saying I am Venkat)
- Authentication -> registered identity(Proving with ID card)
- Authorization -> permission to resources(giving car key to another person)
- HTTP error
- 401 -> not authenticated
- 403 -> authenticated but NOT authorized
- Authentication via Authorization
- Services that don't save password. Rather it accepts/saves only phone and sends OTP. Service/app is authorized to read sms/email. Given I am authorized to read sms/email which indirect way of authentication.
- Single signon
- First party sso
- Google sites with google authenticator
- Third party sso
- Spotify using google authenticator
- Oauth
- client/apps sends request to github(oauth provider) with client id & request uri
- oauth provider shows UI to end user to provide login page
- user authenticates & accepts the authorization confirmation
- Implicit Flow(bit insecure)-> 2 legged flow
- Oauth provider redirects with auth_token
- apps frontend sends the auth_token and gets required resources from Server
- Explicit Flow -> 3 legged flow
- Oauth provider redirects with grant_code
- apps backend exchanges grant_code with auth_token(ip address is whitelisted for server alone for security/safety)
- app sends the auth_token and gets required resources from Server
- Virtual machines
- Physical hardware break into multiple virtual machines
- They need dedicated amount of OS, RAM and storage
- Kernel features that support Containers
- namespace provides process isolation & resource allocation
- c group is responsible for storage and memory
- Docker cli interacts with docker daemon which inturn interacts with containerd
- containerd is reponsible for name space and c group
- shim is responsible for interaction logic with containers
- It detaches container lifecycle with containerd
- Dockerfile
- FROM open-jdk:19-alpine
COPY /target/xyz.jar /app.jar
CMD ["java","run","/app.jar"]
- docker build -t bootdocker:1 .
- docker images
Comments
Post a Comment