From cfda57ac61b36c4e9a99845d8ef57fb93fd59638 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Sun, 19 Jan 2020 22:54:25 +0000 Subject: [PATCH 01/11] Added Answers to DNS and Security Questions --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index cc0d44e..93db462 100644 --- a/README.md +++ b/README.md @@ -5554,6 +5554,11 @@ This allows Elasticsearch to scale to an entire cluster of servers.
Explain Replicas
+ +In a network/cloud environment where failures can be expected any time, it is very useful and highly recommended to have a failover mechanism in case a shard/node somehow goes offline or disappears for whatever reason. +To this end, Elasticsearch allows you to make one or more copies of your index’s shards into what are called replica shards, or replicas for short. + +
@@ -5675,6 +5680,10 @@ In general the process is as follows:
What is a A record?
+ + +A (Address) Maps a host name to an IP address. When a computer has multiple adapter cards and IP addresses, it should have multiple address records. +
@@ -5689,6 +5698,8 @@ While an A record points a domain name to an IP address, a PTR record does the o
What is a MX record?
+MX (Mail Exchange) Specifies a mail exchange server for the domain, which allows mail to be delivered to the correct mail servers in the domain. +
From b9e22a6bbb0b95e3dd265012cd93889c893c8275 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 20:01:23 +0000 Subject: [PATCH 02/11] Python Question: Lambda --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 93db462..5e33ed5 100644 --- a/README.md +++ b/README.md @@ -3246,6 +3246,16 @@ Generally, every compiling process have a two steps.
What is Lambda? How is it used?
+ +Lambda is an anonymous function is known as a lambda function. This function can have any number of parameters but, can have just one statement. + +Example: +``` +1 a = lambda x,y : x+y +2 print(a(5, 6)) +Output: 11 +``` +
#### Properties From 570a64a74acc01a998b0b88c7e274930afc43204 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 20:41:05 +0000 Subject: [PATCH 03/11] SSO + MFA + RBAC --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 5e33ed5..3dac2f7 100644 --- a/README.md +++ b/README.md @@ -5220,14 +5220,28 @@ Authorization is the process of identifying what level of access the service or
Explain what is Single Sign-On
+ +SSO (Single Sign-on), is a method of access control that enables a user to log in once and gain access to the resources of multiple software systems without being prompted to log in again. + +
Explain MFA (Multi-Factor Authentication)
+ +Multi-Factor Authentication (Also known as 2FA). Allows the user to present two pieces of evidence, credentials, when logging into an account. + +- The credentials fall into any of these three categories: something you know (like a password or PIN), something you have (like a smart card), or something you are (like your fingerprint). Credentials must come from two different categories to enhance security. +
Explain RBAC (Role-based Access Control)
+ +Access control based on user roles (i.e., a collection of access authorizations a user receives based on an explicit or implicit assumption of a given role). Role permissions may be inherited through a role hierarchy and typically reflect the permissions needed to perform defined functions within an organization. A given role may apply to a single individual or to several individuals. + +- RBAC mapped to job function, assumes that a person will take on different roles, overtime, within an organization and different responsibilities in relation to IT systems. +
From 3b0c955925e24302037c7e351a1241cadf62191e Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 20:43:26 +0000 Subject: [PATCH 04/11] Delete Duplicate of RBAC Question --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 3dac2f7..52f931b 100644 --- a/README.md +++ b/README.md @@ -5252,9 +5252,6 @@ Access control based on user roles (i.e., a collection of access authorizations Explain Asymmetric encryption
-
-Explain RBAC (Role-based Access Control)
-
Explain the following: From 26da34b786cabe79d08143f2b8f15948dff6941b Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 20:48:44 +0000 Subject: [PATCH 05/11] Asymmetric and Symmetric encryption --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 52f931b..7154137 100644 --- a/README.md +++ b/README.md @@ -5246,10 +5246,16 @@ Access control based on user roles (i.e., a collection of access authorizations
Explain Symmetric encryption
+ +A symmetric encryption is any technique where the same key is used to both encrypt and decrypt the data. +
Explain Asymmetric encryption
+ +A asymmetric encryption is any technique where the there is two different keys that are used for encryption and decryption, these keys are known as public key and private key. +
From 1e006671d91c9ef7fd514ca8573dc8d621060643 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 21:37:51 +0000 Subject: [PATCH 06/11] ANSWERED: What are the advantages of MongoDB? --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7154137..684a45e 100644 --- a/README.md +++ b/README.md @@ -4606,6 +4606,13 @@ func main() {
What are the advantages of MongoDB? Or in other words, why choosing MongoDB and not other implementation of NoSQL?
+ +MongoDB advantages are as followings: +- Schemaless +- Easy to scale-out +- No complex joins +- Structure of a single object is clear +
From 72ded52b76b21b85eedce12828fb2b416e0169c9 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 21:42:42 +0000 Subject: [PATCH 07/11] ANSWERED: What this line in scripts mean? #!/bin/bash --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 684a45e..b006ee0 100644 --- a/README.md +++ b/README.md @@ -4698,10 +4698,19 @@ as key-value pair, document-oriented, etc.
Tell me about your experience with shell scripting
+
What this line in scripts mean?: #!/bin/bash
+ + +`#!/bin/bash` is She-bang + +/bin/bash is the most common shell used as default shell for user login of the linux system. The shell’s name is an acronym for Bourne-again shell. Bash can execute the vast majority of scripts and thus is widely used because it has more features, is well developed and better syntax. + + +
From accce12933b80f23f0ea9b939cf8f89a4dfc7e8b Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 21:46:27 +0000 Subject: [PATCH 08/11] ANSWERED: Write a script to determine whether a host is up or down --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index b006ee0..830ffc5 100644 --- a/README.md +++ b/README.md @@ -4799,6 +4799,20 @@ Using the keyword read so for example read x will wait
Write a script to determine whether a host is up or down
+ +``` +#!/bin/bash +SERVERIP= +NOTIFYEMAIL=test@example.com + +ping -c 3 $SERVERIP > /dev/null 2>&1 +if [ $? -ne 0 ] +then + # Use mailer here: + mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null +fi +``` +
From 6c4f32af1b023b34d9b2ff7a7113b88714c554d5 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 21:48:34 +0000 Subject: [PATCH 09/11] ANSWERED: Write a script to remove all the empty files in a given dir. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 830ffc5..1f2cc2f 100644 --- a/README.md +++ b/README.md @@ -4800,6 +4800,7 @@ Using the keyword read so for example read x will wait
Write a script to determine whether a host is up or down
+**EXAMPLE ONE** ``` #!/bin/bash SERVERIP= @@ -4817,6 +4818,21 @@ fi
Write a script to remove all the empty files in a given directory (also nested directories)
+ +**EXAMPLE ONE** +``` +#! /bin/bash +for x in * +do + if [ -s $x ] + then + continue + else + rm -rf $x + fi +done +``` +
From 1af924ba87fdeff96579b9681d447578664b04e9 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 21:57:43 +0000 Subject: [PATCH 10/11] ANSWERED: Explain availability sets and availability zones --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1f2cc2f..15cce20 100644 --- a/README.md +++ b/README.md @@ -5061,6 +5061,10 @@ the pseudo table to retrieve the sum of the prices spent by each customer, then
Explain availability sets and availability zones
+ +An availability set is a logical grouping of VMs that allows Azure to understand how your application is built to provide redundancy and availability. It is recommended that two or more VMs are created within an availability set to provide for a highly available application and to meet the 99.95% Azure SLA. + +
From db533c891ea331fab2e2df17819f9528f8f80925 Mon Sep 17 00:00:00 2001 From: Austin Songer Date: Tue, 21 Jan 2020 22:03:20 +0000 Subject: [PATCH 11/11] ANSWERED: Explain HTTP Header Injection. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 15cce20..53820e5 100644 --- a/README.md +++ b/README.md @@ -5427,6 +5427,9 @@ You can use OWASP ZAP to analyze a "request", and if it appears that there no pr
Explain HTTP Header Injection vulnerability
+ +HTTP Header Injection vulnerabilities occur when user input is insecurely included within server responses headers. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response. +