Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

Secure Coding and Design

Puntuación
-
Vendido
-
Páginas
48
Grado
A+
Subido en
26-07-2024
Escrito en
2023/2024

Secure Coding and Design You need to design your system to minimize the paths to get to data, keeping only the paths that are needed. As the number of paths to your data increases, your attack surface increases. You also need to separate your data from your code. People have been putting all their code and data in one common schema for more than 30 years now, which is a problem. Additionally, a common problem is when application servers connect to the database as the schema owner. Your secure design and coding practices should always separate data from code and use the PL/SQL features that enforce secure access paths to the data. In 1988, Oracle made PL/SQL available in Oracle version 6. Yes, some of us still remember using the first version of PL/SQL. In 1992, Oracle provided the ability to create stored PL/SQL procedures and triggers in Oracle version 7. The problem is, many people are still designing database systems like it was 1992. The designs we see in our day-to-day work typically fall under one of three paradigms, all of which have some security concerns. 198 Problematic Designs Figure 6-1 is by far the most common design paradigm and problem we see in our work. The data and PL/SQL code coexists in one schema, and the user is granted execute privileges on the PL/SQL, along with select, update, insert, and delete privileges on data objects. By default, when you create a procedure, package, or function, it is created with definer’s rights, meaning the code executes with the same privileges as the schema it resides in. Because the code resides in the same schema as the tables, the code has full access to all the data in the schema. Do you see the problem here? All it takes is one SQL injection bug, and the bad guy owns your database. Data and Code User Figure 6-1. All data and code are stored in a common database schema Figure 6-2 shows the next most common design paradigm and problem that we see in our work. The data is stored in the database, and all the application code including SQL Data Manipulation Language (DML) and Data Definition Language (DML) resides outside of the database in Java, PHP, or Python. The application server connects to the database as the schema owner, so the user does not need to be granted access to the underlying data objects. Again, all it takes is one SQL injection bug, and the bad guy owns your databases. Another problem with this configuration is that the security of the application is left up to the application code. Chapter 6 SeCure Coding and deSign 199 As we all know, code has bugs, and this configuration does not leverage the security mechanisms built into the database. In addition, this configuration increases the size of the attack surface. The SQL code that is stored in the application code is frequently generated using frameworks that do not optimize the amount of data that is transmitted over the network. USER Data App Server. Business Logic Figure 6-2. All application logic including DDL and DML is stored outside the database Figure 6-3 shows another common problem we see. Data and code are stored in a database schema, and some SQL is stored outside of the database in Java, PHP, or Python. The SQL is either generated by a framework or handwritten into the code. This configuration has a few problems with it. Let’s start with SQL that is generated by a framework. You will suffer performance issues, because the SQL generated by the framework will cause excessive network traffic, and you’ll likely also be dealing with the SQL having to recompile every time it sends a request to the database. These are two big performance issues. Then we’re back to the SQL injection issue; if the bad guy finds a SQL injection bug, he owns your database. Because there is more network traffic than required, the attack surface has been increased. Chapter 6 SeCure Coding and deSign 200 Improved Design Now we’ll discuss what we need to do to implement a trusted path to the data. The first thing we need to do is separate the data and PL/SQL code into different schemas. Your business logic code calls the API that performs the required DML. This is all done inside the database, minimizing network round-trips and thereby reducing the attack surface and improving application performance. In Figure 6-4 we’ve separated the code from the data, executed the code using code-based access control (CBAC), and granted roles to the code. By doing these simple steps, if we have a SQL injection bug in one API, we’re not exposing all of the data to the bad guys. This reduces the attack surface quite a bit. Additional advantages of this design paradigm are improved performance and ease of maintenance.

Mostrar más Leer menos
Institución
Coding And Design
Grado
Coding and Design











Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Coding and Design
Grado
Coding and Design

Información del documento

Subido en
26 de julio de 2024
Número de páginas
48
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$12.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GlobalExamArchive Acupuncture & Integrative Medicine College, Berkeley
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
110
Miembro desde
3 año
Número de seguidores
33
Documentos
1516
Última venta
1 semana hace
GlobalExamArchive – International Study Resources

GlobalExamArchive is an international academic resource platform dedicated to providing original, well-organized study materials for students across diverse disciplines. Our archive includes carefully prepared test banks, solution manuals, revision notes, and exam-focused resources designed to support effective learning and confident exam preparation. All materials are developed independently with a focus on clarity, academic integrity, and relevance to modern curricula, serving students from institutions worldwide.

Lee mas Leer menos
3.6

20 reseñas

5
9
4
2
3
3
2
3
1
3

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes