Toby-Leeder / CSABlog

MIT License
0 stars 0 forks source link

1/30 Quiz #1

Open Toby-Leeder opened 9 months ago

Toby-Leeder commented 9 months ago

I got a 0.9/1 for all 5 of them, so in total I got a 3.6/4.

Toby-Leeder commented 9 months ago

0.9/1 Reverse Proxy: In Reverse Proxy there is something called a server_name and a proxy pass, describe the server_name definition and the proxy pass definition in your reverse proxy configuration file.

Within our reverse proxy, there are two main parts: the server_name and the proxy pass. The server_name is essentially the name of our dns server. This is how the reverse proxy is able to intercept our request on the internet, by looking for requests to this server name and redirecting it to our proxy pass. The proxy pass essentially redirects a request from our server name, to the local instance of the backend running on our cloud computer. This is what allows us to create requests to a dns and get a response from our instance running locally.

server {
   listen 80;
    listen [::]:80;
    server_name jcc.stu.nighthawkcodingsociety.com; # CHANGE SERVER NAME TO YOUR REGISTERED DOMAIN
    location / {
        proxy_pass http://localhost:8911; # CHANGE PORT TO YOUR UNIQUE PORT
        # Simple requests
        if ($request_method ~* "(GET|POST|PUT|DELETE)") { # Customize Request methods based on your needs
                add_header "Access-Control-Allow-Origin"  *;
        }
        # Preflighted requests
        if ($request_method = OPTIONS ) {
                add_header "Access-Control-Allow-Origin"  *;
                add_header "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, OPTIONS, HEAD"; # Make sure the request methods above match here
                add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
                return 200;
        }
    }
}
Screen Shot 2024-01-30 at 11 26 23 AM
Toby-Leeder commented 9 months ago

0.9/1.0 Show a JWT login process, split the browser screen and show after the login that you go to a page that requires authentication and that it produces a cookie and put the jwt to jwt.io.

Screen Shot 2024-01-30 at 11 42 17 AM Screen Shot 2024-01-30 at 11 42 30 AM
Toby-Leeder commented 9 months ago

0.9/1.0 Explain Security Configuration Rules that are required for access in your spring boot project. Provide a request matcher that shows a permit and a request matcher that shows authentication required.

Screen Shot 2024-01-30 at 11 49 00 AM
Toby-Leeder commented 9 months ago

0.9/1.0 Describe the docker process for update of the docker application. Show the sequence of commands required to do an application update. And show the port.

Screen Shot 2024-01-30 at 12 16 37 PM
Toby-Leeder commented 9 months ago

0.9/1.0 Explain a POJO and changes to a POJO. Show a POJO in the Vscode editor, highlight something you changed, show the pojo result in data via postman.

Screen Shot 2024-01-30 at 12 17 43 PM Screen Shot 2024-01-30 at 12 18 00 PM