This repository has been archived by the owner on May 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
152 lines (144 loc) · 3.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Effective Security</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/white.css">
<link rel="stylesheet" href="css/vs.css">
<link rel="stylesheet" href="css/perso.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Effective Security</h1>
<img id="logo" src="logo.png">
</section>
<section>
<img data-src="trap.jpg">
</section>
<section>
<section>
<h3>JID (User Identifier)</h3>
<p class="fragment"><span class="">alice</span><span class="hljs-string">@</span><span class="">wonderland.lit<span class="hljs-string">/</span><span class="">mobile</span></p>
</section>
<section>
<h3>Input Parsing</h3>
<pre><code data-trim data-noescape>
var bare = jid ? jid.split("/")[0] : null;
if (bare.indexOf("@") > 0) {
var parts = bare.split("@");
parts.splice(0, 1);
bare = parts.join('@');
}
var s = jid.split("/");
s.splice(0, 1);
var resource = s.join('/');
return {resource: resource, bare: bare}
</code></pre>
<p class="qauthor">
Adapted from MatrixJS
</p>
</section>
<section>
<img data-src="dragon.jpg">
</section>
<section>
<h3>Parsing User JID</h3>
<pre><code data-trim data-noescape>
// invalid runes (§A.5)
var prohibitedRunes = []rune{
0x22, // (")
0x26, // (&)
0x27, // (')
0x2F, // (/)
0x3A, // (:)
0x3C, // (<)
0x3E, // (>)
0x40, // (@)
0x7F, // (del)
0xFFFE, // (BOM)
0xFFFF, // (BOM)
}
// max len (&2.1)
if len(from) > 3071 {
return ErrTooLong
}
// spec says: domain between "@" and "/" before normalization (§2.2)
atloc := bytes.IndexRune(from, '@')
slashloc := bytes.IndexRune(from, '/')
dstart, dend := 0, len(from)
// user not required (§2.1)
if atloc != -1 {
dstart = atloc + 1
user, err := parseUserID(from[:atloc])
if err != nil {
return fmt.Errorf("parsing user in %q: got %s", string(from), perr)
}
}
// neither is resource (§2.1)
if slashloc != -1 {
dend = slashloc
resource, err := parseResource(from[slashloc+1:]);
if err != nil {
return fmt.Errorf("parsing resource in %q: got %s", string(from), perr)
}
}
// domain cannot be nil (§2.1)
domain, err := parseDomain(from[dstart:dend])
if err != nil {
return fmt.Errorf("parsing domain in %q: %s", string(from), perr)
}
// ...
// not shown:
// - invalid characters in resources / user names
// - punycodes
// - domain whitelisting
// - ...
</code></pre>
</section>
</section>
<section>
<section>
<h3>Dynamic Secret Storage</h3>
</section>
<section>
<h4>Dynamic Credentials</h4>
<img data-src="vault_db.jpg">
</section>
<section>
<h4>Boostrapping</h4>
<img data-src="vault_init_small.png">
</section>
</section>
<section>
<section>
<h3>Leveraging Internal Solutions</h3>
</section>
<section>
<h4>Storing Documents</h4>
<img data-src="internal.png">
</section>
<section>
<h4>Audits</h4>
<img data-src="audit.png">
</section>
</section>
<section>
<p>Romain Doumenc</p>
<p>Software Engineer</p>
<p>[email protected]</p>
</section>
</div>
</div>
<script src="js/reveal.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/zoom-js/zoom.js"></script>
<script src="plugin/notes/notes.js"></script>
<script>
Reveal.initialize();
hljs.initHighlightingOnLoad();
</script>
</body>
</html>