Codemaxxers / Issues

0 stars 0 forks source link

CSA Deployment Q/A #25

Closed lunaiwa closed 9 months ago

lunaiwa commented 9 months ago

https://quizlet.com/846745588/csa-deployment-pop-quiz-flash-cards/?new

https://rift24.github.io/RIFT-Frontend/2024/01/30/deployment_IPYNB_2_.html#accessing-aws-instances

1. Show JWT signup and/or login process

https://nighthawkcoders.github.io/teacher_portfolio//c7.0/2023/11/27/jwt-java-spring.html

https://blog.logrocket.com/jwt-authentication-best-practices/#:~:text=with%20their%20credentials.-,The%20server%20authenticates%20the%20user%2C%20often%20by%20checking%20the%20entered,the%20client%20includes%20the%20JWT.

https://nighthawkcoders.github.io/teacher_portfolio//2023/12/19/P3_student_JWT_IPYNB_2_.html

2. Explain a POJO and changes to a POJO

"Plain Old Java Object" - Java class that adheres to a set of conventions to keep its structure simple. It does not extend or implement specialized classes or interfaces, making it a plain and standard Java object.

Characteristics > Having private fields, a public no-argument constructor, getter and setter methods for its fields, and possibly additional business logic methods.

Changes > Adding, modifying, or removing fields, as well as updating methods to reflect the new structure or behavior. It's important to ensure that the changes are backward-compatible if the POJO is used in a serialized or persisted form.

3. Explain security configuration rules that are required for access

Security configuration rules are necessary to control access to resources and protect sensitive information.

Rules/Example > Authentication mechanisms (e.g., username/password, OAuth), authorization rules (defining who can access what), encryption of sensitive data, and secure communication protocols (HTTPS).

Access control lists (ACLs) and role-based access control (RBAC) are often used to enforce security policies. Regularly updating and monitoring these rules is crucial to maintain a secure system.

4. Describe docker and process for update docker application

A platform that enables developers to automate the deployment of applications inside lightweight, portable containers.

  1. Pull the latest version of the Docker image from the container registry.
  2. Stop the running container(s) of the old version. (docker-compose down)
  3. Remove the old container(s) if necessary.
  4. Run a new container with the updated image, using the appropriate configurations. (docker-compose up -d)
  5. Ensure any necessary data or configurations are migrated or applied.

5. Describe route 53 and process for domain setup

Scalable domain name system (DNS) web service provided by AWS.

  1. Create a hosted zone for your domain.
  2. Update the domain's DNS records with the provided name servers.
  3. Configure the necessary DNS records such as A (IPv4 address), CNAME (canonical name), MX (mail exchange), etc.
  4. Optionally, set up routing policies, health checks, and other advanced features based on your requirements.

6. Show API access code and error handling, specifically redirect on 403

HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will not fulfill it, if it was correct.

401 example

7. Describe managing CORS policies through Nginx and Java

Cross-Origin Resource Sharing is a security feature implemented by web browsers to control requests made across different domains.

You can manage CORS by configuring the add_header directive to include the appropriate CORS headers in responses. Example headers include Access-Control-Allow-Origin and Access-Control-Allow-Methods.

In Java, you can handle CORS at the application level by annotating specific methods or controllers with @CrossOrigin or by implementing a Filter to intercept and modify HTTP responses.

8. Describe reverse proxy of server_name to proxy_pass

  1. Nginx can be used as a reverse proxy to forward client requests to backend servers.
  2. The server_name directive in Nginx specifies the domain name associated with a server block.
  3. proxy_pass is used to define the backend server's address where requests should be forwarded.

server { listen 80; server_name example.com; location / { proxy_pass http://backend-server; Additional proxy settings can be configured here } }

rachit-j commented 9 months ago

Done