-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
287 lines (244 loc) · 10.7 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Drupal 8 Security - July 17, 2015</title>
<meta name="description" content="Drupal 8.0.x Security Improvements">
<meta name="author" content="Peter Wolanin">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/midcamp-color.css" id="theme">
<link rel="stylesheet" href="css/lets-learn-git.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="footer">
<div class="branding--logo" style="position: absolute; bottom: 0em; z-index: 20;">
<span class="logo__image">
<img src="images/acquia_logo_grey_medium.png" alt="Acquia gray logo" height="55px" />
</span>
<p class="logo__site-name">#acquia</p>
</div>
<div class="session--info" style="position: absolute; bottom: 0em; z-index: 20;">
<p class="session__title">
Drupal 8 Security Improvements
<span class="seperator"> / </span>
</p>
<p class="session__presenter">
Peter Wolanin
</p>
</div>
</div>
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Drupal 8.0.x Security Improvements</h1>
<h2>July 17, 2015</h2>
<h2>Drupal Security and Privacy Summit</h2>
</section>
<section data-background="images/backgrounds/16968083219_34589346e4_o.jpg">
<div class="about-me">
<h1>Peter Wolanin</h1>
<h6>Acquia Engineering & Drupal Security Team</h6>
<h1>pwolanin</h1>
<p class="photo-credit">
Photo by <a href="https://www.flickr.com/photos/amazeelabs/16968083219/in/set-72157651561042300">amazeelabs</a>, <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">by-nc-sa</a>
</p>
</div>
</section>
<section>
<section>
<div class="text-bg">
<h1>Twig as template engine</h1>
<ul>
<li>New theme template system instead of phptemplate</li>
<li>http://twig.sensiolabs.org/</li>
<li>"modern", OO-based approach</li>
</ul>
</div>
</section>
<section>
<div class="text-bg">
<h1>Twig: keep the themers away from PHP</h1>
<ul>
<li>Templates allow looping and recursion</li>
<li>No access to Drupal api or SQL</li>
</ul>
</div>
</section>
<section>
<div class="text-bg">
<h1>Twig: escaping by default</h1>
<p>Drupal security model is inverted compared to Drupal 7. Text output in a template is escaped by default, unless it was previously escaped or marked safe</p>
<p>see: <a href="https://www.drupal.org/node/2296163">Twig autoescape enabled. New SafeMarkup class added.</a>
</div>
</section>
<section>
<div class="text-bg">
<h2>PHP vs Twig</h2>
<pre><code data-trim contenteditable>
<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php print render($title_prefix); ?>
<?php if ($block->subject): ?>
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php endif;?>
<?php print render($title_suffix); ?>
<div class="content"<?php print $content_attributes; ?>>
<?php print $content ?>
</div>
</div>
</code></pre>
</div>
</section>
<section>
<div class="text-bg">
<h2>PHP vs Twig</h2>
<pre><code data-trim contenteditable>
<div{{ attributes }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>
</code></pre>
</div>
</section>
</section>
<section>
<section>
<div class="text-bg">
<h1>WYSIWYG in core</h1>
</div>
<img src="images/editor-config.png"/>
</section>
<section>
<div class="text-bg">
<h1>WYSIWYG in core</h1>
</div>
<img src="images/allowd-tags.png"/>
</section>
</section>
<section>
<div class="text-bg">
<h1>PHP module removed from core</h1>
<ul>
<li>Encourages proper code management</li>
<li>Removes risk of exposure to anonymous (yes I've seen it in the wild)</li>
<li>Reduces the impact of admin accounts being compromosed</li>
</ul>
</div>
</section>
<section>
<div class="text-bg">
<h1>CSRF token management in the routing system</h1>
<p>Routes can specify token protection for GET requests, instead of requiring hand coded protection using API functions.</p>
</div>
</section>
<section>
<div class="text-bg">
<h1>Trusted Host Configuration in settings.php</h1>
<p>Easier way to block unexpected host names accessing Drupal (phishing, cache poisoining, etc).</p>
</div>
</section>
<section>
<div class="text-bg">
<h1>Limit PDO MySQL to executing single statements if PHP supports it</h1>
<p>Requires PHP 5.5.21+ or 5.6.5+ for PDO MySQL change. <a href="https://www.drupal.org/node/2388255">7.x backport</a></p>
</div>
</section>
<section>
<div class="text-bg">
<h1>Remove mixed SSL support from core</h1>
<p>Support for sessions that work both SSL and non-SSL (Secure Pages) <a href="https://www.drupal.org/node/2384903">removed</a>. Encourages full SSL.</p>
<p>Will have to replace the session handling service if you really need this.</p>
</div>
</section>
<section>
<div class="text-bg">
<h1>Inline JS removed from #attached</h1>
<p>Adding inlone JS is no longer a supported part of the render system</p>
<p>Converted drupalSettings from JavaScript to JSON, to allow for CSP in the future. <a href="https://www.drupal.org/node/2510104">7.x backport</a></p>
</div>
</section>
<section>
<div class="text-bg">
<h1>Improved security of session ID against DB exposure or SQL injection</h1>
<p>Hash session IDs in the database so the raw cookie value can't be exposed. <a href="https://www.drupal.org/node/2164025">7.x backport</a></p>
</div>
</section>
<section>
<div class="text-bg">
<h2>Some pending Drupal 8 patches (help needed)</h2>
<ul>
<li><a href="https://www.drupal.org/node/2489672">Limit all DB drivers to executing single statements by checking for deleimiter</a></li>
<li><a href="https://www.drupal.org/node/144538">User logout is vulnerable to CSRF</a></li>
<li><a href="https://www.drupal.org/node/2234243">Include defenses against BREACH and other TLS attacks in Drupal core</a></li>
</ul>
</div>
</section>
<section>
<div class="text-bg">
<h2>Sources and Resources</h2>
<ul>
<li><a href="http://opensource.com/business/15/5/interview-Greg-Knaddison-Michael-Hess-Drupal">greggles and mlhess interview on opensource.com</a></li>
<li><a href="https://events.drupal.org/losangeles2015/sessions/building-secure-sites-drupal">greggles and mlhess Drupalcon LA preso</a></li>
<li><a href="https://www.drupal.org/node/1992030">Protecting against HTTP HOST Header attacks</a></li>
<li><a href="https://www.drupal.org/drupal8-security-bounty">Drupal 8 security Bug Bounty</a></li>
<li><a href="https://www.drupal.org/project/issues/search/drupal?project_issue_followers=&issue_tags_op=%3D&issue_tags=D8+Security+Bounty">D8 Security Bug Bounty Issues</a></li>
</ul>
</div>
</section>
<section>
<div class="text-bg">
<h1>Thanks! Questions?</h1>
<ul>
<li>Contact me: https://www.drupal.org/user/49851/contact</li>
</ul>
</div>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'none', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>