Skip to content

Instantly share code, notes, and snippets.

View melvincarvalho's full-sized avatar
💭
I may be slow to respond.

Melvin Carvalho melvincarvalho

💭
I may be slow to respond.
View GitHub Profile
@melvincarvalho
melvincarvalho / solidauth.md
Last active February 9, 2016 00:25
Solid Auth

What I think would be helpful would be a table of auth mechanisms, something like:

This table should be used as a rough guide, not as black and white

Name URI used Verification Required Implemented
WebID TLS WebID TLS Y Y
Cookie implied Shared Secret Y Y
WebID RSA WebID Web Crypto API N Y
HTTP Signatures Public Key Web Crypto API N N
@melvincarvalho
melvincarvalho / solidcookies.md
Last active March 18, 2016 07:51
Solid Cookies

Solid Cookies (aka WebID Tokens)

Introduction

  • Solid cookies are a web analogy to browser cookies, which are shared information between a browser and an origin (web site), often used to authenticate or store state information.

  • Instead of storing the cookie in your browser, you store it in a trusted and location that only the origin and the user have access to.

  • In this way the origin can have confidence that the user of the browser, is verified as the webid, because they have shown that they have permission to write to that space.

@melvincarvalho
melvincarvalho / solidauth.md
Created February 9, 2016 01:20 — forked from sandhawke/solidauth.md
Solid Auth

Scenario: Alice, using her browser, wants to access resources on server bob.example, authenticating herself as the owner of server alice.example (or a specific resource on it)

Original answer: use WebID-TLS. But support in the browser has issues, so what are some alternatives?

Basic Approaches

  1. Proxy-TLS: Alice talks to her pod, while her pod uses WebID-TLS to talk to bob.example. Her secret key remains on her pod.
  2. Digital Signatures: Alice signs her request to bob.example using a (non-TLS) private key; bob verifies with public key obtained from alice.example
  3. Token Confirmation: A secret bearer token passes through all three parties, confirming to bob.example that the client controls alice.example
@melvincarvalho
melvincarvalho / solidcontext.js
Created February 13, 2016 22:46
solid context
// These pass a context object which hold various RDF symbols
// as they becaome availale
//
// me RDF symbol for the users' webid
// publicProfile The user's public pofile, iff loaded
// preferencesFile The user's personal preferences file, iff loaded
// index.public The user's public type index file
// index.private The user's private type index file
// noun A string in english for the tpe of thing -- like "address book"
// instance An array of nodes which are existing instances
ok last ill ever say on star wars : George Lucas largely based star wars on the Hero with a Thousand Faces which was essentially Joseph Campbell's explanation as a school teacher of his Skeleton's key to FInnegans Wake. The whole premise about what happens when 'technology' goes wrong -- you get a rebel system which is the way that technology corrects itself, a cycle (called the hero's cycle of which luke was the hero). Technology here is a very loose term and is referenced in the form of 10 'thunders' each of which changed human kind. One of those 'technologies' is actually clothing (another is the web). The role of clothing and uniform plays an important role in the rebel cycle of star wars, the storm troopers are seen as linear, square, formulaic, dogmatic -- a broken machine -- like hierarchical systems. The jedi are spontaneous, creative, non linear, they represent humanity and it's struggle to break free from lines and rules. You could say this is an analogy to the centralized decentralized nature
@melvincarvalho
melvincarvalho / starwars.md
Created March 18, 2016 12:37
starwars.md

ok last ill ever say on star wars : George Lucas largely based star wars on the Hero with a Thousand Faces which was essentially Joseph Campbell's explanation as a school teacher of his Skeleton's key to FInnegans Wake. The whole premise about what happens when 'technology' goes wrong -- you get a rebel system which is the way that technology corrects itself, a cycle (called the hero's cycle of which luke was the hero). Technology here is a very loose term and is referenced in the form of 10 'thunders' each of which changed human kind. One of those 'technologies' is actually clothing (another is the web). The role of clothing and uniform plays an important role in the rebel cycle of star wars, the storm troopers are seen as linear, square, formulaic, dogmatic -- a broken machine -- like hierarchical systems. The jedi are spontaneous, creative, non linear, they represent humanity and it's struggle to break free from lines and rules. You could say this is an analogy to the centralized decentralized nature

@melvincarvalho
melvincarvalho / nature.md
Created March 22, 2016 15:06
nature.md

I think this is spot on. I'm a big fan of Linked Research and the technology behind it, namely linked data. I think you've touched on a wider truth. Not only does science follow funding. And science follow measure. Both follow number. This is captured by Descartes in returning from the battle of Prague, Bila Hora, an angel appeared to him to him and said "The conquest of nature is to be achieved through measure and number." Science has followed this system ever since, in derogation to nature. Of course the Christian tradition he was brought up with also though various books viewed nature as fallen, so it was perhaps an easy idea to propagate. This idea has now taken over the world. We live in a numerical, quantitative, measured and economic model based world. And it is a world that doesnt work. McLuhan in one of his great volumes ponders the shortness of the phonetic alphabet as a means of compartmentalization. Not only do we live in numerical, it's decimal numerical, derived from having 10 digits, which is a

<?php
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
} else {
header('Access-Control-Allow-Origin : *');
}
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
@melvincarvalho
melvincarvalho / haproxy.cfg
Created April 25, 2016 13:11
haproxy.cfg
global
log 127.0.0.1 local0
maxconn 4000
daemon
uid 99
gid 99
defaults
log global
mode http