Issue #12: State Surveillance, Passkeys, DOMParser
And 3, 2, 1… I’m back 🥳
Good morning lovely people! This is Abdu from “Software Summaries” now rebranded as “Just Enough” 🚀
After a long absence, I am finally back to posting again and with strong content and energy to share and spread the knowledge I learned during the week with you.
The past couple of months weren’t the nicest and gave me a different prospective towards life and priority re-ordering. There is going to be changes upcoming and I would like you all to be part of it!
Technical Summaries
5-eyes, 9-eyes, 14-eyes
With the rise of Far-right and weakened democracies, privacy is a becoming a concern for many people. Awareness is the first step to protect your privacy especially if you are doing things your state might not like.
The 5-eyes, 9-eyes and 14-eyes are intelligence alliances between countries to share intelligence information between them:
- 5-eyes: US, UK, Canada, Australia, New Zealand
- 9-eyes: 5-eyes + Denmark, France, Netherlands, Norway
- 14-eyes: 9-eyes + Germany, Belgium, Italy, Spain, Sweden
They share a wide range of intelligence information between them and they are known to spy on their citizens and other countries.
So if you are doing something that might be illegal (event activism work) in these countries, you might want to use a services (ex: Mail, Hosting, VPN, ...etc) that is not based in these countries.
Read More:
Passkeys
Passkeys are a new way to authenticate users without the need for passwords. It's a more secure and user-friendly method that uses public-key cryptography to verify the user's identity.
The passkey is generated by the user's device and it generates a public and private key pair. The public key is sent to the server, while the private key remains on the user's device. When the user wants to authenticate, the server sends a challenge to the user's device, which is signed with the private key. The server then verifies the signature using the public key and authenticates the user.
This approach eliminates the need for passwords, which are often weak and easily compromised. It also provides a more secure and user-friendly authentication method that is resistant to phishing attacks and other security threats.
Read more:
DOMParser
DOMParser
is used for converting strings into DOM elements aka. parsing HTML string into a structured document using the parseFromString
method and it will return a Document object which we can then use adoptNode
to transfer a node from one document to another or use cloneNode
to create a copy of a node within a document.
It’s similar to innerHTML
but it’s safer as it doesn’t run the JS Code inline of the string which allows also to do transformations before appendChild
it to the current Document.
// Create an HTML string
const htmlString = "<div><p>Hello, DOMParser!</p></div>";
// Create a new DOMParser
const parser = new DOMParser();
// Use the parseFromString method to parse the HTML string
const parsedDocument = parser.parseFromString(htmlString, "text/html");
// Get the first element from the parsed document
const parsedNode = parsedDocument.body.firstChild;
// Get the parent element in the current document where the parsed node will be appended
const parentElement = document.getElementById("parent");
// Adopt the parsed node to the current document
const adoptedNode = document.adoptNode(parsedNode);
// Append the adopted node to the parent element
parentElement.appendChild(adoptedNode);
Read more: