rachit-j / Rackets-Blog

https://rachit-j.github.io/Rackets-Blog/
MIT License
1 stars 2 forks source link

CSA Pop Quiz Jan 30 #4

Open rachit-j opened 8 months ago

rachit-j commented 8 months ago

CSA Pop Quiz Jan 30

Final Score: 0.9 + 0.9 + 0.95 + 0.95 = 3.7 Questions: 2, 3, 4, 5

rachit-j commented 8 months ago
  1. Reverse proxy: server_name and proxy_pass. Describe the server_name definition and the proxy_pass definition in your reverse proxy configuration file

The server_name is the route53 name that comes from your request. It is the point which route53 DNS points to the server definition. From there, proxy_pass forwards all the information to the dedicated docker port. It is sort of like an adapter in which the request, or power, is forwarded to the connected device.

image

Taken from our lesson from the part I wrote

image

Taken from live deployment

Score: 0.9

rachit-j commented 8 months ago
  1. Show JWT login process, split the browser screen and show after the login screen that goes to authentication and produces a cookie, show in jwt.io
image

Redirect

image

JWT token

image

Decoded Token

Code:

image image image

Score: 0.9

rachit-j commented 8 months ago
  1. Explain security configuration rules that are required for access in your spring boot project. Request matcher that shows permit and authentications
image

We need to authorize the .authenticated() endpoints because they have significant value in the fact that we do not want anyone to access them. Otherwise, we allow everyone access to the sites in which no authentication should be needed.

Score: 0.9

rachit-j commented 8 months ago
  1. Explain a POJO and show your changes to a POJO. Show in Vscode editor, show something you have changed. Show via postman

POJO: Plain old java object. Acts as a template so that instances can be created that use the same structure.

image

POJO in code, fetches data from database

image

POJO through postman testing: the response has similar structure with different data

Score: 0.95

rachit-j commented 8 months ago
  1. Describe the docker process for updating a docker application. Show the sequences of commands

Docker update script written:

image

Can also be viewed on my section of the deployment lesson.

We first pull down docker, pull the latest version, clean dependencies so they can reinstall if they are updated, and then reactivate the container.

Docker port checking command: docker ps

image

Score: 0.95