WEBVTT

1
00:00:03.655 --> 00:00:04.425
<00:00:03.655>Okay, <00:00:04.348>perfect.

2
00:00:04.725 --> 00:00:09.375
<00:00:04.725>Uh, <00:00:04.880>thank <00:00:05.036>you <00:00:05.191>very <00:00:05.347>much. <00:00:05.502>Um, <00:00:05.658>uh, <00:00:05.813>are <00:00:05.969>you <00:00:06.125>going,

3
00:00:09.595 --> 00:00:11.455
<00:00:09.595>uh, <00:00:09.945>dear <00:00:10.295>moderator, <00:00:10.645>or <00:00:10.995>no?

4
00:00:11.455 --> 00:00:12.935
<00:00:11.455>Yeah, <00:00:11.677>that's <00:00:11.899>what <00:00:12.121>I <00:00:12.343>wanted <00:00:12.565>to <00:00:12.787>ask.

5
00:00:13.435 --> 00:00:17.735
<00:00:13.435>Uh, <00:00:13.610>now, <00:00:13.785>uh, <00:00:13.960>the <00:00:14.135>stage, <00:00:14.310>uh, <00:00:14.485>presents <00:00:14.660>my <00:00:14.835>presentation,

6
00:00:17.735 --> 00:00:18.735
<00:00:17.735>so <00:00:18.185>welcome <00:00:18.634>everyone.

7
00:00:19.235 --> 00:00:21.935
<00:00:19.235>Um, <00:00:19.468>my <00:00:19.701>session <00:00:19.935>is <00:00:20.168>called <00:00:20.401>Role-Based <00:00:20.634>Alpha

8
00:00:21.955 --> 00:00:23.015
<00:00:21.955>and <00:00:22.273>Angular <00:00:22.591>in <00:00:22.909>Note,

9
00:00:23.355 --> 00:00:25.815
<00:00:23.355>and <00:00:23.530>I <00:00:23.705>hope <00:00:23.880>that <00:00:24.055>during <00:00:24.230>the <00:00:24.405>next <00:00:24.580>45 <00:00:24.755>minutes,

10
00:00:26.235 --> 00:00:28.135
<00:00:26.235>I'm <00:00:26.468>gonna <00:00:26.701>present <00:00:26.935>to <00:00:27.168>you <00:00:27.401>from <00:00:27.634>theoretical

11
00:00:28.715 --> 00:00:32.255
<00:00:28.715>and <00:00:28.948>hands-on, <00:00:29.181>little <00:00:29.415>bit <00:00:29.648>code <00:00:29.881>examples <00:00:30.115>on

12
00:00:32.755 --> 00:00:34.175
<00:00:32.755>how <00:00:33.074>you <00:00:33.394>can <00:00:33.713>implement, <00:00:34.033>um,

13
00:00:34.285 --> 00:00:37.095
<00:00:34.285>different <00:00:34.565>concepts <00:00:34.845>in <00:00:35.125>your <00:00:35.404>application <00:00:35.684>based

14
00:00:37.095 --> 00:00:38.175
<00:00:37.095>on <00:00:37.419>Angular <00:00:37.742>and <00:00:38.067>note.

15
00:00:39.435 --> 00:00:44.205
<00:00:39.435>So, <00:00:39.785>the <00:00:40.135>plan, <00:00:40.485>the <00:00:40.835>plan

16
00:00:44.205 --> 00:00:47.325
<00:00:44.205>for <00:00:44.438>today, <00:00:44.671>the <00:00:44.905>case <00:00:45.138>of <00:00:45.371>role-based <00:00:45.605>application,

17
00:00:47.635 --> 00:00:50.645
<00:00:47.635>what <00:00:47.775>actually <00:00:47.915>we <00:00:48.055>are <00:00:48.195>going <00:00:48.335>to <00:00:48.474>talk <00:00:48.614>about <00:00:48.754>in <00:00:48.894>more, <00:00:49.035>um,

18
00:00:50.655 --> 00:00:51.805
<00:00:50.655>conceptual <00:00:51.690>fashion.

19
00:00:52.395 --> 00:00:55.125
<00:00:52.395>Then <00:00:52.628>we <00:00:52.861>will <00:00:53.095>jump <00:00:53.328>into <00:00:53.561>domain <00:00:53.795>modeling

20
00:00:55.465 --> 00:00:57.245
<00:00:55.465>for <00:00:55.931>multi-user <00:00:56.398>account <00:00:56.865>system

21
00:00:57.395 --> 00:00:59.165
<00:00:57.395>because <00:00:57.745>this <00:00:58.095>is <00:00:58.445>very, <00:00:58.795>um,

22
00:00:59.615 --> 00:01:03.925
<00:00:59.615>usual <00:00:59.790>case <00:00:59.965>when <00:01:00.140>we <00:01:00.315>can <00:01:00.490>share <00:01:00.665>different <00:01:00.840>entities, <00:01:01.015>um,

23
00:01:04.195 --> 00:01:07.005
<00:01:04.194>with <00:01:04.474>the <00:01:04.754>users <00:01:05.035>that <00:01:05.315>are <00:01:05.595>attached

24
00:01:07.005 --> 00:01:08.485
<00:01:07.005>to <00:01:07.226>the <00:01:07.449>same <00:01:07.670>account <00:01:07.893>in <00:01:08.115>the <00:01:08.337>system.

25
00:01:09.135 --> 00:01:11.685
<00:01:09.135>We'll <00:01:09.335>talk <00:01:09.535>a <00:01:09.735>little <00:01:09.935>bit <00:01:10.135>about <00:01:10.335>managing <00:01:10.535>permissions,

26
00:01:12.235 --> 00:01:13.245
<00:01:12.235>then <00:01:12.689>going, <00:01:13.144>uh,

27
00:01:13.245 --> 00:01:16.485
<00:01:13.245>deeper <00:01:13.420>in <00:01:13.595>the <00:01:13.770>abstraction <00:01:13.945>level <00:01:14.120>into <00:01:14.295>more <00:01:14.470>concrete <00:01:14.645>things

28
00:01:16.515 --> 00:01:20.205
<00:01:16.515>like <00:01:16.690>designing <00:01:16.865>a <00:01:17.040>secure <00:01:17.215>as <00:01:17.390>API <00:01:17.565>for <00:01:17.740>roles, <00:01:17.915>uh,

29
00:01:20.505 --> 00:01:24.725
<00:01:20.505>why <00:01:20.621>we <00:01:20.738>need <00:01:20.854>user <00:01:20.971>of <00:01:21.088>object <00:01:21.205>and <00:01:21.321>how <00:01:21.438>we <00:01:21.554>can, <00:01:21.671>uh, <00:01:21.788>use <00:01:21.905>it.

30
00:01:25.385 --> 00:01:28.445
<00:01:25.385>Uh, <00:01:25.618>router <00:01:25.851>guard, <00:01:26.085>HTP, <00:01:26.318>interceptors <00:01:26.551>and <00:01:26.785>Middlewares.

31
00:01:28.865 --> 00:01:32.725
<00:01:28.865>So <00:01:29.005>another <00:01:29.145>more <00:01:29.285>concrete <00:01:29.425>tools <00:01:29.565>that <00:01:29.705>we <00:01:29.845>will <00:01:29.985>be <00:01:30.125>using, <00:01:30.265>uh,

32
00:01:32.725 --> 00:01:33.885
<00:01:32.725>implementing <00:01:33.246>our <00:01:33.768>solution.

33
00:01:34.425 --> 00:01:35.725
<00:01:34.425>Uh, <00:01:34.815>some <00:01:35.205>nice <00:01:35.595>trick

34
00:01:35.795 --> 00:01:38.125
<00:01:35.795>regarding <00:01:36.261>conditional <00:01:36.728>components, <00:01:37.195>visibility.

35
00:01:38.485 --> 00:01:41.605
<00:01:38.485>I <00:01:38.685>believe <00:01:38.885>Angular <00:01:39.085>developers <00:01:39.285>would, <00:01:39.485>uh, <00:01:39.685>benefit <00:01:39.885>here,

36
00:01:42.035 --> 00:01:45.125
<00:01:42.035>real <00:01:42.235>life <00:01:42.435>demo <00:01:42.634>with <00:01:42.835>our <00:01:43.035>budget <00:01:43.235>management <00:01:43.435>application.

37
00:01:45.465 --> 00:01:47.485
<00:01:45.465>And <00:01:45.620>if <00:01:45.776>we <00:01:45.931>will <00:01:46.087>have <00:01:46.242>more <00:01:46.398>time, <00:01:46.553>enough <00:01:46.709>time, <00:01:46.865>I,

38
00:01:47.605 --> 00:01:48.965
<00:01:47.604>I <00:01:47.809>have <00:01:48.012>a <00:01:48.217>bonus <00:01:48.420>section <00:01:48.625>for <00:01:48.829>you.

39
00:01:49.385 --> 00:01:52.765
<00:01:49.384>Uh, <00:01:49.585>seven <00:01:49.785>Steps <00:01:49.984>to <00:01:50.184>Secure <00:01:50.384>Modern <00:01:50.585>Web <00:01:50.785>Apps,

40
00:01:52.985 --> 00:01:54.285
<00:01:52.985>and <00:01:53.219>then <00:01:53.453>q <00:01:53.687>and <00:01:53.920>A <00:01:54.155>session.

41
00:01:56.375 --> 00:01:59.635
<00:01:56.375>So, <00:01:56.608>next <00:01:56.841>slide. <00:01:57.075>Mm-hmm. <00:01:57.308>Who <00:01:57.541>am <00:01:57.775>I?

42
00:01:59.735 --> 00:02:03.075
<00:01:59.735>Uh, <00:01:59.875>just <00:02:00.015>to <00:02:00.155>give <00:02:00.295>you <00:02:00.435>a <00:02:00.575>little <00:02:00.715>bit <00:02:00.855>of, <00:02:00.995>uh, <00:02:01.135>background,

43
00:02:03.375 --> 00:02:04.395
<00:02:03.375>why <00:02:03.558>would <00:02:03.742>you <00:02:03.925>listen <00:02:04.109>to <00:02:04.292>me?

44
00:02:04.395 --> 00:02:05.515
<00:02:04.395>My <00:02:04.646>name <00:02:04.899>is <00:02:05.151>Bartos <00:02:05.403>Petru.

45
00:02:06.075 --> 00:02:07.915
<00:02:06.075>I <00:02:06.308>hold <00:02:06.541>master <00:02:06.775>degree <00:02:07.008>in <00:02:07.241>computer <00:02:07.475>science.

46
00:02:08.185 --> 00:02:10.475
<00:02:08.185>I've <00:02:08.418>been, <00:02:08.651>uh, <00:02:08.884>commercially <00:02:09.118>in <00:02:09.351>this <00:02:09.585>industry

47
00:02:10.475 --> 00:02:12.675
<00:02:10.475>for <00:02:10.755>almost <00:02:11.035>a <00:02:11.315>decade, <00:02:11.595>uh, <00:02:11.875>working

48
00:02:12.695 --> 00:02:15.395
<00:02:12.695>for <00:02:12.928>customers <00:02:13.161>like <00:02:13.394>Credit <00:02:13.628>Suisse, <00:02:13.861>UBSF, <00:02:14.095>secure,

49
00:02:15.995 --> 00:02:17.755
<00:02:15.995>speaking <00:02:16.345>on <00:02:16.695>the <00:02:17.045>different <00:02:17.395>conferences

50
00:02:17.755 --> 00:02:19.315
<00:02:17.755>around <00:02:18.035>the <00:02:18.315>world, <00:02:18.595>like <00:02:18.875>Angular <00:02:19.155>app.

51
00:02:19.445 --> 00:02:22.995
<00:02:19.445>Angie <00:02:19.584>Wakin <00:02:19.725>is <00:02:19.864>when <00:02:20.005>we <00:02:20.144>actually <00:02:20.285>met <00:02:20.424>with <00:02:20.565>our, <00:02:20.704>um, <00:02:20.845>moderator,

52
00:02:23.575 --> 00:02:26.635
<00:02:23.575>uh, <00:02:23.924>now <00:02:24.274>Angie <00:02:24.625>Columbia <00:02:24.975>JSConf.

53
00:02:26.755 --> 00:02:29.275
<00:02:26.755>I <00:02:27.035>started <00:02:27.315>Angular <00:02:27.595>Academy <00:02:27.875>in <00:02:28.155>2017,

54
00:02:29.575 --> 00:02:33.635
<00:02:29.575>and <00:02:29.750>since <00:02:29.924>2020 <00:02:30.100>it, <00:02:30.274>uh, <00:02:30.450>transformed <00:02:30.625>into <00:02:30.799>Dev <00:02:30.975>Academy

55
00:02:34.055 --> 00:02:35.075
<00:02:34.055>and <00:02:34.361>the <00:02:34.667>sister <00:02:34.972>project,

56
00:02:35.215 --> 00:02:38.435
<00:02:35.215>or <00:02:35.390>the, <00:02:35.565>the <00:02:35.740>course <00:02:35.915>program <00:02:36.090>that <00:02:36.265>is <00:02:36.440>on <00:02:36.615>behalf

57
00:02:38.435 --> 00:02:40.635
<00:02:38.435>of <00:02:38.635>Deaf <00:02:38.835>Academy <00:02:39.035>is <00:02:39.235>called <00:02:39.435>Web <00:02:39.635>Security <00:02:39.835>Academy.

58
00:02:40.655 --> 00:02:44.595
<00:02:40.655>And <00:02:40.795>today <00:02:40.935>I'm <00:02:41.075>here <00:02:41.215>on <00:02:41.355>behalf <00:02:41.495>of <00:02:41.635>Web <00:02:41.775>Security <00:02:41.915>Academy, <00:02:42.055>um,

59
00:02:45.605 --> 00:02:49.315
<00:02:45.605>which <00:02:45.760>is <00:02:45.916>an <00:02:46.071>international <00:02:46.227>bootcamp <00:02:46.382>that <00:02:46.538>we <00:02:46.693>train <00:02:46.849>people <00:02:47.005>how

60
00:02:49.315 --> 00:02:51.675
<00:02:49.315>to <00:02:49.665>build <00:02:50.015>secure <00:02:50.365>web <00:02:50.715>applications.

61
00:02:51.695 --> 00:02:55.355
<00:02:51.695>We <00:02:51.894>have <00:02:52.095>students <00:02:52.295>from <00:02:52.495>all <00:02:52.695>entire <00:02:52.894>world, <00:02:53.095>uh,

62
00:02:56.085 --> 00:02:59.035
<00:02:56.085>every <00:02:56.318>possible <00:02:56.551>continent <00:02:56.785>apart <00:02:57.018>from <00:02:57.251>this, <00:02:57.485>uh,

63
00:02:59.915 --> 00:03:01.765
<00:02:59.915>cold <00:03:00.195>one <00:03:00.475>on <00:03:00.755>the, <00:03:01.035>on <00:03:01.315>the

64
00:03:04.165 --> 00:03:06.415
<00:03:04.165>top <00:03:04.631>of <00:03:05.098>the <00:03:05.565>world.

65
00:03:06.715 --> 00:03:08.775
<00:03:06.715>Uh, <00:03:07.065>we <00:03:07.415>are <00:03:07.765>really <00:03:08.115>global.

66
00:03:09.595 --> 00:03:14.245
<00:03:09.595>So <00:03:09.945>just <00:03:10.295>couple <00:03:10.645>of <00:03:10.995>pictures.

67
00:03:14.425 --> 00:03:18.825
<00:03:14.425>One <00:03:14.600>of, <00:03:14.775>uh, <00:03:14.950>some <00:03:15.125>of <00:03:15.300>the, <00:03:15.475>you <00:03:15.650>know, <00:03:15.825>activities

68
00:03:18.825 --> 00:03:22.105
<00:03:18.825>during <00:03:18.980>workshops <00:03:19.136>and, <00:03:19.291>uh, <00:03:19.447>slides <00:03:19.602>to <00:03:19.758>build <00:03:19.913>a <00:03:20.069>little <00:03:20.225>bit

69
00:03:22.105 --> 00:03:23.225
<00:03:22.105>of <00:03:22.357>authority <00:03:22.608>in <00:03:22.861>your <00:03:23.113>eyes.

70
00:03:23.605 --> 00:03:26.985
<00:03:23.605>And <00:03:23.760>now <00:03:23.916>we <00:03:24.071>are, <00:03:24.227>uh, <00:03:24.382>jumping <00:03:24.538>straight <00:03:24.693>to <00:03:24.849>our <00:03:25.005>topic.

71
00:03:27.445 --> 00:03:31.425
<00:03:27.445>We <00:03:27.678>start <00:03:27.911>very <00:03:28.144>simple, <00:03:28.378>authentication <00:03:28.611>versus <00:03:28.845>authorization.

72
00:03:32.085 --> 00:03:35.145
<00:03:32.085>It <00:03:32.260>sound, <00:03:32.435>those <00:03:32.610>terms <00:03:32.785>sound, <00:03:32.960>uh, <00:03:33.135>kind <00:03:33.310>of <00:03:33.485>similar,

73
00:03:35.485 --> 00:03:37.945
<00:03:35.485>but <00:03:35.640>it's <00:03:35.796>good <00:03:35.951>to <00:03:36.107>differentiate <00:03:36.262>them <00:03:36.418>at <00:03:36.573>the <00:03:36.729>very <00:03:36.885>beginning.

74
00:03:38.005 --> 00:03:39.665
<00:03:38.005>So <00:03:38.238>we <00:03:38.471>are <00:03:38.704>have <00:03:38.938>the <00:03:39.171>common <00:03:39.405>understanding.

75
00:03:40.015 --> 00:03:44.345
<00:03:40.015>When <00:03:40.214>we <00:03:40.415>authenticate, <00:03:40.614>we <00:03:40.815>wanna <00:03:41.015>prove <00:03:41.214>one's <00:03:41.415>identity.

76
00:03:44.805 --> 00:03:46.865
<00:03:44.805>You <00:03:45.005>know, <00:03:45.205>I <00:03:45.405>wanna <00:03:45.605>prove <00:03:45.805>that <00:03:46.005>I'm <00:03:46.205>bartos

77
00:03:47.085 --> 00:03:50.985
<00:03:47.085>and <00:03:47.240>if <00:03:47.396>you, <00:03:47.551>uh, <00:03:47.707>request <00:03:47.862>me <00:03:48.018>to <00:03:48.173>add <00:03:48.329>the <00:03:48.485>password

78
00:03:51.045 --> 00:03:53.185
<00:03:51.045>and <00:03:51.325>username, <00:03:51.605>that <00:03:51.885>may <00:03:52.165>be <00:03:52.445>enough,

79
00:03:53.285 --> 00:03:57.305
<00:03:53.285>but <00:03:53.440>this <00:03:53.596>may <00:03:53.751>be <00:03:53.907>also, <00:03:54.062>uh, <00:03:54.218>based <00:03:54.373>on <00:03:54.529>some <00:03:54.685>biometrics

80
00:03:57.445 --> 00:04:00.105
<00:03:57.445>or <00:03:57.678>iris <00:03:57.911>scan <00:03:58.144>or <00:03:58.378>one <00:03:58.611>time <00:03:58.845>password.

81
00:04:00.405 --> 00:04:04.225
<00:04:00.405>And <00:04:00.560>this <00:04:00.716>is <00:04:00.871>the <00:04:01.027>mere <00:04:01.182>process <00:04:01.338>of <00:04:01.493>proving <00:04:01.649>one's <00:04:01.805>identity.

82
00:04:04.685 --> 00:04:06.145
<00:04:04.685>And <00:04:05.013>then <00:04:05.342>we <00:04:05.670>have <00:04:05.999>authorization

83
00:04:06.645 --> 00:04:09.065
<00:04:06.645>so <00:04:06.878>we <00:04:07.111>can <00:04:07.345>authorize <00:04:07.578>a <00:04:07.811>given <00:04:08.045>person

84
00:04:10.285 --> 00:04:12.225
<00:04:10.285>to <00:04:10.565>given <00:04:10.845>operations <00:04:11.125>in <00:04:11.405>the <00:04:11.685>system.

85
00:04:12.765 --> 00:04:17.025
<00:04:12.765>So <00:04:12.904>for <00:04:13.045>example, <00:04:13.184>me <00:04:13.325>as <00:04:13.464>a <00:04:13.605>bartos <00:04:13.744>may <00:04:13.885>not <00:04:14.024>be <00:04:14.165>authorized

86
00:04:17.045 --> 00:04:19.225
<00:04:17.045>to <00:04:17.278>perform <00:04:17.511>given <00:04:17.745>operations <00:04:17.978>in <00:04:18.211>the <00:04:18.445>system.

87
00:04:19.535 --> 00:04:21.985
<00:04:19.535>Another <00:04:20.001>authenticated <00:04:20.468>person <00:04:20.935>might

88
00:04:21.985 --> 00:04:23.145
<00:04:21.985>have <00:04:22.507>different <00:04:23.029>authorizations.

89
00:04:23.685 --> 00:04:25.025
<00:04:23.685>So <00:04:23.986>this <00:04:24.288>is <00:04:24.589>our <00:04:24.890>foundation.

90
00:04:25.865 --> 00:04:29.525
<00:04:25.865>And <00:04:25.992>what <00:04:26.119>we <00:04:26.246>are <00:04:26.374>going <00:04:26.501>to, <00:04:26.628>um, <00:04:26.755>start <00:04:26.883>with <00:04:27.010>is <00:04:27.137>the <00:04:27.265>case

91
00:04:29.585 --> 00:04:31.205
<00:04:29.585>of <00:04:30.284>role-based <00:04:30.984>application.

92
00:04:31.625 --> 00:04:35.645
<00:04:31.625>So <00:04:31.765>first <00:04:31.905>of <00:04:32.045>all, <00:04:32.185>let's, <00:04:32.325>let's <00:04:32.465>make <00:04:32.605>a <00:04:32.745>small, <00:04:32.885>um, <00:04:33.025>step

93
00:04:35.785 --> 00:04:37.285
<00:04:35.784>by <00:04:36.460>step <00:04:37.135>visualization.

94
00:04:37.315 --> 00:04:39.765
<00:04:37.315>What, <00:04:37.490>what <00:04:37.665>we <00:04:37.840>wanna, <00:04:38.015>what <00:04:38.190>process <00:04:38.365>we <00:04:38.540>wanna <00:04:38.715>cover.

95
00:04:39.765 --> 00:04:43.685
<00:04:39.765>Here <00:04:39.920>we <00:04:40.076>have <00:04:40.231>a <00:04:40.387>person <00:04:40.542>which <00:04:40.698>is <00:04:40.853>Mike <00:04:41.009>and <00:04:41.164>Paul,

96
00:04:44.105 --> 00:04:47.605
<00:04:44.105>and <00:04:44.260>both <00:04:44.416>of <00:04:44.571>them <00:04:44.727>are <00:04:44.882>tied <00:04:45.038>to <00:04:45.193>the <00:04:45.349>same <00:04:45.505>account.

97
00:04:48.155 --> 00:04:50.325
<00:04:48.155>They <00:04:48.434>may <00:04:48.715>share <00:04:48.994>entities <00:04:49.275>or <00:04:49.554>resources,

98
00:04:50.625 --> 00:04:53.005
<00:04:50.625>and <00:04:50.905>let's <00:04:51.185>imagine <00:04:51.465>that <00:04:51.745>they <00:04:52.025>authenticate

99
00:04:53.005 --> 00:04:54.165
<00:04:53.005>against <00:04:54.049>application.

100
00:04:54.305 --> 00:04:56.325
<00:04:54.305>We <00:04:54.655>think <00:04:55.005>of <00:04:55.355>web <00:04:55.705>application

101
00:04:57.005 --> 00:04:58.965
<00:04:57.005>SPA <00:04:57.180>on <00:04:57.355>the <00:04:57.530>front <00:04:57.705>end, <00:04:57.880>API <00:04:58.055>on <00:04:58.230>the <00:04:58.405>backend.

102
00:04:59.155 --> 00:05:02.165
<00:04:59.155>They <00:04:59.354>may <00:04:59.554>authenticate <00:04:59.755>with <00:04:59.955>login <00:05:00.155>password, <00:05:00.354>iris <00:05:00.554>scan,

103
00:05:03.355 --> 00:05:06.365
<00:05:03.355>fingerprint, <00:05:03.588>print <00:05:03.821>scan, <00:05:04.055>one <00:05:04.288>time, <00:05:04.521>password, <00:05:04.755>whatever.

104
00:05:06.635 --> 00:05:08.125
<00:05:06.635>This <00:05:06.826>is <00:05:07.018>the <00:05:07.209>first <00:05:07.401>step <00:05:07.592>we <00:05:07.784>have <00:05:07.976>here.

105
00:05:09.805 --> 00:05:13.575
<00:05:09.805>Then <00:05:09.980>based <00:05:10.155>on <00:05:10.330>that, <00:05:10.505>if <00:05:10.680>this <00:05:10.855>is <00:05:11.030>successful, <00:05:11.205>um,

106
00:05:14.285 --> 00:05:17.855
<00:05:14.285>they <00:05:14.412>may <00:05:14.539>be <00:05:14.666>presented <00:05:14.794>their <00:05:14.921>own <00:05:15.048>UIs <00:05:15.175>based <00:05:15.303>on <00:05:15.430>the <00:05:15.557>given <00:05:15.685>role.

107
00:05:17.855 --> 00:05:21.575
<00:05:17.855>They, <00:05:18.010>they <00:05:18.166>have, <00:05:18.321>there <00:05:18.477>may <00:05:18.632>be <00:05:18.788>a, <00:05:18.943>an <00:05:19.099>owner <00:05:19.255>ui,

108
00:05:21.705 --> 00:05:23.335
<00:05:21.705>which <00:05:22.055>may <00:05:22.405>have <00:05:22.755>more <00:05:23.104>features,

109
00:05:23.675 --> 00:05:26.055
<00:05:23.675>and <00:05:23.875>there <00:05:24.075>may <00:05:24.275>be <00:05:24.475>a <00:05:24.675>reader <00:05:24.875>reader's <00:05:25.075>UI

110
00:05:26.085 --> 00:05:29.175
<00:05:26.085>with <00:05:26.260>just <00:05:26.435>maybe <00:05:26.609>read <00:05:26.784>only <00:05:26.960>without <00:05:27.135>any <00:05:27.310>actions <00:05:27.484>available

111
00:05:29.515 --> 00:05:30.615
<00:05:29.515>for <00:05:29.762>him <00:05:30.010>in <00:05:30.257>the <00:05:30.505>ui.

112
00:05:32.135 --> 00:05:35.835
<00:05:32.135>And <00:05:32.290>then <00:05:32.446>they <00:05:32.601>interact <00:05:32.757>with <00:05:32.912>this <00:05:33.068>UI <00:05:33.223>with, <00:05:33.379>with <00:05:33.534>regard

113
00:05:35.835 --> 00:05:36.875
<00:05:35.835>of <00:05:36.303>their <00:05:36.771>permissions

114
00:05:36.875 --> 00:05:39.035
<00:05:36.875>and <00:05:37.075>authorization <00:05:37.275>in <00:05:37.475>this, <00:05:37.675>uh, <00:05:37.875>in <00:05:38.075>the <00:05:38.275>system.

115
00:05:41.035 --> 00:05:42.895
<00:05:41.034>And <00:05:41.314>the <00:05:41.594>way <00:05:41.874>it <00:05:42.155>works <00:05:42.434>is

116
00:05:42.895 --> 00:05:46.255
<00:05:42.895>that <00:05:43.094>our <00:05:43.294>SPA <00:05:43.495>let <00:05:43.695>it <00:05:43.895>be <00:05:44.094>angular <00:05:44.294>react

117
00:05:46.435 --> 00:05:48.695
<00:05:46.435>or <00:05:46.785>view, <00:05:47.135>uh, <00:05:47.485>may <00:05:47.835>hide

118
00:05:48.835 --> 00:05:52.535
<00:05:48.835>or <00:05:48.974>show, <00:05:49.114>uh, <00:05:49.255>parts <00:05:49.395>of <00:05:49.534>the <00:05:49.674>UI <00:05:49.815>based <00:05:49.955>on <00:05:50.094>the <00:05:50.234>role.

119
00:05:52.995 --> 00:05:54.575
<00:05:52.995>And <00:05:53.275>then <00:05:53.555>we <00:05:53.835>will <00:05:54.115>be <00:05:54.395>interacting

120
00:05:54.575 --> 00:05:56.975
<00:05:54.575>with <00:05:54.775>the <00:05:54.974>backend <00:05:55.175>from <00:05:55.375>the <00:05:55.575>SPA <00:05:55.775>sending <00:05:55.974>some

121
00:05:58.105 --> 00:06:00.645
<00:05:58.105>and, <00:05:58.455>uh, <00:05:58.805>SPA <00:05:59.155>may <00:05:59.505>authorize

122
00:06:00.745 --> 00:06:03.965
<00:06:00.745>or <00:06:00.900>may <00:06:01.056>not <00:06:01.211>authorize <00:06:01.367>those <00:06:01.522>requests <00:06:01.678>based <00:06:01.833>on <00:06:01.989>some <00:06:02.145>logic.

123
00:06:04.035 --> 00:06:05.045
<00:06:04.035>Okay, <00:06:04.262>I <00:06:04.489>went <00:06:04.716>too <00:06:04.944>far.

124
00:06:05.665 --> 00:06:10.395
<00:06:05.665>And <00:06:05.792>usually <00:06:05.919>we <00:06:06.046>may <00:06:06.174>have <00:06:06.301>either <00:06:06.428>session <00:06:06.555>id, <00:06:06.683>it <00:06:06.810>may <00:06:06.937>be <00:06:07.065>inside

125
00:06:10.395 --> 00:06:14.315
<00:06:10.395>of <00:06:10.522>the <00:06:10.649>cookie, <00:06:10.776>or <00:06:10.904>we <00:06:11.031>may <00:06:11.158>have <00:06:11.285>some <00:06:11.413>token <00:06:11.540>inside <00:06:11.667>of, <00:06:11.794>uh,

126
00:06:14.415 --> 00:06:17.595
<00:06:14.415>either <00:06:14.695>cookie <00:06:14.975>or <00:06:15.255>HT <00:06:15.535>TP <00:06:15.815>header.

127
00:06:17.595 --> 00:06:20.275
<00:06:17.595>Depending <00:06:17.770>on <00:06:17.945>what <00:06:18.120>kind <00:06:18.295>of <00:06:18.470>architecture <00:06:18.645>we <00:06:18.820>have <00:06:18.995>there.

128
00:06:20.275 --> 00:06:24.275
<00:06:20.275>MI <00:06:20.430>must <00:06:20.586>be <00:06:20.741>something <00:06:20.897>that <00:06:21.052>is <00:06:21.208>used <00:06:21.363>by <00:06:21.519>the <00:06:21.674>API

129
00:06:24.275 --> 00:06:29.135
<00:06:24.275>or <00:06:24.474>the <00:06:24.674>backend <00:06:24.875>to <00:06:25.075>an <00:06:25.275>authenticated <00:06:25.474>alpha, <00:06:25.674>right?

130
00:06:29.235 --> 00:06:30.375
<00:06:29.235>The <00:06:29.491>person <00:06:29.748>behind <00:06:30.004>the <00:06:30.261>query.

131
00:06:30.955 --> 00:06:34.335
<00:06:30.955>Um, <00:06:31.094>it <00:06:31.234>may <00:06:31.375>be <00:06:31.515>as <00:06:31.655>simple <00:06:31.794>as, <00:06:31.935>um, <00:06:32.075>Jason <00:06:32.215>web <00:06:32.354>token

132
00:06:34.415 --> 00:06:38.735
<00:06:34.415>that <00:06:34.590>is <00:06:34.765>usually, <00:06:34.940>uh, <00:06:35.115>sent <00:06:35.290>via <00:06:35.465>authorization <00:06:35.640>header, <00:06:35.815>uh,

133
00:06:38.735 --> 00:06:42.975
<00:06:38.735>with <00:06:38.875>the <00:06:39.015>ER <00:06:39.155>and <00:06:39.295>the <00:06:39.435>contains, <00:06:39.575>uh, <00:06:39.715>value <00:06:39.855>of <00:06:39.995>the <00:06:40.135>token.

134
00:06:43.075 --> 00:06:44.455
<00:06:43.075>It <00:06:43.385>is <00:06:43.695>a <00:06:44.006>self-contained <00:06:44.317>token.

135
00:06:44.755 --> 00:06:47.255
<00:06:44.755>Uh, <00:06:44.882>we <00:06:45.009>are <00:06:45.136>not <00:06:45.264>going <00:06:45.391>to <00:06:45.518>dive <00:06:45.645>deep <00:06:45.773>into <00:06:45.900>this <00:06:46.027>right <00:06:46.155>now,

136
00:06:47.555 --> 00:06:48.935
<00:06:47.555>but <00:06:47.762>this <00:06:47.969>is <00:06:48.176>one <00:06:48.383>of <00:06:48.590>the <00:06:48.797>mechanism

137
00:06:48.935 --> 00:06:50.695
<00:06:48.935>that <00:06:49.135>we <00:06:49.335>will <00:06:49.535>be, <00:06:49.735>that <00:06:49.935>we <00:06:50.135>can <00:06:50.335>use.

138
00:06:52.865 --> 00:06:54.285
<00:06:52.865>So <00:06:53.184>we <00:06:53.504>covered <00:06:53.823>the <00:06:54.143>basics.

139
00:06:54.585 --> 00:06:56.565
<00:06:54.585>Now, <00:06:54.740>uh, <00:06:54.896>since <00:06:55.051>we <00:06:55.207>know <00:06:55.362>what <00:06:55.518>we <00:06:55.673>want <00:06:55.829>to <00:06:55.984>cover,

140
00:06:56.775 --> 00:06:58.925
<00:06:56.775>let's <00:06:57.008>focus <00:06:57.241>on <00:06:57.474>domain <00:06:57.708>and <00:06:57.941>domain <00:06:58.174>modeling.

141
00:06:59.385 --> 00:07:01.925
<00:06:59.385>How <00:06:59.664>do <00:06:59.945>we, <00:07:00.224>uh, <00:07:00.505>conceptually, <00:07:00.784>uh,

142
00:07:01.935 --> 00:07:04.445
<00:07:01.935>model <00:07:02.285>our <00:07:02.635>multi-user <00:07:02.985>account <00:07:03.335>system?

143
00:07:04.905 --> 00:07:07.765
<00:07:04.905>It <00:07:05.138>made <00:07:05.371>the, <00:07:05.604>the <00:07:05.838>simplest <00:07:06.071>starting <00:07:06.304>point,

144
00:07:07.935 --> 00:07:10.245
<00:07:07.935>maybe <00:07:08.168>an <00:07:08.401>account <00:07:08.635>entity <00:07:08.868>with <00:07:09.101>some <00:07:09.335>id,

145
00:07:10.785 --> 00:07:15.145
<00:07:10.785>and <00:07:10.940>then <00:07:11.096>users <00:07:11.251>that <00:07:11.407>point <00:07:11.562>out <00:07:11.718>from <00:07:11.873>the <00:07:12.029>user <00:07:12.185>object

146
00:07:15.145 --> 00:07:17.985
<00:07:15.145>to <00:07:15.378>the <00:07:15.611>account <00:07:15.844>object <00:07:16.078>with <00:07:16.311>account <00:07:16.544>id.

147
00:07:18.415 --> 00:07:20.665
<00:07:18.415>They <00:07:18.615>also <00:07:18.815>may <00:07:19.015>have <00:07:19.215>their <00:07:19.415>own <00:07:19.615>ID <00:07:19.815>login.

148
00:07:20.925 --> 00:07:22.785
<00:07:20.925>And <00:07:21.125>the <00:07:21.325>role, <00:07:21.525>in <00:07:21.725>our <00:07:21.925>case, <00:07:22.125>it's <00:07:22.325>going

149
00:07:22.785 --> 00:07:26.225
<00:07:22.785>to <00:07:22.912>be <00:07:23.039>a <00:07:23.166>role <00:07:23.294>which <00:07:23.421>will <00:07:23.548>be <00:07:23.675>used <00:07:23.803>to <00:07:23.930>define <00:07:24.057>their, <00:07:24.185>um,

150
00:07:26.535 --> 00:07:30.305
<00:07:26.535>permissions <00:07:26.710>and <00:07:26.885>then <00:07:27.060>entities, <00:07:27.235>the <00:07:27.410>meat <00:07:27.585>of <00:07:27.760>our <00:07:27.935>system.

151
00:07:30.605 --> 00:07:35.265
<00:07:30.605>Let <00:07:30.721>it <00:07:30.838>be <00:07:30.955>a <00:07:31.071>bank <00:07:31.188>account, <00:07:31.305>let <00:07:31.421>it <00:07:31.538>be <00:07:31.655>money, <00:07:31.771>let <00:07:31.888>it <00:07:32.005>be

152
00:07:35.815 --> 00:07:38.905
<00:07:35.815>post, <00:07:35.955>let <00:07:36.094>it <00:07:36.235>be <00:07:36.375>comment, <00:07:36.515>let <00:07:36.655>it <00:07:36.795>be <00:07:36.935>whatever <00:07:37.075>the <00:07:37.215>business

153
00:07:38.905 --> 00:07:42.065
<00:07:38.905>of <00:07:39.080>the <00:07:39.255>application <00:07:39.429>is, <00:07:39.604>it's <00:07:39.780>bound <00:07:39.955>to <00:07:40.130>the <00:07:40.304>account.

154
00:07:42.525 --> 00:07:44.145
<00:07:42.525>And <00:07:42.804>we <00:07:43.085>can <00:07:43.364>imagine <00:07:43.645>the <00:07:43.924>system

155
00:07:44.145 --> 00:07:46.505
<00:07:44.145>that <00:07:44.344>only <00:07:44.544>the <00:07:44.745>users <00:07:44.945>from <00:07:45.145>the <00:07:45.344>given <00:07:45.544>account

156
00:07:46.505 --> 00:07:49.225
<00:07:46.505>of <00:07:46.680>the <00:07:46.855>given <00:07:47.030>ID <00:07:47.205>may <00:07:47.380>interact <00:07:47.555>with <00:07:47.730>the <00:07:47.905>entities

157
00:07:49.295 --> 00:07:50.825
<00:07:49.295>that <00:07:49.570>are <00:07:49.845>bound <00:07:50.121>to <00:07:50.396>this <00:07:50.671>account.

158
00:07:51.205 --> 00:07:54.265
<00:07:51.205>And <00:07:51.344>then <00:07:51.484>our <00:07:51.625>system <00:07:51.765>based <00:07:51.905>on <00:07:52.044>the <00:07:52.185>role <00:07:52.325>would <00:07:52.465>be <00:07:52.604>approving

159
00:07:54.265 --> 00:07:56.185
<00:07:54.265>or <00:07:54.544>not <00:07:54.825>approving <00:07:55.104>the <00:07:55.385>given <00:07:55.664>operations

160
00:07:56.185 --> 00:07:58.785
<00:07:56.185>that <00:07:56.465>are <00:07:56.745>scoped <00:07:57.025>to <00:07:57.305>that <00:07:57.585>account.

161
00:07:59.285 --> 00:08:03.505
<00:07:59.284>So <00:07:59.412>this <00:07:59.539>is <00:07:59.666>the <00:07:59.794>very <00:07:59.921>simple <00:08:00.048>starting <00:08:00.175>point, <00:08:00.303>how <00:08:00.430>we <00:08:00.557>might, <00:08:00.684>uh,

162
00:08:03.505 --> 00:08:06.905
<00:08:03.505>think <00:08:03.660>of <00:08:03.816>modeling <00:08:03.971>our <00:08:04.127>entities <00:08:04.282>or <00:08:04.438>objects <00:08:04.593>in <00:08:04.749>the <00:08:04.905>system.

163
00:08:10.105 --> 00:08:14.725
<00:08:10.105>Um, <00:08:10.280>just <00:08:10.455>a <00:08:10.630>quick, <00:08:10.805>uh, <00:08:10.980>interesting, <00:08:11.155>uh, <00:08:11.330>topic <00:08:11.505>maybe

164
00:08:14.825 --> 00:08:16.685
<00:08:14.825>for <00:08:15.525>JavaScript <00:08:16.224>developers,

165
00:08:16.715 --> 00:08:20.725
<00:08:16.715>because <00:08:16.914>I've <00:08:17.114>been <00:08:17.315>Java <00:08:17.515>developer <00:08:17.715>several <00:08:17.914>years <00:08:18.114>ago

166
00:08:20.825 --> 00:08:24.165
<00:08:20.825>for <00:08:20.980>quite <00:08:21.136>a <00:08:21.291>long, <00:08:21.447>and <00:08:21.602>there <00:08:21.758>was <00:08:21.913>always <00:08:22.069>this <00:08:22.224>mismatch

167
00:08:24.165 --> 00:08:26.525
<00:08:24.165>between <00:08:24.398>domain <00:08:24.631>model <00:08:24.865>implementation <00:08:25.098>on <00:08:25.331>the <00:08:25.565>front

168
00:08:26.585 --> 00:08:30.005
<00:08:26.585>and <00:08:26.724>on <00:08:26.864>the <00:08:27.005>backend <00:08:27.145>every <00:08:27.284>time <00:08:27.424>when <00:08:27.565>the <00:08:27.705>property <00:08:27.844>change <00:08:27.984>on

169
00:08:30.005 --> 00:08:31.605
<00:08:30.005>the <00:08:30.284>class <00:08:30.565>in <00:08:30.844>the <00:08:31.125>front <00:08:31.405>end.

170
00:08:31.785 --> 00:08:34.885
<00:08:31.785>Uh, <00:08:31.960>and, <00:08:32.135>uh, <00:08:32.310>we <00:08:32.485>had <00:08:32.660>to <00:08:32.835>sync <00:08:33.010>the <00:08:33.185>backend

171
00:08:34.885 --> 00:08:37.485
<00:08:34.885>and <00:08:35.118>vice <00:08:35.351>versa, <00:08:35.585>every <00:08:35.818>single <00:08:36.051>property <00:08:36.284>change.

172
00:08:38.065 --> 00:08:43.005
<00:08:38.065>And, <00:08:38.265>uh, <00:08:38.465>if <00:08:38.665>we <00:08:38.865>have <00:08:39.065>isomorphic <00:08:39.265>JavaScript, <00:08:39.465>especially

173
00:08:43.005 --> 00:08:45.605
<00:08:43.005>with <00:08:43.238>TypeScript, <00:08:43.471>there <00:08:43.705>is, <00:08:43.938>um, <00:08:44.171>interesting <00:08:44.405>trick.

174
00:08:45.825 --> 00:08:47.885
<00:08:45.825>Uh, <00:08:46.058>if <00:08:46.291>you, <00:08:46.525>for <00:08:46.758>example, <00:08:46.991>use <00:08:47.225>Angular

175
00:08:47.905 --> 00:08:52.205
<00:08:47.905>and <00:08:48.079>Node <00:08:48.255>to <00:08:48.430>share <00:08:48.605>the <00:08:48.780>same <00:08:48.954>physical <00:08:49.130>instance, <00:08:49.305>um,

176
00:08:52.635 --> 00:08:54.685
<00:08:52.635>between <00:08:52.915>those, <00:08:53.194>uh, <00:08:53.475>client <00:08:53.755>and <00:08:54.035>server.

177
00:08:54.865 --> 00:08:57.805
<00:08:54.865>So <00:08:55.065>imagine <00:08:55.265>that <00:08:55.465>you <00:08:55.665>have <00:08:55.865>your <00:08:56.065>node <00:08:56.265>application

178
00:08:57.865 --> 00:09:00.725
<00:08:57.865>and <00:08:58.065>you <00:08:58.265>store <00:08:58.465>your <00:08:58.665>models, <00:08:58.865>like <00:08:59.065>user <00:08:59.265>account,

179
00:09:01.325 --> 00:09:03.725
<00:09:01.325>whatever <00:09:01.480>entities <00:09:01.636>you <00:09:01.791>have <00:09:01.947>in <00:09:02.102>the <00:09:02.258>system <00:09:02.413>on <00:09:02.569>the <00:09:02.725>backend.

180
00:09:03.955 --> 00:09:06.125
<00:09:03.955>Here, <00:09:04.155>you <00:09:04.355>see <00:09:04.555>here <00:09:04.755>they <00:09:04.955>are, <00:09:05.155>uh, <00:09:05.355>listed

181
00:09:06.705 --> 00:09:07.805
<00:09:06.705>and <00:09:06.903>what, <00:09:07.101>what <00:09:07.299>you <00:09:07.497>wanna <00:09:07.694>do.

182
00:09:07.805 --> 00:09:10.165
<00:09:07.805>You <00:09:08.084>don't <00:09:08.364>wanna <00:09:08.645>copy <00:09:08.925>exact <00:09:09.204>files

183
00:09:10.225 --> 00:09:12.045
<00:09:10.225>to <00:09:10.425>your <00:09:10.625>front <00:09:10.825>end, <00:09:11.025>let <00:09:11.225>it <00:09:11.425>be <00:09:11.625>angular.

184
00:09:12.225 --> 00:09:15.125
<00:09:12.225>You <00:09:12.365>just <00:09:12.505>wanna <00:09:12.645>make <00:09:12.785>some <00:09:12.925>extra <00:09:13.065>mapping <00:09:13.205>from <00:09:13.345>your <00:09:13.485>front <00:09:13.625>end

185
00:09:15.155 --> 00:09:17.125
<00:09:15.155>with, <00:09:15.621>uh, <00:09:16.088>paths <00:09:16.555>property

186
00:09:17.475 --> 00:09:21.125
<00:09:17.475>that <00:09:17.708>when <00:09:17.941>you <00:09:18.175>reference <00:09:18.408>models <00:09:18.641>slash <00:09:18.875>whatever,

187
00:09:21.595 --> 00:09:24.685
<00:09:21.595>then <00:09:21.795>you <00:09:21.995>go <00:09:22.195>to <00:09:22.395>your <00:09:22.595>backend <00:09:22.795>application, <00:09:22.995>assuming

188
00:09:24.685 --> 00:09:27.925
<00:09:24.685>that <00:09:24.840>you <00:09:24.996>are <00:09:25.151>using <00:09:25.307>some, <00:09:25.462>uh, <00:09:25.618>kind <00:09:25.773>of <00:09:25.929>mono <00:09:26.084>repository,

189
00:09:28.035 --> 00:09:30.645
<00:09:28.035>that <00:09:28.175>front <00:09:28.314>end <00:09:28.454>and <00:09:28.594>backend <00:09:28.735>are <00:09:28.875>living <00:09:29.015>in <00:09:29.155>the <00:09:29.295>same <00:09:29.435>place.

190
00:09:31.265 --> 00:09:34.405
<00:09:31.265>You <00:09:31.465>can <00:09:31.665>go <00:09:31.865>around <00:09:32.064>to <00:09:32.265>your <00:09:32.465>note <00:09:32.665>implementation

191
00:09:34.505 --> 00:09:37.005
<00:09:34.505>and <00:09:34.660>ask <00:09:34.816>for <00:09:34.971>the <00:09:35.127>models <00:09:35.282>so <00:09:35.438>that <00:09:35.593>you <00:09:35.749>don't <00:09:35.905>have

192
00:09:37.005 --> 00:09:38.405
<00:09:37.005>to <00:09:37.635>replicate <00:09:38.265>stuff.

193
00:09:38.465 --> 00:09:40.045
<00:09:38.465>And <00:09:38.640>as <00:09:38.815>you <00:09:38.990>see <00:09:39.165>on <00:09:39.340>the, <00:09:39.515>on <00:09:39.690>the <00:09:39.865>bottom,

194
00:09:40.485 --> 00:09:44.805
<00:09:40.485>I <00:09:40.640>can <00:09:40.796>import <00:09:40.951>my <00:09:41.107>entity's <00:09:41.262>budget <00:09:41.418>summary <00:09:41.573>here <00:09:41.729>from <00:09:41.885>models.

195
00:09:45.305 --> 00:09:48.525
<00:09:45.305>And <00:09:45.479>now <00:09:45.655>the <00:09:45.829>physical, <00:09:46.005>uh, <00:09:46.180>location <00:09:46.354>is <00:09:46.530>the <00:09:46.704>backend

196
00:09:49.145 --> 00:09:50.885
<00:09:49.145>and <00:09:49.611>angular <00:09:50.078>for <00:09:50.545>application.

197
00:09:50.985 --> 00:09:54.125
<00:09:50.985>The <00:09:51.185>TypeScript <00:09:51.385>application <00:09:51.585>can <00:09:51.785>reference <00:09:51.985>this, <00:09:52.185>these <00:09:52.385>files.

198
00:09:54.465 --> 00:09:56.965
<00:09:54.465>And <00:09:54.698>when <00:09:54.931>Angular <00:09:55.165>would <00:09:55.398>build <00:09:55.631>its <00:09:55.865>bundle,

199
00:09:57.425 --> 00:09:58.845
<00:09:57.425>it <00:09:57.744>will <00:09:58.064>pull <00:09:58.383>those <00:09:58.703>files

200
00:09:59.225 --> 00:10:03.965
<00:09:59.225>and <00:09:59.400>then <00:09:59.575>they <00:09:59.750>will <00:09:59.925>be <00:10:00.100>finally <00:10:00.275>lead, <00:10:00.450>um, <00:10:00.625>finally,

201
00:10:04.625 --> 00:10:06.885
<00:10:04.625>uh, <00:10:04.905>placed <00:10:05.185>in <00:10:05.465>the <00:10:05.745>production <00:10:06.025>bundle.

202
00:10:07.265 --> 00:10:08.805
<00:10:07.265>So <00:10:07.542>you <00:10:07.819>don't <00:10:08.096>have <00:10:08.373>to <00:10:08.651>replicate

203
00:10:08.805 --> 00:10:11.685
<00:10:08.805>that <00:10:09.005>stuff <00:10:09.204>if <00:10:09.405>you <00:10:09.604>do <00:10:09.805>this <00:10:10.005>smart <00:10:10.204>trick.

204
00:10:11.985 --> 00:10:16.615
<00:10:11.985>Uh, <00:10:12.140>if <00:10:12.296>I <00:10:12.451>just, <00:10:12.607>if <00:10:12.762>somebody <00:10:12.918>wants <00:10:13.073>to <00:10:13.229>tell <00:10:13.385>me,

205
00:10:17.035 --> 00:10:18.695
<00:10:17.035>did <00:10:17.235>you <00:10:17.435>know, <00:10:17.635>did <00:10:17.834>you <00:10:18.035>use <00:10:18.235>that <00:10:18.435>trick?

206
00:10:18.695 --> 00:10:20.175
<00:10:18.695>Is <00:10:18.843>it <00:10:18.991>new? <00:10:19.139>Is <00:10:19.287>it <00:10:19.435>useful? <00:10:19.583>What <00:10:19.731>do <00:10:19.879>you <00:10:20.026>think?

207
00:10:20.385 --> 00:10:22.135
<00:10:20.385>Maybe <00:10:20.735>later <00:10:21.085>we'll <00:10:21.435>see, <00:10:21.785>uh,

208
00:10:22.165 --> 00:10:23.855
<00:10:22.165>some <00:10:22.444>comments, <00:10:22.724>but <00:10:23.005>I <00:10:23.285>will <00:10:23.564>continue.

209
00:10:23.925 --> 00:10:25.335
<00:10:23.925>Just <00:10:24.106>tell <00:10:24.287>me <00:10:24.468>what <00:10:24.650>you <00:10:24.831>think <00:10:25.012>about <00:10:25.194>it.

210
00:10:29.305 --> 00:10:31.005
<00:10:29.305>So <00:10:29.771>we <00:10:30.238>move <00:10:30.704>forward.

211
00:10:31.425 --> 00:10:34.925
<00:10:31.425>We, <00:10:31.580>we <00:10:31.736>talked <00:10:31.891>about <00:10:32.047>the <00:10:32.202>case <00:10:32.358>of <00:10:32.513>the, <00:10:32.669>um, <00:10:32.824>application,

212
00:10:35.025 --> 00:10:36.645
<00:10:35.025>the <00:10:35.491>problem, <00:10:35.958>the <00:10:36.425>domain,

213
00:10:37.105 --> 00:10:40.005
<00:10:37.105>and <00:10:37.338>then, <00:10:37.571>um, <00:10:37.805>we <00:10:38.038>are <00:10:38.271>conceptualizing <00:10:38.505>deeper

214
00:10:40.025 --> 00:10:43.335
<00:10:40.025>and <00:10:40.305>deeper <00:10:40.584>now <00:10:40.865>about <00:10:41.145>managing <00:10:41.425>permissions.

215
00:10:43.475 --> 00:10:45.455
<00:10:43.475>So <00:10:43.675>we <00:10:43.875>assume <00:10:44.075>that <00:10:44.275>the <00:10:44.475>user <00:10:44.675>is <00:10:44.875>authenticated.

216
00:10:45.875 --> 00:10:47.615
<00:10:45.875>Now <00:10:46.075>we <00:10:46.275>know <00:10:46.475>that <00:10:46.675>there <00:10:46.875>are <00:10:47.075>different <00:10:47.275>objects

217
00:10:47.725 --> 00:10:48.735
<00:10:47.725>tied <00:10:48.028>to <00:10:48.331>the <00:10:48.634>account.

218
00:10:48.835 --> 00:10:52.615
<00:10:48.835>And <00:10:48.975>how <00:10:49.115>do <00:10:49.255>we <00:10:49.395>actually <00:10:49.535>think <00:10:49.675>about, <00:10:49.815>um, <00:10:49.955>the <00:10:50.095>process <00:10:50.235>of

219
00:10:53.455 --> 00:10:55.495
<00:10:53.455>authorizing <00:10:53.735>operations <00:10:54.015>or <00:10:54.295>giving <00:10:54.575>the <00:10:54.855>permissions?

220
00:10:55.835 --> 00:10:59.775
<00:10:55.835>We <00:10:55.990>may <00:10:56.146>ask, <00:10:56.301>uh, <00:10:56.457>questions <00:10:56.612>like, <00:10:56.768>does <00:10:56.923>the <00:10:57.079>entity <00:10:57.235>belong

221
00:10:59.795 --> 00:11:01.535
<00:10:59.795>to <00:11:00.261>the <00:11:00.728>user's <00:11:01.194>account?

222
00:11:01.535 --> 00:11:03.295
<00:11:01.535>When <00:11:01.768>the <00:11:02.001>query <00:11:02.235>is <00:11:02.468>about <00:11:02.701>some <00:11:02.935>entity,

223
00:11:03.805 --> 00:11:07.095
<00:11:03.805>does <00:11:03.960>the <00:11:04.116>user <00:11:04.271>have <00:11:04.427>the <00:11:04.582>owner <00:11:04.738>already <00:11:04.893>the <00:11:05.049>role, <00:11:05.204>regardless

224
00:11:07.475 --> 00:11:11.295
<00:11:07.475>for, <00:11:07.615>uh, <00:11:07.755>based <00:11:07.895>on <00:11:08.035>the <00:11:08.175>fact <00:11:08.315>that <00:11:08.455>he <00:11:08.595>may, <00:11:08.735>for <00:11:08.875>example,

225
00:11:11.405 --> 00:11:13.255
<00:11:11.405>request <00:11:11.871>deleting <00:11:12.338>some <00:11:12.805>entity?

226
00:11:13.515 --> 00:11:15.055
<00:11:13.515>We <00:11:13.746>may <00:11:13.977>know <00:11:14.208>that <00:11:14.439>we <00:11:14.670>may <00:11:14.901>assume

227
00:11:15.055 --> 00:11:17.215
<00:11:15.055>that <00:11:15.288>reader <00:11:15.521>is <00:11:15.755>not <00:11:15.988>allowed <00:11:16.221>to <00:11:16.454>delete.

228
00:11:17.235 --> 00:11:21.255
<00:11:17.235>He <00:11:17.351>may <00:11:17.468>only <00:11:17.585>just <00:11:17.701>get, <00:11:17.818>are <00:11:17.935>there <00:11:18.051>any <00:11:18.168>other <00:11:18.285>rules <00:11:18.401>that <00:11:18.518>we <00:11:18.635>want

229
00:11:21.255 --> 00:11:24.015
<00:11:21.255>to <00:11:21.455>embody <00:11:21.655>in <00:11:21.855>our, <00:11:22.055>uh, <00:11:22.255>in <00:11:22.455>our <00:11:22.655>system?

230
00:11:27.825 --> 00:11:31.195
<00:11:27.825>Christian <00:11:27.980>Hanson <00:11:28.136>says, <00:11:28.291>I <00:11:28.447>use <00:11:28.602>this <00:11:28.758>trick <00:11:28.913>in <00:11:29.069>my <00:11:29.225>applications.

231
00:11:31.625 --> 00:11:34.555
<00:11:31.625>Nice <00:11:31.780>trick, <00:11:31.936>Peter, <00:11:32.091>buddy. <00:11:32.247>Cool, <00:11:32.402>thank <00:11:32.558>you <00:11:32.713>for <00:11:32.869>your <00:11:33.025>input.

232
00:11:35.015 --> 00:11:36.475
<00:11:35.015>So <00:11:35.672>managing <00:11:36.329>permissions.

233
00:11:39.625 --> 00:11:41.315
<00:11:39.625>Does <00:11:39.858>the <00:11:40.091>entity <00:11:40.325>belong <00:11:40.558>to <00:11:40.791>user <00:11:41.025>account?

234
00:11:41.755 --> 00:11:44.155
<00:11:41.755>I <00:11:41.955>would <00:11:42.155>propose <00:11:42.355>very <00:11:42.555>simple <00:11:42.755>strategy <00:11:42.955>here, <00:11:43.155>or,

235
00:11:44.155 --> 00:11:46.715
<00:11:44.155>or <00:11:44.388>steps <00:11:44.621>a <00:11:44.855>user <00:11:45.088>with <00:11:45.321>id <00:11:45.555>a

236
00:11:47.095 --> 00:11:51.915
<00:11:47.095>and <00:11:47.250>account <00:11:47.406>ID <00:11:47.561>B <00:11:47.717>requests <00:11:47.872>an <00:11:48.028>entity <00:11:48.183>belonging <00:11:48.339>to <00:11:48.495>account

237
00:11:52.265 --> 00:11:53.445
<00:11:52.265>with <00:11:52.796>account <00:11:53.327>IDC.

238
00:11:54.225 --> 00:11:57.805
<00:11:54.225>If <00:11:54.425>those <00:11:54.625>accounts <00:11:54.825>ID <00:11:55.025>match, <00:11:55.225>we <00:11:55.425>say, <00:11:55.625>okay,

239
00:11:58.115 --> 00:12:02.205
<00:11:58.115>because <00:11:58.315>we <00:11:58.515>scope <00:11:58.715>our <00:11:58.915>system, <00:11:59.115>uh, <00:11:59.315>per <00:11:59.515>account,

240
00:12:02.495 --> 00:12:05.045
<00:12:02.495>those <00:12:02.695>entities <00:12:02.895>are <00:12:03.095>under <00:12:03.295>the <00:12:03.495>same <00:12:03.695>umbrella <00:12:03.895>account.

241
00:12:05.385 --> 00:12:09.605
<00:12:05.385>We <00:12:05.525>may <00:12:05.665>say <00:12:05.805>http, <00:12:05.944>okay, <00:12:06.085>otherwise <00:12:06.225>we <00:12:06.365>do <00:12:06.505>htt <00:12:06.645>p <00:12:06.785>unauthorized.

242
00:12:09.895 --> 00:12:12.725
<00:12:09.895>We'll <00:12:10.035>see <00:12:10.175>some <00:12:10.314>examples <00:12:10.454>in <00:12:10.595>the <00:12:10.735>code <00:12:10.875>later <00:12:11.015>on <00:12:11.155>on <00:12:11.295>our

243
00:12:12.915 --> 00:12:14.365
<00:12:12.915>example <00:12:14.220>application.

244
00:12:15.445 --> 00:12:16.825
<00:12:15.445>The, <00:12:15.693>the <00:12:15.941>other <00:12:16.190>question <00:12:16.438>may <00:12:16.687>be,

245
00:12:16.975 --> 00:12:19.905
<00:12:16.975>does <00:12:17.208>the <00:12:17.441>user <00:12:17.675>have <00:12:17.908>proper <00:12:18.141>law <00:12:18.375>role?

246
00:12:20.045 --> 00:12:21.945
<00:12:20.045>In <00:12:20.245>our <00:12:20.444>case, <00:12:20.645>we <00:12:20.844>have <00:12:21.045>owner <00:12:21.245>or <00:12:21.444>reader.

247
00:12:22.405 --> 00:12:25.505
<00:12:22.405>And <00:12:22.545>for <00:12:22.685>example, <00:12:22.824>if <00:12:22.964>the <00:12:23.105>user <00:12:23.245>wants <00:12:23.385>to <00:12:23.525>edit <00:12:23.665>an <00:12:23.805>entity

248
00:12:26.325 --> 00:12:29.505
<00:12:26.325>and <00:12:26.500>the <00:12:26.675>user <00:12:26.850>is <00:12:27.025>x <00:12:27.200>role <00:12:27.375>is <00:12:27.550>X, <00:12:27.725>if

249
00:12:30.725 --> 00:12:34.255
<00:12:30.725>role <00:12:30.900>X <00:12:31.075>is <00:12:31.250>owner, <00:12:31.425>then <00:12:31.600>we <00:12:31.775>say <00:12:31.950>http, <00:12:32.125>okay?

250
00:12:34.445 --> 00:12:36.535
<00:12:34.445>Otherwise <00:12:35.145>HTP <00:12:35.845>unauthorized.

251
00:12:36.535 --> 00:12:38.415
<00:12:36.535>And <00:12:36.709>we <00:12:36.885>do <00:12:37.060>it <00:12:37.235>on <00:12:37.410>the <00:12:37.584>API <00:12:37.760>level, <00:12:37.935>right?

252
00:12:38.415 --> 00:12:41.095
<00:12:38.415>Because <00:12:38.555>we <00:12:38.694>know <00:12:38.834>that <00:12:38.974>the <00:12:39.115>front <00:12:39.255>end <00:12:39.395>can <00:12:39.535>be <00:12:39.675>compromised <00:12:39.814>in

253
00:12:41.095 --> 00:12:42.895
<00:12:41.095>terms <00:12:41.328>of <00:12:41.561>the <00:12:41.795>UI <00:12:42.028>and <00:12:42.261>everything <00:12:42.495>around.

254
00:12:45.925 --> 00:12:48.225
<00:12:45.925>And <00:12:46.125>this <00:12:46.324>is <00:12:46.525>not <00:12:46.724>the, <00:12:46.925>the, <00:12:47.125>the <00:12:47.324>end.

255
00:12:48.375 --> 00:12:52.505
<00:12:48.375>This <00:12:48.502>is <00:12:48.629>not <00:12:48.756>the <00:12:48.884>end <00:12:49.011>of <00:12:49.138>the <00:12:49.265>designing <00:12:49.393>process <00:12:49.520>of <00:12:49.647>the <00:12:49.775>system

256
00:12:52.535 --> 00:12:55.815
<00:12:52.535>because <00:12:52.814>there <00:12:53.094>might <00:12:53.375>be <00:12:53.655>other <00:12:53.935>rules.

257
00:12:56.645 --> 00:12:59.495
<00:12:56.645>Imagine <00:12:56.995>sharing <00:12:57.345>entities <00:12:57.694>between <00:12:58.045>accounts

258
00:12:59.495 --> 00:13:02.135
<00:12:59.495>because <00:12:59.695>who <00:12:59.895>said <00:13:00.095>we <00:13:00.295>want <00:13:00.495>to <00:13:00.695>scope, <00:13:00.895>uh,

259
00:13:02.135 --> 00:13:03.375
<00:13:02.135>those <00:13:02.507>entities <00:13:02.879>per <00:13:03.251>account?

260
00:13:03.375 --> 00:13:05.335
<00:13:03.375>Maybe, <00:13:03.575>uh, <00:13:03.775>we <00:13:03.975>would <00:13:04.175>like <00:13:04.375>to, <00:13:04.575>you <00:13:04.775>know,

261
00:13:05.405 --> 00:13:07.575
<00:13:05.405>imagine <00:13:05.605>a <00:13:05.805>scenario <00:13:06.005>when <00:13:06.204>you <00:13:06.405>write <00:13:06.605>the <00:13:06.805>comment,

262
00:13:08.315 --> 00:13:09.775
<00:13:08.315>you <00:13:08.577>are <00:13:08.840>outer <00:13:09.103>of <00:13:09.366>this <00:13:09.629>comment.

263
00:13:09.875 --> 00:13:11.895
<00:13:09.875>You <00:13:10.075>can <00:13:10.275>edit <00:13:10.475>it, <00:13:10.675>but <00:13:10.875>you <00:13:11.075>allow <00:13:11.275>other

264
00:13:11.895 --> 00:13:13.215
<00:13:11.895>people <00:13:12.192>to <00:13:12.489>read <00:13:12.786>your <00:13:13.083>comment.

265
00:13:13.675 --> 00:13:16.055
<00:13:13.675>So <00:13:13.849>there <00:13:14.025>might <00:13:14.199>be <00:13:14.375>situation <00:13:14.550>when <00:13:14.724>you <00:13:14.900>want <00:13:15.074>to

266
00:13:16.565 --> 00:13:18.695
<00:13:16.565>provide <00:13:16.845>a <00:13:17.125>different <00:13:17.405>system, <00:13:17.685>for <00:13:17.965>example,

267
00:13:18.695 --> 00:13:19.775
<00:13:18.695>sharing <00:13:19.181>those <00:13:19.667>entities.

268
00:13:19.955 --> 00:13:21.255
<00:13:19.955>And <00:13:20.150>then <00:13:20.345>you <00:13:20.540>would <00:13:20.735>need <00:13:20.930>to <00:13:21.125>implement

269
00:13:21.315 --> 00:13:23.255
<00:13:21.315>and <00:13:21.490>first <00:13:21.665>of <00:13:21.840>all, <00:13:22.015>come <00:13:22.190>up <00:13:22.365>with <00:13:22.540>some <00:13:22.715>rules.

270
00:13:23.675 --> 00:13:24.815
<00:13:23.675>For <00:13:23.880>ex <00:13:24.085>example. <00:13:24.290>Yeah, <00:13:24.495>for <00:13:24.701>example,

271
00:13:24.845 --> 00:13:28.175
<00:13:24.845>user <00:13:25.020>can <00:13:25.195>request <00:13:25.370>entities <00:13:25.545>belonging <00:13:25.720>to <00:13:25.895>other <00:13:26.070>users <00:13:26.245>account,

272
00:13:29.325 --> 00:13:30.415
<00:13:29.325>like <00:13:29.652>liking <00:13:29.979>a <00:13:30.305>comment.

273
00:13:30.875 --> 00:13:33.135
<00:13:30.875>So <00:13:31.108>we, <00:13:31.341>we <00:13:31.575>sometimes <00:13:31.808>we <00:13:32.041>don't <00:13:32.275>want

274
00:13:33.135 --> 00:13:34.815
<00:13:33.135>to <00:13:33.485>have <00:13:33.835>this <00:13:34.185>strict <00:13:34.535>boundaries.

275
00:13:35.205 --> 00:13:36.975
<00:13:35.205>Some, <00:13:35.485>some <00:13:35.765>entities <00:13:36.045>may <00:13:36.325>be <00:13:36.605>shared.

276
00:13:40.275 --> 00:13:41.415
<00:13:40.275>So <00:13:40.788>going <00:13:41.300>deeper

277
00:13:41.635 --> 00:13:46.505
<00:13:41.635>and <00:13:41.790>deeper, <00:13:41.946>having <00:13:42.101>in <00:13:42.257>mind <00:13:42.412>what <00:13:42.568>we <00:13:42.723>just, <00:13:42.879>uh, <00:13:43.035>covered,

278
00:13:47.125 --> 00:13:48.945
<00:13:47.125>uh, <00:13:47.475>how <00:13:47.825>can <00:13:48.175>we, <00:13:48.525>um,

279
00:13:49.165 --> 00:13:52.385
<00:13:49.165>design <00:13:49.398>a <00:13:49.631>API <00:13:49.865>like <00:13:50.098>the <00:13:50.331>secure <00:13:50.564>way.

280
00:13:52.685 --> 00:13:55.425
<00:13:52.685>So <00:13:52.840>imagine <00:13:52.996>that <00:13:53.151>there <00:13:53.307>are <00:13:53.462>some <00:13:53.618>parts <00:13:53.773>which <00:13:53.929>does <00:13:54.084>not

281
00:13:55.425 --> 00:13:56.785
<00:13:55.425>require <00:13:56.036>any <00:13:56.649>authorization.

282
00:13:56.965 --> 00:13:59.785
<00:13:56.965>We <00:13:57.140>just <00:13:57.315>a <00:13:57.490>accept <00:13:57.665>every <00:13:57.840>query, <00:13:58.015>don't <00:13:58.190>checking, <00:13:58.365>uh,

283
00:13:59.785 --> 00:14:02.505
<00:13:59.785>for <00:13:59.985>authorization, <00:14:00.185>because <00:14:00.385>for <00:14:00.584>example, <00:14:00.785>first <00:14:00.985>we <00:14:01.185>need

284
00:14:02.505 --> 00:14:06.385
<00:14:02.505>to <00:14:02.632>log <00:14:02.759>in <00:14:02.886>and <00:14:03.014>what <00:14:03.141>I <00:14:03.268>propose <00:14:03.395>is <00:14:03.523>to <00:14:03.650>have <00:14:03.777>special <00:14:03.905>prefixes

285
00:14:07.045 --> 00:14:09.225
<00:14:07.045>for <00:14:07.278>the <00:14:07.511>given <00:14:07.745>zones <00:14:07.978>in <00:14:08.211>the <00:14:08.444>application,

286
00:14:09.435 --> 00:14:12.745
<00:14:09.435>which <00:14:09.668>will <00:14:09.901>help <00:14:10.135>us <00:14:10.368>then <00:14:10.601>implement <00:14:10.834>middlewares

287
00:14:12.745 --> 00:14:15.105
<00:14:12.745>or <00:14:13.025>interceptors, <00:14:13.305>uh, <00:14:13.585>in <00:14:13.865>terms <00:14:14.145>of

288
00:14:15.715 --> 00:14:18.185
<00:14:15.715>processing <00:14:16.065>those <00:14:16.415>rules <00:14:16.765>of <00:14:17.115>permissions.

289
00:14:18.445 --> 00:14:21.385
<00:14:18.445>So <00:14:18.725>for <00:14:19.005>example, <00:14:19.285>authentication, <00:14:19.565>login, <00:14:19.845>signup,

290
00:14:21.495 --> 00:14:25.705
<00:14:21.495>this <00:14:21.622>is <00:14:21.749>API <00:14:21.876>com <00:14:22.004>slash <00:14:22.131>alf, <00:14:22.258>and <00:14:22.385>we <00:14:22.513>are <00:14:22.640>fine <00:14:22.767>with <00:14:22.895>that.

291
00:14:25.845 --> 00:14:29.345
<00:14:25.845>But <00:14:25.972>on <00:14:26.099>the <00:14:26.226>other <00:14:26.354>side, <00:14:26.481>we <00:14:26.608>may <00:14:26.735>have, <00:14:26.863>uh, <00:14:26.990>the <00:14:27.117>app <00:14:27.245>zone,

292
00:14:29.555 --> 00:14:32.625
<00:14:29.555>which <00:14:30.021>requires <00:14:30.488>authorized <00:14:30.954>authorization,

293
00:14:32.975 --> 00:14:34.865
<00:14:32.975>like <00:14:33.325>post <00:14:33.675>API <00:14:34.025>slash <00:14:34.375>app.

294
00:14:35.445 --> 00:14:39.265
<00:14:35.445>We <00:14:35.585>will <00:14:35.725>use <00:14:35.865>app <00:14:36.005>as <00:14:36.145>this <00:14:36.285>prefix <00:14:36.425>for <00:14:36.565>the <00:14:36.705>application <00:14:36.845>level,

295
00:14:39.395 --> 00:14:43.505
<00:14:39.395>layer <00:14:39.569>and <00:14:39.745>entity, <00:14:39.920>whatever <00:14:40.095>you <00:14:40.270>wanna <00:14:40.444>edit, <00:14:40.620>put <00:14:40.795>delete.

296
00:14:43.965 --> 00:14:47.505
<00:14:43.965>You <00:14:44.120>may <00:14:44.276>post <00:14:44.431>an <00:14:44.587>entity, <00:14:44.742>you <00:14:44.898>may <00:14:45.053>get <00:14:45.209>put <00:14:45.365>delete,

297
00:14:47.805 --> 00:14:49.465
<00:14:47.805>and <00:14:47.979>what <00:14:48.155>I <00:14:48.329>call <00:14:48.505>it <00:14:48.680>is <00:14:48.854>a <00:14:49.030>danger <00:14:49.204>zone

298
00:14:49.465 --> 00:14:52.285
<00:14:49.465>after <00:14:49.665>this <00:14:49.865>app, <00:14:50.065>whatever, <00:14:50.265>after <00:14:50.465>this <00:14:50.665>URL <00:14:50.865>comes,

299
00:14:52.355 --> 00:14:56.645
<00:14:52.355>because <00:14:52.482>now <00:14:52.609>we, <00:14:52.736>we <00:14:52.864>have <00:14:52.991>to <00:14:53.118>pay <00:14:53.245>a <00:14:53.373>lot <00:14:53.500>of <00:14:53.627>attention <00:14:53.755>now

300
00:14:56.745 --> 00:15:01.285
<00:14:56.745>to <00:14:56.920>does <00:14:57.095>not <00:14:57.270>allow <00:14:57.445>unauthorized <00:14:57.620>requests <00:14:57.795>coming <00:14:57.970>from <00:14:58.145>strictly

301
00:15:01.685 --> 00:15:04.845
<00:15:01.685>API <00:15:01.840>level, <00:15:01.996>even <00:15:02.151>though <00:15:02.307>our <00:15:02.462>front <00:15:02.618>end <00:15:02.773>doesn't <00:15:02.929>allow <00:15:03.084>that.

302
00:15:08.775 --> 00:15:12.355
<00:15:08.775>And <00:15:08.915>the <00:15:09.055>next <00:15:09.194>concept, <00:15:09.334>which <00:15:09.475>I <00:15:09.615>put <00:15:09.755>at <00:15:09.895>a <00:15:10.035>table <00:15:10.175>so

303
00:15:12.355 --> 00:15:14.195
<00:15:12.355>that <00:15:12.510>then <00:15:12.666>we <00:15:12.821>can <00:15:12.977>glue <00:15:13.132>things <00:15:13.288>together <00:15:13.443>in <00:15:13.599>an <00:15:13.755>example

304
00:15:14.195 --> 00:15:16.155
<00:15:14.195>application <00:15:14.545>is <00:15:14.895>user <00:15:15.245>of <00:15:15.595>object.

305
00:15:16.875 --> 00:15:21.395
<00:15:16.875>Regardless <00:15:17.155>of, <00:15:17.435>uh, <00:15:17.715>the <00:15:17.995>authorization <00:15:18.275>mechanism

306
00:15:21.395 --> 00:15:24.115
<00:15:21.395>or <00:15:21.628>authentication <00:15:21.861>mechanism, <00:15:22.095>you <00:15:22.328>need <00:15:22.561>some <00:15:22.795>way

307
00:15:24.495 --> 00:15:27.395
<00:15:24.495>of <00:15:24.845>conveying <00:15:25.195>some, <00:15:25.545>uh, <00:15:25.895>rights

308
00:15:27.495 --> 00:15:28.795
<00:15:27.495>or <00:15:28.665>so

309
00:15:28.795 --> 00:15:32.515
<00:15:28.795>that <00:15:28.911>the <00:15:29.028>front <00:15:29.145>end <00:15:29.261>can <00:15:29.378>know <00:15:29.495>if <00:15:29.611>the <00:15:29.728>logged <00:15:29.844>in <00:15:29.961>user <00:15:30.078>is <00:15:30.194>an

310
00:15:32.605 --> 00:15:34.395
<00:15:32.605>admin <00:15:33.071>or <00:15:33.538>not <00:15:34.005>admin.

311
00:15:34.615 --> 00:15:36.755
<00:15:34.615>So <00:15:34.790>for <00:15:34.965>example, <00:15:35.140>Paul <00:15:35.315>as <00:15:35.490>a <00:15:35.665>reader, <00:15:35.840>logs <00:15:36.015>in

312
00:15:37.295 --> 00:15:39.315
<00:15:37.295>and <00:15:37.761>depending <00:15:38.228>on <00:15:38.694>the,

313
00:15:39.345 --> 00:15:41.715
<00:15:39.345>depending <00:15:39.578>on <00:15:39.811>the <00:15:40.045>mechanism <00:15:40.278>it <00:15:40.511>may <00:15:40.745>receive,

314
00:15:41.735 --> 00:15:44.035
<00:15:41.735>the <00:15:41.890>front <00:15:42.046>end <00:15:42.201>may <00:15:42.357>receive <00:15:42.512>an <00:15:42.668>object <00:15:42.823>in <00:15:42.979>the <00:15:43.135>response

315
00:15:44.035 --> 00:15:45.755
<00:15:44.035>of <00:15:44.209>the <00:15:44.385>login <00:15:44.560>and <00:15:44.735>store <00:15:44.910>it <00:15:45.084>in <00:15:45.260>a <00:15:45.435>memory.

316
00:15:46.195 --> 00:15:47.475
<00:15:46.195>I <00:15:46.425>call <00:15:46.655>it <00:15:46.886>user <00:15:47.116>out <00:15:47.347>object.

317
00:15:47.935 --> 00:15:51.275
<00:15:47.935>Or <00:15:48.062>if <00:15:48.189>we <00:15:48.316>use <00:15:48.444>tokens, <00:15:48.571>it <00:15:48.698>may <00:15:48.825>be <00:15:48.953>Jason <00:15:49.080>web <00:15:49.207>token <00:15:49.334>that

318
00:15:52.115 --> 00:15:55.275
<00:15:52.115>embodies <00:15:52.395>those <00:15:52.675>information <00:15:52.955>like <00:15:53.235>user <00:15:53.515>ID

319
00:15:55.295 --> 00:15:57.155
<00:15:55.295>or <00:15:55.528>the <00:15:55.761>role <00:15:55.995>that <00:15:56.228>frontend <00:15:56.461>can <00:15:56.694>decode

320
00:15:57.175 --> 00:15:59.835
<00:15:57.175>and <00:15:57.454>know, <00:15:57.734>okay, <00:15:58.015>we <00:15:58.295>have <00:15:58.574>reader

321
00:15:59.945 --> 00:16:01.875
<00:15:59.945>that <00:16:00.225>is <00:16:00.505>currently <00:16:00.785>using <00:16:01.065>the <00:16:01.345>system.

322
00:16:04.665 --> 00:16:06.245
<00:16:04.665>And <00:16:05.015>just <00:16:05.365>a <00:16:05.714>recap, <00:16:06.064>again,

323
00:16:06.355 --> 00:16:08.445
<00:16:06.355>depending <00:16:06.705>on <00:16:07.055>the <00:16:07.405>authorization <00:16:07.755>mechanism,

324
00:16:08.625 --> 00:16:12.605
<00:16:08.625>server <00:16:08.825>will <00:16:09.025>start <00:16:09.225>a <00:16:09.425>session, <00:16:09.625>server, <00:16:09.825>site <00:16:10.025>session

325
00:16:13.185 --> 00:16:14.885
<00:16:13.185>or <00:16:13.535>generate <00:16:13.885>a <00:16:14.234>stateless <00:16:14.584>token.

326
00:16:15.065 --> 00:16:17.805
<00:16:15.065>That's <00:16:15.205>why <00:16:15.345>I <00:16:15.485>made <00:16:15.625>a <00:16:15.765>poll <00:16:15.905>previously. <00:16:16.045>What <00:16:16.185>do <00:16:16.325>you <00:16:16.465>use?

327
00:16:17.805 --> 00:16:19.525
<00:16:17.805>Do <00:16:18.084>you <00:16:18.364>use <00:16:18.645>stateless, <00:16:18.925>uh, <00:16:19.204>tokens

328
00:16:19.525 --> 00:16:22.045
<00:16:19.525>or <00:16:19.805>stateful <00:16:20.084>session <00:16:20.365>with <00:16:20.645>maybe <00:16:20.925>cookies?

329
00:16:22.335 --> 00:16:25.325
<00:16:22.335>There <00:16:22.490>are <00:16:22.646>distinct <00:16:22.801>mechanism, <00:16:22.957>which <00:16:23.112>I <00:16:23.268>will <00:16:23.423>also <00:16:23.579>cover, <00:16:23.735>uh,

330
00:16:25.335 --> 00:16:28.515
<00:16:25.335>later <00:16:26.035>on <00:16:26.735>Angular,

331
00:16:28.655 --> 00:16:31.155
<00:16:28.655>how <00:16:28.829>we <00:16:29.005>can <00:16:29.180>protect <00:16:29.355>routes <00:16:29.530>from <00:16:29.704>our <00:16:29.880>authorized <00:16:30.055>viewing.

332
00:16:31.155 --> 00:16:35.155
<00:16:31.155>Now <00:16:31.262>we <00:16:31.370>go <00:16:31.478>back <00:16:31.585>to <00:16:31.693>the <00:16:31.801>ui, <00:16:31.908>as <00:16:32.016>simple <00:16:32.124>as <00:16:32.231>probably <00:16:32.339>a <00:16:32.447>lot <00:16:32.555>of

333
00:16:35.155 --> 00:16:37.435
<00:16:35.155>of <00:16:35.329>you <00:16:35.505>as <00:16:35.680>this <00:16:35.855>point <00:16:36.030>in <00:16:36.204>time <00:16:36.380>are <00:16:36.555>aware,

334
00:16:37.435 --> 00:16:39.035
<00:16:37.435>we <00:16:37.714>have <00:16:37.994>mechanism <00:16:38.275>of <00:16:38.555>router <00:16:38.834>guards.

335
00:16:39.105 --> 00:16:42.435
<00:16:39.105>Imagine <00:16:39.280>we <00:16:39.455>have <00:16:39.630>the <00:16:39.805>login <00:16:39.980>component, <00:16:40.155>and <00:16:40.330>then, <00:16:40.505>uh,

336
00:16:42.745 --> 00:16:45.395
<00:16:42.745>because <00:16:42.920>the, <00:16:43.095>because <00:16:43.270>we <00:16:43.445>send <00:16:43.620>the <00:16:43.795>user <00:16:43.970>out <00:16:44.145>object,

337
00:16:46.015 --> 00:16:50.635
<00:16:46.015>and <00:16:46.131>now <00:16:46.248>the <00:16:46.365>application <00:16:46.481>is <00:16:46.598>aware <00:16:46.715>if <00:16:46.831>we <00:16:46.948>are <00:16:47.064>locked <00:16:47.181>in <00:16:47.298>or <00:16:47.415>not.

338
00:16:50.655 --> 00:16:52.875
<00:16:50.655>If <00:16:50.795>we're <00:16:50.935>locked <00:16:51.074>in, <00:16:51.214>then <00:16:51.355>who <00:16:51.495>are <00:16:51.635>we <00:16:51.775>locked <00:16:51.915>in <00:16:52.055>with?

339
00:16:52.875 --> 00:16:55.835
<00:16:52.875>What <00:16:53.015>are <00:16:53.155>the <00:16:53.295>rights? <00:16:53.435>And <00:16:53.575>then <00:16:53.715>we <00:16:53.855>can <00:16:53.995>have <00:16:54.135>special <00:16:54.275>objects

340
00:16:55.835 --> 00:16:59.555
<00:16:55.835>that <00:16:55.990>are <00:16:56.146>bound <00:16:56.301>to <00:16:56.457>particular <00:16:56.612>routes <00:16:56.768>on <00:16:56.923>the <00:16:57.079>front <00:16:57.235>end,

341
00:16:59.775 --> 00:17:01.315
<00:16:59.775>for <00:17:00.121>example, <00:17:00.468>to <00:17:00.814>list <00:17:01.161>entities.

342
00:17:01.975 --> 00:17:04.315
<00:17:01.975>Uh, <00:17:02.175>we <00:17:02.375>have <00:17:02.575>a <00:17:02.775>route <00:17:02.975>up <00:17:03.175>slash <00:17:03.375>entities

343
00:17:04.575 --> 00:17:07.475
<00:17:04.575>and <00:17:04.808>we <00:17:05.041>bind <00:17:05.275>special <00:17:05.508>objects, <00:17:05.741>which, <00:17:05.975>uh,

344
00:17:07.475 --> 00:17:09.835
<00:17:07.474>implement <00:17:07.824>methods <00:17:08.175>which <00:17:08.524>says <00:17:08.875>true

345
00:17:09.885 --> 00:17:11.395
<00:17:09.885>false, <00:17:10.156>you <00:17:10.428>can <00:17:10.700>or <00:17:10.972>you <00:17:11.243>cannot.

346
00:17:11.895 --> 00:17:13.755
<00:17:11.895>And <00:17:12.175>these <00:17:12.454>are <00:17:12.734>called <00:17:13.014>router <00:17:13.295>guards,

347
00:17:13.755 --> 00:17:16.155
<00:17:13.755>which <00:17:14.035>implement <00:17:14.315>methods <00:17:14.595>like <00:17:14.875>can <00:17:15.155>activate

348
00:17:16.415 --> 00:17:19.705
<00:17:16.415>or <00:17:16.881>can <00:17:17.348>load <00:17:17.815>there.

349
00:17:19.885 --> 00:17:22.145
<00:17:19.885>Uh, <00:17:20.085>and, <00:17:20.285>and <00:17:20.484>here's <00:17:20.685>a <00:17:20.885>very <00:17:21.085>important <00:17:21.285>note.

350
00:17:22.325 --> 00:17:24.785
<00:17:22.325>Uh, <00:17:22.558>front <00:17:22.791>end <00:17:23.025>can <00:17:23.258>always <00:17:23.491>be <00:17:23.725>compromised.

351
00:17:24.885 --> 00:17:27.185
<00:17:24.885>You <00:17:25.118>should <00:17:25.351>not <00:17:25.585>rely <00:17:25.818>on <00:17:26.051>those <00:17:26.285>mechanisms.

352
00:17:27.245 --> 00:17:29.425
<00:17:27.244>If <00:17:27.478>you <00:17:27.711>think <00:17:27.944>of <00:17:28.178>your <00:17:28.411>backend <00:17:28.645>implementation,

353
00:17:29.425 --> 00:17:32.265
<00:17:29.425>because <00:17:29.552>I <00:17:29.679>can <00:17:29.806>just <00:17:29.934>take <00:17:30.061>your <00:17:30.188>bundle, <00:17:30.315>I <00:17:30.443>can <00:17:30.570>see <00:17:30.697>what <00:17:30.825>is

354
00:17:32.265 --> 00:17:34.065
<00:17:32.265>inside, <00:17:32.440>I <00:17:32.615>can <00:17:32.790>mess <00:17:32.965>around, <00:17:33.140>I <00:17:33.315>can <00:17:33.490>even <00:17:33.665>provide

355
00:17:34.365 --> 00:17:35.585
<00:17:34.365>my <00:17:34.914>own <00:17:35.463>implementation.

356
00:17:35.885 --> 00:17:40.065
<00:17:35.885>So <00:17:36.040>if <00:17:36.196>you <00:17:36.351>want <00:17:36.507>to <00:17:36.662>present <00:17:36.818>some <00:17:36.973>sensitive <00:17:37.129>data, <00:17:37.285>like

357
00:17:41.075 --> 00:17:44.695
<00:17:41.075>the <00:17:41.250>data <00:17:41.425>in <00:17:41.600>your <00:17:41.775>dropdown, <00:17:41.950>whatever <00:17:42.125>you <00:17:42.300>wanna <00:17:42.475>present,

358
00:17:45.275 --> 00:17:47.575
<00:17:45.275>you <00:17:45.450>just <00:17:45.625>can <00:17:45.800>hide <00:17:45.975>this <00:17:46.150>in <00:17:46.325>the <00:17:46.500>front <00:17:46.675>end

359
00:17:47.575 --> 00:17:50.285
<00:17:47.575>and <00:17:47.730>say, <00:17:47.886>this <00:17:48.041>dropdown <00:17:48.197>is <00:17:48.352>not <00:17:48.508>visible <00:17:48.663>on <00:17:48.819>this <00:17:48.975>view,

360
00:17:50.285 --> 00:17:52.965
<00:17:50.285>because <00:17:50.412>I <00:17:50.539>can <00:17:50.666>go <00:17:50.794>to <00:17:50.921>dev <00:17:51.048>tools <00:17:51.175>and <00:17:51.303>I <00:17:51.430>can <00:17:51.557>see <00:17:51.685>it.

361
00:17:53.185 --> 00:17:55.925
<00:17:53.185>So <00:17:53.325>you <00:17:53.465>have <00:17:53.605>to <00:17:53.745>secure, <00:17:53.885>you <00:17:54.024>have <00:17:54.165>to <00:17:54.304>hide <00:17:54.445>your <00:17:54.585>data

362
00:17:55.925 --> 00:17:58.165
<00:17:55.925>behind <00:17:56.205>your, <00:17:56.485>behind <00:17:56.764>the <00:17:57.044>secured <00:17:57.325>API

363
00:17:58.475 --> 00:18:00.045
<00:17:58.475>that <00:17:59.175>requires <00:17:59.875>authorization.

364
00:18:00.585 --> 00:18:01.805
<00:18:00.585>For <00:18:01.134>example, <00:18:01.683>uh,

365
00:18:02.025 --> 00:18:04.765
<00:18:02.025>select <00:18:02.225>options <00:18:02.425>can <00:18:02.625>be <00:18:02.825>easily <00:18:03.025>read <00:18:03.225>even <00:18:03.425>though

366
00:18:04.765 --> 00:18:05.925
<00:18:04.765>you <00:18:05.113>use <00:18:05.461>router <00:18:05.809>guards.

367
00:18:05.925 --> 00:18:08.085
<00:18:05.925>If <00:18:06.080>this <00:18:06.236>component <00:18:06.391>is <00:18:06.547>not <00:18:06.702>visible <00:18:06.858>for <00:18:07.013>the <00:18:07.169>given <00:18:07.325>role,

368
00:18:08.085 --> 00:18:09.925
<00:18:08.085>because <00:18:08.318>I <00:18:08.551>can <00:18:08.785>go <00:18:09.018>inside <00:18:09.251>the <00:18:09.485>source

369
00:18:10.305 --> 00:18:13.385
<00:18:10.305>and <00:18:10.480>see <00:18:10.655>the <00:18:10.830>bundle <00:18:11.005>with <00:18:11.180>dev <00:18:11.355>tools, <00:18:11.530>for <00:18:11.705>example.

370
00:18:15.025 --> 00:18:17.245
<00:18:15.025>So <00:18:15.305>how, <00:18:15.585>how <00:18:15.865>we <00:18:16.145>implement <00:18:16.425>those,

371
00:18:17.315 --> 00:18:19.485
<00:18:17.315>this <00:18:17.595>route <00:18:17.875>routing <00:18:18.155>the <00:18:18.435>similar <00:18:18.715>approach

372
00:18:19.545 --> 00:18:22.365
<00:18:19.545>as <00:18:19.661>we <00:18:19.778>did <00:18:19.895>on <00:18:20.011>the <00:18:20.128>backend, <00:18:20.245>we <00:18:20.361>can <00:18:20.478>resemble <00:18:20.595>on <00:18:20.711>the <00:18:20.828>front <00:18:20.945>end,

373
00:18:22.425 --> 00:18:25.735
<00:18:22.425>we <00:18:22.625>can <00:18:22.825>have <00:18:23.024>this <00:18:23.225>not <00:18:23.425>requiring <00:18:23.625>authorization <00:18:23.825>part

374
00:18:25.835 --> 00:18:27.255
<00:18:25.835>and <00:18:26.261>this <00:18:26.687>application <00:18:27.113>part,

375
00:18:27.385 --> 00:18:29.255
<00:18:27.385>which <00:18:27.735>would <00:18:28.085>have <00:18:28.435>more <00:18:28.785>restrictions.

376
00:18:29.475 --> 00:18:33.495
<00:18:29.475>So <00:18:29.630>for <00:18:29.786>example, <00:18:29.941>login <00:18:30.097>may <00:18:30.252>have <00:18:30.408>out <00:18:30.563>guard, <00:18:30.719>which <00:18:30.875>will,

377
00:18:33.515 --> 00:18:37.695
<00:18:33.515>for <00:18:33.715>example, <00:18:33.915>allow <00:18:34.115>everybody <00:18:34.315>without, <00:18:34.515>um, <00:18:34.715>even <00:18:34.915>out

378
00:18:37.795 --> 00:18:39.535
<00:18:37.795>of <00:18:38.495>authentication <00:18:39.195>authorization.

379
00:18:39.955 --> 00:18:43.055
<00:18:39.955>But <00:18:40.095>in <00:18:40.235>our <00:18:40.375>case, <00:18:40.514>we'll <00:18:40.655>be <00:18:40.794>also <00:18:40.935>even <00:18:41.074>redirecting <00:18:41.215>somebody <00:18:41.355>if

380
00:18:43.055 --> 00:18:45.215
<00:18:43.055>it's <00:18:43.288>already <00:18:43.521>logged <00:18:43.755>into <00:18:43.988>some <00:18:44.221>default <00:18:44.455>path

381
00:18:45.835 --> 00:18:49.015
<00:18:45.835>and <00:18:46.035>pay <00:18:46.235>attention <00:18:46.435>to <00:18:46.635>what <00:18:46.835>we <00:18:47.035>have <00:18:47.235>later.

382
00:18:49.395 --> 00:18:53.615
<00:18:49.395>We <00:18:49.535>have <00:18:49.675>path <00:18:49.815>which <00:18:49.955>is <00:18:50.095>up, <00:18:50.235>and <00:18:50.375>then <00:18:50.514>we <00:18:50.655>have <00:18:50.795>children.

383
00:18:54.235 --> 00:18:57.815
<00:18:54.235>So <00:18:54.468>every <00:18:54.701>application, <00:18:54.935>uh, <00:18:55.168>module <00:18:55.401>that <00:18:55.635>is

384
00:18:57.915 --> 00:19:02.815
<00:18:57.915>behind <00:18:58.148>this <00:18:58.381>app, <00:18:58.615>parent <00:18:58.848>would <00:18:59.081>be <00:18:59.315>protected

385
00:19:02.835 --> 00:19:05.855
<00:19:02.835>by <00:19:03.115>this <00:19:03.395>activate <00:19:03.675>and <00:19:03.955>load <00:19:04.235>guards.

386
00:19:06.235 --> 00:19:10.295
<00:19:06.235>So <00:19:06.409>we <00:19:06.584>put <00:19:06.760>them <00:19:06.935>once <00:19:07.110>we <00:19:07.284>encapsulate <00:19:07.459>entire <00:19:07.635>application,

387
00:19:10.355 --> 00:19:14.455
<00:19:10.355>if <00:19:10.510>it's <00:19:10.666>what <00:19:10.821>we <00:19:10.977>want <00:19:11.132>and <00:19:11.288>everything <00:19:11.443>below <00:19:11.599>is <00:19:11.755>secure

388
00:19:14.715 --> 00:19:18.375
<00:19:14.715>and <00:19:14.889>the <00:19:15.064>way <00:19:15.240>we <00:19:15.415>want <00:19:15.590>to, <00:19:15.764>um, <00:19:15.939>be <00:19:16.115>secure.

389
00:19:18.555 --> 00:19:20.135
<00:19:18.555>And <00:19:18.835>again, <00:19:19.115>having <00:19:19.395>in <00:19:19.675>mind <00:19:19.955>those

390
00:19:20.135 --> 00:19:21.535
<00:19:20.135>front-end <00:19:20.765>restrictions, <00:19:21.395>okay?

391
00:19:21.535 --> 00:19:24.215
<00:19:21.535>Everything <00:19:21.768>should <00:19:22.001>be <00:19:22.235>implemented <00:19:22.468>on <00:19:22.701>the <00:19:22.935>backend.

392
00:19:24.215 --> 00:19:27.215
<00:19:24.215>This <00:19:24.415>is <00:19:24.615>just <00:19:24.814>for <00:19:25.014>the <00:19:25.215>ux, <00:19:25.415>um, <00:19:25.615>thingy

393
00:19:27.215 --> 00:19:28.935
<00:19:27.215>that <00:19:27.415>we <00:19:27.615>can <00:19:27.814>show <00:19:28.014>or <00:19:28.215>hide <00:19:28.415>some <00:19:28.615>parts.

394
00:19:29.985 --> 00:19:34.405
<00:19:29.985>And <00:19:30.125>this, <00:19:30.264>a <00:19:30.405>guard <00:19:30.544>may <00:19:30.685>just <00:19:30.824>check <00:19:30.965>based <00:19:31.104>on <00:19:31.245>this <00:19:31.385>information,

395
00:19:34.545 --> 00:19:35.765
<00:19:34.545>who <00:19:34.764>is <00:19:34.984>locked <00:19:35.203>in <00:19:35.423>or <00:19:35.643>not.

396
00:19:36.065 --> 00:19:37.125
<00:19:36.065>Hey, <00:19:36.303>are <00:19:36.542>you <00:19:36.780>locked <00:19:37.019>in?

397
00:19:37.985 --> 00:19:41.445
<00:19:37.985>So <00:19:38.140>you <00:19:38.296>should <00:19:38.451>not, <00:19:38.607>uh, <00:19:38.762>enter <00:19:38.918>log <00:19:39.073>in <00:19:39.229>path <00:19:39.385>again.

398
00:19:41.745 --> 00:19:44.005
<00:19:41.745>So <00:19:41.919>if <00:19:42.094>you <00:19:42.270>are <00:19:42.445>logged <00:19:42.620>in, <00:19:42.794>please <00:19:42.969>be <00:19:43.145>directed

399
00:19:44.005 --> 00:19:48.005
<00:19:44.005>to <00:19:44.180>initial <00:19:44.355>default <00:19:44.530>path <00:19:44.705>and <00:19:44.880>otherwise <00:19:45.055>we <00:19:45.230>say <00:19:45.405>no.

400
00:19:48.065 --> 00:19:52.085
<00:19:48.065>If <00:19:48.205>you're <00:19:48.345>not <00:19:48.485>locked <00:19:48.625>in, <00:19:48.765>uh, <00:19:48.905>it <00:19:49.045>is <00:19:49.185>you, <00:19:49.325>okay, <00:19:49.465>imagine

401
00:19:52.085 --> 00:19:53.165
<00:19:52.085>that <00:19:52.279>you <00:19:52.473>are <00:19:52.668>not <00:19:52.862>locked <00:19:53.057>in.

402
00:19:53.305 --> 00:19:57.805
<00:19:53.305>So <00:19:53.432>false, <00:19:53.559>false <00:19:53.686>is <00:19:53.814>true, <00:19:53.941>then <00:19:54.068>you <00:19:54.195>can, <00:19:54.323>you <00:19:54.450>are, <00:19:54.577>uh, <00:19:54.705>entitled

403
00:19:57.905 --> 00:20:02.245
<00:19:57.905>to <00:19:58.105>open <00:19:58.305>the <00:19:58.504>login, <00:19:58.705>uh, <00:19:58.905>component <00:19:59.105>login <00:19:59.305>page.

404
00:20:02.825 --> 00:20:04.965
<00:20:02.825>And <00:20:03.291>application <00:20:03.758>guard, <00:20:04.225>uh,

405
00:20:05.025 --> 00:20:07.605
<00:20:05.025>is <00:20:05.258>inverting <00:20:05.491>this <00:20:05.725>condition <00:20:05.958>is <00:20:06.191>saying, <00:20:06.425>okay,

406
00:20:07.625 --> 00:20:09.965
<00:20:07.625>if <00:20:07.765>you <00:20:07.905>are <00:20:08.045>not <00:20:08.185>logged <00:20:08.325>in, <00:20:08.465>sorry, <00:20:08.605>go <00:20:08.745>back <00:20:08.885>to <00:20:09.025>login

407
00:20:10.425 --> 00:20:13.885
<00:20:10.425>and <00:20:10.541>only <00:20:10.658>if <00:20:10.774>you <00:20:10.891>are <00:20:11.008>out <00:20:11.125>service <00:20:11.241>would <00:20:11.358>say <00:20:11.475>you <00:20:11.591>are <00:20:11.708>locked <00:20:11.825>in,

408
00:20:14.355 --> 00:20:17.125
<00:20:14.355>then <00:20:14.555>okay, <00:20:14.755>you <00:20:14.955>can <00:20:15.155>enter <00:20:15.355>the <00:20:15.555>application <00:20:15.755>zone.

409
00:20:17.625 --> 00:20:19.565
<00:20:17.625>The <00:20:17.825>same <00:20:18.025>we <00:20:18.225>do <00:20:18.425>with <00:20:18.625>a <00:20:18.825>can <00:20:19.025>load,

410
00:20:19.595 --> 00:20:23.525
<00:20:19.595>because <00:20:19.722>if <00:20:19.849>some <00:20:19.976>of <00:20:20.104>our <00:20:20.231>parts <00:20:20.358>are <00:20:20.485>lazy <00:20:20.613>loaded, <00:20:20.740>we <00:20:20.867>don't <00:20:20.995>want

411
00:20:23.525 --> 00:20:26.685
<00:20:23.525>to <00:20:23.700>lay, <00:20:23.875>um, <00:20:24.050>eagerly <00:20:24.225>load <00:20:24.400>parts <00:20:24.575>of <00:20:24.750>the <00:20:24.925>system,

412
00:20:26.695 --> 00:20:28.245
<00:20:26.695>which <00:20:26.894>we <00:20:27.093>don't <00:20:27.292>need <00:20:27.492>at <00:20:27.691>the <00:20:27.890>first <00:20:28.090>place.

413
00:20:28.245 --> 00:20:31.685
<00:20:28.245>Which <00:20:28.419>means <00:20:28.594>that, <00:20:28.770>uh, <00:20:28.945>in <00:20:29.120>some <00:20:29.294>cases <00:20:29.469>somebody's <00:20:29.645>trying

414
00:20:31.685 --> 00:20:34.565
<00:20:31.685>to <00:20:31.860>log <00:20:32.034>in <00:20:32.210>to <00:20:32.385>the <00:20:32.560>system <00:20:32.735>and <00:20:32.909>you <00:20:33.085>know,

415
00:20:34.665 --> 00:20:38.725
<00:20:34.665>before <00:20:34.805>it <00:20:34.945>log, <00:20:35.085>uh, <00:20:35.225>the <00:20:35.365>person <00:20:35.504>logs <00:20:35.645>in <00:20:35.784>and <00:20:35.925>it's <00:20:36.065>authorized.

416
00:20:39.105 --> 00:20:42.725
<00:20:39.105>We <00:20:39.280>don't <00:20:39.455>even <00:20:39.630>load <00:20:39.805>those <00:20:39.980>bundles <00:20:40.155>from <00:20:40.330>the <00:20:40.505>backend,

417
00:20:42.815 --> 00:20:43.965
<00:20:42.815>which <00:20:43.073>in <00:20:43.332>the <00:20:43.591>lazy <00:20:43.850>fashion.

418
00:20:46.935 --> 00:20:49.345
<00:20:46.935>And <00:20:47.135>now <00:20:47.335>we <00:20:47.534>are <00:20:47.735>jumping <00:20:47.935>to <00:20:48.135>another <00:20:48.335>concept.

419
00:20:49.925 --> 00:20:53.825
<00:20:49.925>Now <00:20:50.052>we <00:20:50.179>know <00:20:50.306>what <00:20:50.434>are <00:20:50.561>the <00:20:50.688>pieces, <00:20:50.815>uh, <00:20:50.943>of <00:20:51.070>those, <00:20:51.197>um, <00:20:51.325>puzzle.

420
00:20:54.685 --> 00:20:59.155
<00:20:54.685>And <00:20:54.918>now, <00:20:55.151>um, <00:20:55.385>we <00:20:55.618>wanna <00:20:55.851>go <00:20:56.085>back

421
00:20:59.155 --> 00:21:00.355
<00:20:59.155>to <00:20:59.425>your, <00:20:59.695>to <00:20:59.965>the <00:21:00.235>backend.

422
00:21:00.775 --> 00:21:04.495
<00:21:00.775>We <00:21:01.055>have <00:21:01.335>incoming <00:21:01.615>request, <00:21:01.895>no, <00:21:02.175>sorry,

423
00:21:04.495 --> 00:21:05.655
<00:21:04.495>we <00:21:04.668>are <00:21:04.842>still <00:21:05.016>on <00:21:05.191>the <00:21:05.365>front <00:21:05.539>end.

424
00:21:05.955 --> 00:21:09.495
<00:21:05.955>Uh, <00:21:06.082>here <00:21:06.209>we <00:21:06.336>want <00:21:06.464>to <00:21:06.591>attach, <00:21:06.718>uh, <00:21:06.845>if <00:21:06.973>we <00:21:07.100>don't <00:21:07.227>use <00:21:07.355>cookies,

425
00:21:09.675 --> 00:21:13.345
<00:21:09.675>but <00:21:09.830>we <00:21:09.986>use <00:21:10.141>let's <00:21:10.297>say <00:21:10.452>J <00:21:10.608>with <00:21:10.763>tokens, <00:21:10.919>we <00:21:11.075>need

426
00:21:13.345 --> 00:21:17.065
<00:21:13.345>to <00:21:13.520>programmatically <00:21:13.695>attach <00:21:13.870>this <00:21:14.045>token <00:21:14.220>every <00:21:14.395>time <00:21:14.570>we, <00:21:14.745>um,

427
00:21:17.335 --> 00:21:18.505
<00:21:17.335>send <00:21:17.861>outgoing <00:21:18.388>request

428
00:21:18.565 --> 00:21:21.825
<00:21:18.565>and <00:21:18.720>we <00:21:18.876>can <00:21:19.031>use <00:21:19.187>interceptor <00:21:19.342>that <00:21:19.498>based <00:21:19.653>on <00:21:19.809>some <00:21:19.965>lodging.

429
00:21:21.825 --> 00:21:24.225
<00:21:21.825>If <00:21:22.025>our <00:21:22.225>configuration <00:21:22.425>says <00:21:22.625>we <00:21:22.825>are <00:21:23.025>using <00:21:23.225>token,

430
00:21:24.445 --> 00:21:27.305
<00:21:24.445>the <00:21:24.620>token <00:21:24.794>is <00:21:24.970>stored, <00:21:25.145>uh, <00:21:25.320>somewhere <00:21:25.495>in <00:21:25.669>the <00:21:25.845>application,

431
00:21:27.485 --> 00:21:29.225
<00:21:27.485>and <00:21:27.685>then <00:21:27.885>we <00:21:28.084>attach <00:21:28.284>this <00:21:28.485>token <00:21:28.685>to <00:21:28.885>this,

432
00:21:30.185 --> 00:21:31.405
<00:21:30.185>uh, <00:21:30.459>to <00:21:30.734>this, <00:21:31.008>uh, <00:21:31.283>query.

433
00:21:31.625 --> 00:21:34.885
<00:21:31.625>And <00:21:31.800>then, <00:21:31.975>um, <00:21:32.150>it <00:21:32.325>is <00:21:32.500>equipped <00:21:32.675>with <00:21:32.850>this <00:21:33.025>authorization

434
00:21:34.885 --> 00:21:38.365
<00:21:34.885>and <00:21:35.085>authentication, <00:21:35.285>uh, <00:21:35.485>mechanism <00:21:35.685>to, <00:21:35.885>on <00:21:36.085>the <00:21:36.285>way

435
00:21:38.365 --> 00:21:40.165
<00:21:38.365>to <00:21:38.565>the <00:21:38.765>backend <00:21:38.965>on <00:21:39.165>the <00:21:39.365>front <00:21:39.565>end <00:21:39.765>side.

436
00:21:42.335 --> 00:21:45.835
<00:21:42.335>And <00:21:42.615>the <00:21:42.895>similar <00:21:43.175>mechanism <00:21:43.455>of <00:21:43.735>intercepting,

437
00:21:46.185 --> 00:21:48.555
<00:21:46.185>like <00:21:46.385>on <00:21:46.585>frontend <00:21:46.784>in <00:21:46.985>angular <00:21:47.185>we <00:21:47.385>call <00:21:47.585>interceptors.

438
00:21:48.895 --> 00:21:50.715
<00:21:48.895>And <00:21:49.175>since <00:21:49.455>we <00:21:49.735>are <00:21:50.014>using <00:21:50.295>node

439
00:21:50.975 --> 00:21:55.315
<00:21:50.975>and <00:21:51.130>xpress <00:21:51.286>js <00:21:51.441>as <00:21:51.597>an <00:21:51.752>example, <00:21:51.908>the <00:21:52.063>conceptually <00:21:52.219>similar, <00:21:52.375>um,

440
00:21:55.565 --> 00:21:59.735
<00:21:55.565>thing <00:21:55.765>is, <00:21:55.965>um, <00:21:56.165>middlewares, <00:21:56.365>we <00:21:56.565>can <00:21:56.765>register <00:21:56.965>middlewares

441
00:21:59.735 --> 00:22:02.615
<00:21:59.735>that <00:21:59.935>will <00:22:00.135>process <00:22:00.334>one <00:22:00.534>by <00:22:00.735>one <00:22:00.935>the <00:22:01.135>queries

442
00:22:02.635 --> 00:22:04.575
<00:22:02.635>and <00:22:02.868>the <00:22:03.101>what <00:22:03.335>to <00:22:03.568>do <00:22:03.801>with <00:22:04.035>them.

443
00:22:05.035 --> 00:22:08.415
<00:22:05.035>And <00:22:05.210>this <00:22:05.385>is <00:22:05.560>what, <00:22:05.735>uh, <00:22:05.910>what <00:22:06.085>our <00:22:06.260>u <00:22:06.435>uh,

444
00:22:08.535 --> 00:22:10.095
<00:22:08.535>API <00:22:09.001>structure <00:22:09.468>comes <00:22:09.935>in.

445
00:22:10.105 --> 00:22:14.445
<00:22:10.105>Everything <00:22:10.245>after <00:22:10.385>app <00:22:10.525>is <00:22:10.665>danger <00:22:10.805>zone. <00:22:10.945>We <00:22:11.085>need <00:22:11.225>to <00:22:11.365>protect <00:22:11.505>it.

446
00:22:14.445 --> 00:22:17.365
<00:22:14.445>We <00:22:14.645>need <00:22:14.845>to <00:22:15.044>apply <00:22:15.245>the, <00:22:15.445>um, <00:22:15.645>permission, <00:22:15.845>uh,

447
00:22:17.375 --> 00:22:20.645
<00:22:17.375>mechanisms <00:22:17.655>implemented <00:22:17.935>on <00:22:18.215>the <00:22:18.495>actual <00:22:18.775>code.

448
00:22:21.225 --> 00:22:24.645
<00:22:21.225>And <00:22:21.399>in <00:22:21.574>this <00:22:21.750>case, <00:22:21.925>imagine <00:22:22.100>that <00:22:22.274>we <00:22:22.449>have <00:22:22.625>API

449
00:22:24.825 --> 00:22:26.085
<00:22:24.825>to <00:22:25.392>manipulate <00:22:25.959>expenses.

450
00:22:26.665 --> 00:22:30.805
<00:22:26.665>And <00:22:26.781>I, <00:22:26.898>I <00:22:27.014>imp <00:22:27.131>I <00:22:27.248>presented <00:22:27.365>to <00:22:27.481>you <00:22:27.598>two <00:22:27.715>rules <00:22:27.831>in <00:22:27.948>our <00:22:28.065>system.

451
00:22:31.425 --> 00:22:32.845
<00:22:31.425>We <00:22:31.744>have <00:22:32.064>the <00:22:32.383>role <00:22:32.703>and,

452
00:22:33.105 --> 00:22:37.205
<00:22:33.105>and <00:22:33.280>the <00:22:33.455>entity, <00:22:33.630>um, <00:22:33.805>being <00:22:33.980>bound <00:22:34.155>to <00:22:34.330>given <00:22:34.505>account.

453
00:22:37.505 --> 00:22:40.925
<00:22:37.505>So <00:22:37.680>on <00:22:37.855>the <00:22:38.030>top <00:22:38.205>level, <00:22:38.380>whenever <00:22:38.555>there <00:22:38.730>are <00:22:38.905>expenses,

454
00:22:41.485 --> 00:22:44.765
<00:22:41.485>whenever <00:22:41.640>it's <00:22:41.796>post <00:22:41.951>put <00:22:42.107>delete, <00:22:42.262>we <00:22:42.418>first <00:22:42.573>want <00:22:42.729>to <00:22:42.885>check

455
00:22:45.765 --> 00:22:47.635
<00:22:45.765>those <00:22:46.045>middlewares <00:22:46.325>are <00:22:46.605>implemented <00:22:46.885>this <00:22:47.165>way

456
00:22:47.635 --> 00:22:50.395
<00:22:47.635>that <00:22:47.790>you <00:22:47.946>just <00:22:48.101>registered <00:22:48.257>them <00:22:48.412>on <00:22:48.568>the <00:22:48.723>route <00:22:48.879>for <00:22:49.035>expenses.

457
00:22:50.535 --> 00:22:52.435
<00:22:50.535>We <00:22:50.768>just <00:22:51.001>first <00:22:51.235>fire <00:22:51.468>the <00:22:51.701>first <00:22:51.935>middleware.

458
00:22:52.695 --> 00:22:55.275
<00:22:52.695>And <00:22:52.895>this <00:22:53.095>middleware <00:22:53.294>would <00:22:53.495>tell <00:22:53.695>us <00:22:53.895>the <00:22:54.095>chain

459
00:22:55.275 --> 00:22:59.035
<00:22:55.275>of <00:22:55.415>processing <00:22:55.555>can <00:22:55.695>be <00:22:55.835>continued <00:22:55.975>only <00:22:56.115>if <00:22:56.255>this <00:22:56.395>is <00:22:56.535>the <00:22:56.675>leader

460
00:22:59.415 --> 00:23:00.795
<00:22:59.415>and <00:22:59.725>this <00:23:00.036>is <00:23:00.346>the <00:23:00.657>get.

461
00:23:01.055 --> 00:23:02.115
<00:23:01.055>If <00:23:01.373>it's <00:23:01.691>a <00:23:02.009>reader

462
00:23:02.175 --> 00:23:03.195
<00:23:02.175>and <00:23:02.404>it's <00:23:02.634>not <00:23:02.863>get <00:23:03.092>query,

463
00:23:03.525 --> 00:23:05.835
<00:23:03.525>we'll <00:23:03.805>just <00:23:04.085>send <00:23:04.365>unauthorized <00:23:04.645>the <00:23:04.925>same.

464
00:23:05.935 --> 00:23:10.875
<00:23:05.935>The <00:23:06.090>same <00:23:06.246>may <00:23:06.401>be <00:23:06.557>when <00:23:06.712>we <00:23:06.868>manipulate <00:23:07.023>those, <00:23:07.179>uh, <00:23:07.335>expenses.

465
00:23:11.335 --> 00:23:14.955
<00:23:11.335>So <00:23:11.442>imagine <00:23:11.550>I <00:23:11.658>am <00:23:11.765>logged <00:23:11.873>in <00:23:11.981>and <00:23:12.088>I <00:23:12.196>have <00:23:12.304>an <00:23:12.411>account <00:23:12.519>with <00:23:12.627>ID <00:23:12.735>one,

466
00:23:15.575 --> 00:23:19.835
<00:23:15.575>but <00:23:15.691>I <00:23:15.808>send <00:23:15.925>a <00:23:16.041>query <00:23:16.158>to <00:23:16.275>update <00:23:16.391>an <00:23:16.508>account <00:23:16.625>that <00:23:16.741>belongs <00:23:16.858>to, <00:23:16.975>uh,

467
00:23:20.185 --> 00:23:23.035
<00:23:20.185>that, <00:23:20.385>that <00:23:20.585>belongs <00:23:20.784>to <00:23:20.985>account <00:23:21.185>with <00:23:21.385>ID <00:23:21.585>two.

468
00:23:23.615 --> 00:23:25.355
<00:23:23.615>So <00:23:23.848>this <00:23:24.081>shouldn't <00:23:24.315>happen <00:23:24.548>in <00:23:24.781>our <00:23:25.015>system.

469
00:23:25.695 --> 00:23:29.635
<00:23:25.695>And <00:23:25.835>when <00:23:25.975>we <00:23:26.115>have <00:23:26.254>the, <00:23:26.395>the, <00:23:26.534>the <00:23:26.675>layer <00:23:26.814>of <00:23:26.955>this <00:23:27.095>authorization,

470
00:23:29.895 --> 00:23:31.115
<00:23:29.895>we <00:23:30.261>have <00:23:30.627>the <00:23:30.993>middleware,

471
00:23:31.115 --> 00:23:32.915
<00:23:31.115>which <00:23:31.348>is <00:23:31.581>called <00:23:31.815>expense <00:23:32.048>belongs <00:23:32.281>to <00:23:32.515>account.

472
00:23:33.215 --> 00:23:36.595
<00:23:33.215>So <00:23:33.331>this <00:23:33.448>will <00:23:33.564>tell <00:23:33.681>us <00:23:33.798>if <00:23:33.915>the <00:23:34.031>query <00:23:34.148>that <00:23:34.264>is <00:23:34.381>coming <00:23:34.498>in, <00:23:34.615>uh,

473
00:23:36.775 --> 00:23:39.475
<00:23:36.775>can <00:23:36.915>be <00:23:37.055>authorized <00:23:37.195>based <00:23:37.335>on <00:23:37.475>the <00:23:37.615>fact <00:23:37.755>that <00:23:37.895>the <00:23:38.035>user <00:23:38.175>says,

474
00:23:39.675 --> 00:23:41.715
<00:23:39.675>I <00:23:40.024>wanna <00:23:40.375>modify <00:23:40.725>this <00:23:41.075>expense.

475
00:23:41.815 --> 00:23:44.795
<00:23:41.815>So <00:23:41.970>we <00:23:42.126>need <00:23:42.281>to <00:23:42.437>check <00:23:42.592>if <00:23:42.748>that <00:23:42.903>user <00:23:43.059>is <00:23:43.215>bound

476
00:23:44.795 --> 00:23:47.075
<00:23:44.795>to <00:23:45.028>the <00:23:45.261>same <00:23:45.495>account <00:23:45.728>as <00:23:45.961>this <00:23:46.195>expense.

477
00:23:47.695 --> 00:23:48.995
<00:23:47.695>So <00:23:47.987>how <00:23:48.280>can <00:23:48.572>we <00:23:48.864>achieve?

478
00:23:49.015 --> 00:23:51.675
<00:23:49.015>So <00:23:49.170>we, <00:23:49.326>we <00:23:49.481>don't <00:23:49.637>bother <00:23:49.792>implementation <00:23:49.948>details <00:23:50.103>on <00:23:50.259>this <00:23:50.415>level.

479
00:23:52.015 --> 00:23:54.195
<00:23:52.015>We <00:23:52.248>just <00:23:52.481>register <00:23:52.715>those, <00:23:52.948>uh, <00:23:53.181>those <00:23:53.415>rules

480
00:23:54.535 --> 00:23:56.475
<00:23:54.535>and <00:23:54.815>we <00:23:55.095>implement <00:23:55.375>those <00:23:55.655>middleware, <00:23:55.935>uh,

481
00:23:56.475 --> 00:23:58.555
<00:23:56.475>middleware <00:23:57.175>as <00:23:57.875>follows.

482
00:23:58.975 --> 00:24:00.955
<00:23:58.975>We <00:23:59.254>have <00:23:59.534>to <00:23:59.814>have <00:24:00.094>incoming <00:24:00.375>request

483
00:24:01.455 --> 00:24:03.315
<00:24:01.455>and <00:24:01.629>something <00:24:01.804>that <00:24:01.980>can <00:24:02.155>tell <00:24:02.330>us <00:24:02.504>we <00:24:02.679>are <00:24:02.855>done

484
00:24:03.395 --> 00:24:04.635
<00:24:03.395>with <00:24:03.767>processing <00:24:04.139>this <00:24:04.511>request.

485
00:24:04.855 --> 00:24:08.755
<00:24:04.855>So <00:24:04.995>we <00:24:05.135>take <00:24:05.275>the <00:24:05.415>request, <00:24:05.555>we <00:24:05.695>extract <00:24:05.835>the <00:24:05.975>user <00:24:06.115>information, <00:24:06.255>uh,

486
00:24:08.755 --> 00:24:10.915
<00:24:08.755>based <00:24:09.035>on <00:24:09.315>some, <00:24:09.595>um, <00:24:09.875>other <00:24:10.155>implementation,

487
00:24:10.915 --> 00:24:12.035
<00:24:10.915>which <00:24:11.167>is <00:24:11.419>not <00:24:11.671>relevant <00:24:11.923>here,

488
00:24:12.295 --> 00:24:14.915
<00:24:12.295>but <00:24:12.422>we <00:24:12.549>have <00:24:12.676>the <00:24:12.804>user <00:24:12.931>bound <00:24:13.058>to <00:24:13.185>this <00:24:13.313>request <00:24:13.440>that <00:24:13.567>it <00:24:13.695>was,

489
00:24:15.305 --> 00:24:17.635
<00:24:15.305>that <00:24:15.460>I <00:24:15.616>showed <00:24:15.771>you, <00:24:15.927>that <00:24:16.082>the <00:24:16.238>front <00:24:16.393>end <00:24:16.549>need <00:24:16.705>to

490
00:24:18.675 --> 00:24:21.675
<00:24:18.675>bind <00:24:18.850>this <00:24:19.024>information <00:24:19.200>about <00:24:19.375>the <00:24:19.550>user <00:24:19.725>to <00:24:19.899>the <00:24:20.075>query.

491
00:24:21.895 --> 00:24:23.635
<00:24:21.895>And <00:24:22.070>now <00:24:22.245>this <00:24:22.420>request <00:24:22.595>is <00:24:22.770>on <00:24:22.945>the <00:24:23.120>front <00:24:23.295>end,

492
00:24:23.735 --> 00:24:26.675
<00:24:23.735>it <00:24:23.909>is <00:24:24.084>taken <00:24:24.260>into <00:24:24.435>the <00:24:24.610>processing <00:24:24.784>by <00:24:24.959>those <00:24:25.135>middlewares,

493
00:24:26.775 --> 00:24:29.195
<00:24:26.775>and <00:24:26.975>now <00:24:27.175>it <00:24:27.375>is <00:24:27.575>taken <00:24:27.775>by <00:24:27.975>this <00:24:28.175>middleware.

494
00:24:29.455 --> 00:24:33.955
<00:24:29.455>And <00:24:29.582>we <00:24:29.709>ask <00:24:29.836>our <00:24:29.964>repository, <00:24:30.091>Hey, <00:24:30.218>this <00:24:30.345>user <00:24:30.473>is <00:24:30.600>trying <00:24:30.727>to <00:24:30.855>edit

495
00:24:34.785 --> 00:24:37.355
<00:24:34.785>this <00:24:35.018>expense, <00:24:35.251>please <00:24:35.485>give <00:24:35.718>me <00:24:35.951>this <00:24:36.185>expense

496
00:24:37.495 --> 00:24:41.075
<00:24:37.495>and <00:24:37.695>check <00:24:37.895>if <00:24:38.094>those <00:24:38.294>ID <00:24:38.495>account <00:24:38.695>IDs <00:24:38.895>match.

497
00:24:41.895 --> 00:24:43.915
<00:24:41.895>And <00:24:42.095>if <00:24:42.295>they, <00:24:42.495>uh, <00:24:42.695>match, <00:24:42.895>we <00:24:43.095>say, <00:24:43.295>okay,

498
00:24:44.015 --> 00:24:45.115
<00:24:44.015>I'm <00:24:44.345>done <00:24:44.675>with <00:24:45.005>processing.

499
00:24:45.415 --> 00:24:48.115
<00:24:45.415>My, <00:24:45.542>my <00:24:45.669>role <00:24:45.796>is <00:24:45.924>here <00:24:46.051>done. <00:24:46.178>I <00:24:46.305>don't <00:24:46.433>need <00:24:46.560>to <00:24:46.687>check <00:24:46.815>anything.

500
00:24:48.395 --> 00:24:51.475
<00:24:48.395>I <00:24:48.535>check <00:24:48.675>the <00:24:48.815>the <00:24:48.955>belonging <00:24:49.095>to <00:24:49.235>the <00:24:49.375>account <00:24:49.514>and <00:24:49.655>I'm <00:24:49.795>okay.

501
00:24:51.775 --> 00:24:54.635
<00:24:51.775>But <00:24:51.915>if <00:24:52.055>they <00:24:52.195>are <00:24:52.335>different, <00:24:52.475>we <00:24:52.615>are <00:24:52.755>going <00:24:52.895>to <00:24:53.035>say, <00:24:53.175>sorry,

502
00:24:54.635 --> 00:24:56.395
<00:24:54.635>you're <00:24:54.868>not <00:24:55.101>authorized <00:24:55.335>to <00:24:55.568>perform <00:24:55.801>this <00:24:56.035>operation,

503
00:24:56.715 --> 00:24:58.675
<00:24:56.715>HCTP <00:24:57.415>400 <00:24:58.115>free.

504
00:24:59.695 --> 00:25:02.515
<00:24:59.695>So, <00:24:59.850>uh, <00:25:00.006>this <00:25:00.161>is <00:25:00.317>like <00:25:00.472>more, <00:25:00.628>um, <00:25:00.783>on <00:25:00.939>implementation <00:25:01.095>level

505
00:25:06.405 --> 00:25:09.745
<00:25:06.405>and <00:25:06.545>now <00:25:06.685>angular <00:25:06.825>developers, <00:25:06.965>I <00:25:07.105>have <00:25:07.245>some <00:25:07.385>cool <00:25:07.524>stuff <00:25:07.665>for <00:25:07.805>you.

506
00:25:09.825 --> 00:25:11.985
<00:25:09.825>I <00:25:10.025>hope <00:25:10.225>you <00:25:10.425>would <00:25:10.625>like <00:25:10.825>it. <00:25:11.025>Imagine <00:25:11.225>that.

507
00:25:12.165 --> 00:25:14.265
<00:25:12.165>Um, <00:25:12.445>I <00:25:12.725>call <00:25:13.004>it <00:25:13.284>components, <00:25:13.565>uh,

508
00:25:14.335 --> 00:25:15.985
<00:25:14.335>conditional <00:25:15.035>components <00:25:15.735>visibility.

509
00:25:16.335 --> 00:25:19.705
<00:25:16.335>Imagine <00:25:16.510>that <00:25:16.685>we <00:25:16.860>have <00:25:17.035>two <00:25:17.210>roles, <00:25:17.385>reader <00:25:17.560>and <00:25:17.735>owner.

510
00:25:20.005 --> 00:25:22.585
<00:25:20.005>And <00:25:20.160>on <00:25:20.316>the <00:25:20.471>right <00:25:20.627>side <00:25:20.782>you <00:25:20.938>have <00:25:21.093>our <00:25:21.249>example <00:25:21.405>application.

511
00:25:23.005 --> 00:25:25.785
<00:25:23.005>And <00:25:23.145>I'm <00:25:23.285>logged <00:25:23.425>in <00:25:23.565>as <00:25:23.705>a <00:25:23.845>reader, <00:25:23.985>uh, <00:25:24.125>as <00:25:24.265>an <00:25:24.405>owner,

512
00:25:26.245 --> 00:25:29.865
<00:25:26.245>and <00:25:26.385>I <00:25:26.524>am <00:25:26.665>allowed <00:25:26.804>to <00:25:26.945>create <00:25:27.084>new <00:25:27.225>expense <00:25:27.364>in <00:25:27.504>my <00:25:27.645>account.

513
00:25:30.165 --> 00:25:34.545
<00:25:30.165>So <00:25:30.320>my, <00:25:30.476>uh, <00:25:30.631>UI <00:25:30.787>should <00:25:30.942>present <00:25:31.098>the <00:25:31.253>plus <00:25:31.409>button, <00:25:31.565>right?

514
00:25:35.205 --> 00:25:39.425
<00:25:35.205>So <00:25:35.345>usually <00:25:35.485>angular <00:25:35.625>developers <00:25:35.764>do <00:25:35.905>this, <00:25:36.044>okay, <00:25:36.185>I <00:25:36.324>need <00:25:36.465>to <00:25:36.605>show

515
00:25:39.725 --> 00:25:41.145
<00:25:39.725>or <00:25:40.044>hide <00:25:40.364>this <00:25:40.683>UI <00:25:41.003>element.

516
00:25:41.745 --> 00:25:43.145
<00:25:41.745>I <00:25:41.925>need <00:25:42.105>to <00:25:42.284>check <00:25:42.465>who <00:25:42.645>is <00:25:42.825>locked <00:25:43.004>in,

517
00:25:43.285 --> 00:25:46.305
<00:25:43.285>and <00:25:43.440>if <00:25:43.596>it's <00:25:43.751>an <00:25:43.907>owner, <00:25:44.062>then <00:25:44.218>I <00:25:44.373>present <00:25:44.529>this <00:25:44.685>ui.

518
00:25:47.005 --> 00:25:49.825
<00:25:47.005>So <00:25:47.205>we <00:25:47.405>can <00:25:47.605>write <00:25:47.805>some, <00:25:48.005>uh, <00:25:48.205>smart <00:25:48.405>directive,

519
00:25:49.945 --> 00:25:53.945
<00:25:49.945>I <00:25:50.100>call <00:25:50.256>it <00:25:50.411>four <00:25:50.567>roles, <00:25:50.722>which <00:25:50.878>will <00:25:51.033>be <00:25:51.189>structural <00:25:51.345>directive

520
00:25:54.055 --> 00:25:56.825
<00:25:54.055>that <00:25:54.288>would <00:25:54.521>internally <00:25:54.755>be <00:25:54.988>some <00:25:55.221>smart <00:25:55.455>NG

521
00:25:57.375 --> 00:25:59.625
<00:25:57.375>that <00:25:57.725>would <00:25:58.075>encapsulate <00:25:58.425>this <00:25:58.775>logic.

522
00:26:00.205 --> 00:26:04.625
<00:26:00.205>And, <00:26:00.360>uh, <00:26:00.516>it'll <00:26:00.671>internally <00:26:00.827>ask, <00:26:00.982>Hey, <00:26:01.138>who <00:26:01.293>is <00:26:01.449>logged <00:26:01.605>in?

523
00:26:04.805 --> 00:26:07.105
<00:26:04.805>Please <00:26:05.005>give <00:26:05.205>me <00:26:05.405>the, <00:26:05.605>the, <00:26:05.805>the <00:26:06.005>user <00:26:06.205>role.

524
00:26:07.605 --> 00:26:12.225
<00:26:07.605>And <00:26:07.732>then <00:26:07.859>if <00:26:07.986>the <00:26:08.114>user <00:26:08.241>role, <00:26:08.368>uh, <00:26:08.495>matches <00:26:08.623>with <00:26:08.750>the <00:26:08.877>one <00:26:09.005>defined

525
00:26:12.225 --> 00:26:15.825
<00:26:12.225>by, <00:26:12.352>by, <00:26:12.479>by <00:26:12.606>the <00:26:12.734>input <00:26:12.861>of <00:26:12.988>this, <00:26:13.115>uh, <00:26:13.243>of <00:26:13.370>this, <00:26:13.497>uh, <00:26:13.625>directive,

526
00:26:16.215 --> 00:26:19.745
<00:26:16.215>then <00:26:16.495>we <00:26:16.774>say, <00:26:17.054>okay, <00:26:17.334>view <00:26:17.615>container,

527
00:26:20.085 --> 00:26:23.865
<00:26:20.085>create <00:26:20.260>embedded <00:26:20.435>view <00:26:20.610>template <00:26:20.785>draft, <00:26:20.960>which <00:26:21.135>is <00:26:21.310>actually <00:26:21.485>the,

528
00:26:23.935 --> 00:26:27.505
<00:26:23.935>this, <00:26:24.110>uh, <00:26:24.284>element <00:26:24.460>to <00:26:24.635>which <00:26:24.810>this <00:26:24.985>directive <00:26:25.159>is <00:26:25.335>bound.

529
00:26:28.005 --> 00:26:31.705
<00:26:28.005>And <00:26:28.121>you <00:26:28.238>can <00:26:28.355>see <00:26:28.471>it <00:26:28.588>on <00:26:28.705>this, <00:26:28.821>uh, <00:26:28.938>example, <00:26:29.055>I <00:26:29.171>have <00:26:29.288>this <00:26:29.405>bottom

530
00:26:31.705 --> 00:26:35.585
<00:26:31.705>that <00:26:31.860>is, <00:26:32.016>uh, <00:26:32.171>showing <00:26:32.327>me <00:26:32.482>dialogue <00:26:32.638>for <00:26:32.793>adding <00:26:32.949>new <00:26:33.105>expense.

531
00:26:35.765 --> 00:26:39.025
<00:26:35.765>And <00:26:35.905>I <00:26:36.045>don't <00:26:36.185>bother <00:26:36.325>with <00:26:36.465>some <00:26:36.605>ngs, <00:26:36.745>I'm <00:26:36.885>just <00:26:37.025>saying, <00:26:37.165>uh,

532
00:26:39.255 --> 00:26:42.185
<00:26:39.255>more <00:26:39.535>in <00:26:39.815>more, <00:26:40.095>uh, <00:26:40.375>declarative <00:26:40.655>fashion.

533
00:26:42.405 --> 00:26:43.685
<00:26:42.405>In <00:26:42.789>the <00:26:43.173>declarative <00:26:43.557>fashion.

534
00:26:44.285 --> 00:26:47.245
<00:26:44.285>I <00:26:44.460>just <00:26:44.635>declare <00:26:44.810>for <00:26:44.985>which <00:26:45.160>roles <00:26:45.335>this <00:26:45.510>should <00:26:45.685>render.

535
00:26:47.545 --> 00:26:49.565
<00:26:47.545>And <00:26:47.778>I <00:26:48.011>say <00:26:48.245>four <00:26:48.478>roles <00:26:48.711>equals <00:26:48.945>owner.

536
00:26:49.925 --> 00:26:51.085
<00:26:49.925>I <00:26:50.133>can <00:26:50.342>list <00:26:50.551>more <00:26:50.760>of <00:26:50.969>them,

537
00:26:51.305 --> 00:26:53.285
<00:26:51.305>but <00:26:51.480>I <00:26:51.655>don't <00:26:51.830>have <00:26:52.005>to <00:26:52.180>butter <00:26:52.355>with, <00:26:52.530>you <00:26:52.705>know,

538
00:26:53.725 --> 00:26:56.125
<00:26:53.725>checking <00:26:53.958>some <00:26:54.191>service, <00:26:54.425>adding <00:26:54.658>NGF <00:26:54.891>and <00:26:55.125>asking.

539
00:26:56.565 --> 00:26:58.765
<00:26:56.565>I <00:26:56.798>just <00:26:57.031>encapsulated <00:26:57.265>this <00:26:57.498>into <00:26:57.731>conditional <00:26:57.965>components

540
00:26:58.765 --> 00:26:59.965
<00:26:58.765>visibility <00:26:59.845>directive.

541
00:26:59.965 --> 00:27:01.805
<00:26:59.965>And <00:27:00.314>I <00:27:00.665>can <00:27:01.014>direct <00:27:01.365>specify

542
00:27:02.355 --> 00:27:04.485
<00:27:02.355>this <00:27:02.588>should <00:27:02.821>render <00:27:03.055>only <00:27:03.288>if <00:27:03.521>the <00:27:03.755>user

543
00:27:04.655 --> 00:27:05.925
<00:27:04.655>which <00:27:04.883>is <00:27:05.112>locked <00:27:05.340>in <00:27:05.569>is <00:27:05.798>owner.

544
00:27:06.505 --> 00:27:09.005
<00:27:06.505>If <00:27:06.705>I <00:27:06.905>was <00:27:07.105>locked <00:27:07.305>in <00:27:07.505>as <00:27:07.705>a <00:27:07.905>reader,

545
00:27:09.435 --> 00:27:12.925
<00:27:09.435>this <00:27:09.575>plus <00:27:09.715>button <00:27:09.855>here <00:27:09.995>would <00:27:10.135>not <00:27:10.274>render <00:27:10.415>based <00:27:10.554>on <00:27:10.695>the <00:27:10.835>logic

546
00:27:12.985 --> 00:27:14.885
<00:27:12.985>inside <00:27:13.334>of <00:27:13.685>this <00:27:14.034>structural <00:27:14.385>directive.

547
00:27:15.065 --> 00:27:17.285
<00:27:15.065>Let <00:27:15.181>me <00:27:15.298>know <00:27:15.415>in <00:27:15.531>the <00:27:15.648>chat <00:27:15.765>if <00:27:15.881>you <00:27:15.998>have <00:27:16.115>done <00:27:16.231>this <00:27:16.348>this <00:27:16.465>way.

548
00:27:17.625 --> 00:27:19.205
<00:27:17.625>If <00:27:17.905>yes, <00:27:18.185>then <00:27:18.465>I'm <00:27:18.745>super <00:27:19.025>happy.

549
00:27:19.545 --> 00:27:21.125
<00:27:19.545>If <00:27:19.778>not, <00:27:20.011>then <00:27:20.245>I'm <00:27:20.478>also <00:27:20.711>super <00:27:20.945>happy

550
00:27:21.125 --> 00:27:22.565
<00:27:21.125>because <00:27:21.384>you <00:27:21.643>have <00:27:21.902>learned <00:27:22.161>something <00:27:22.421>new

551
00:27:22.565 --> 00:27:25.005
<00:27:22.565>because <00:27:22.740>usually, <00:27:22.915>you <00:27:23.090>know, <00:27:23.265>this <00:27:23.440>is <00:27:23.615>all, <00:27:23.790>you <00:27:23.965>know,

552
00:27:25.005 --> 00:27:28.485
<00:27:25.005>spaghetti <00:27:25.160>ngs, <00:27:25.316>we <00:27:25.471>can <00:27:25.627>make <00:27:25.782>it <00:27:25.938>a <00:27:26.093>little <00:27:26.249>bit <00:27:26.405>more,

553
00:27:28.745 --> 00:27:30.085
<00:27:28.745>um, <00:27:29.951>separated.

554
00:27:30.155 --> 00:27:32.645
<00:27:30.155>Just <00:27:30.295>let <00:27:30.435>me <00:27:30.575>know <00:27:30.715>in <00:27:30.855>the <00:27:30.995>chat <00:27:31.135>and <00:27:31.274>I <00:27:31.415>will <00:27:31.555>continue.

555
00:27:35.915 --> 00:27:38.735
<00:27:35.915>Oh, <00:27:36.055>now <00:27:36.195>it's <00:27:36.335>a <00:27:36.475>demo <00:27:36.615>time. <00:27:36.754>Now <00:27:36.895>it's <00:27:37.034>a <00:27:37.175>demo <00:27:37.315>time.

556
00:27:39.195 --> 00:27:41.615
<00:27:39.195>So <00:27:39.395>I <00:27:39.595>told <00:27:39.794>you <00:27:39.995>everything <00:27:40.195>will <00:27:40.395>be <00:27:40.595>practical.

557
00:27:41.875 --> 00:27:45.695
<00:27:41.875>So, <00:27:41.991>uh, <00:27:42.108>if <00:27:42.225>you <00:27:42.341>want <00:27:42.458>to <00:27:42.575>see, <00:27:42.691>if <00:27:42.808>you <00:27:42.925>want <00:27:43.041>to <00:27:43.158>see, <00:27:43.275>um,

558
00:27:45.915 --> 00:27:48.055
<00:27:45.915>the <00:27:46.090>application <00:27:46.264>that <00:27:46.440>I <00:27:46.615>present, <00:27:46.790>which <00:27:46.965>is <00:27:47.139>called <00:27:47.315>budget,

559
00:27:48.485 --> 00:27:50.415
<00:27:48.485>application <00:27:49.185>budget, <00:27:49.885>angular

560
00:27:50.435 --> 00:27:52.375
<00:27:50.435>and <00:27:50.575>budget <00:27:50.715>node, <00:27:50.855>which <00:27:50.995>is <00:27:51.135>on <00:27:51.274>the <00:27:51.415>backend, <00:27:51.554>if <00:27:51.695>you <00:27:51.835>go

561
00:27:52.375 --> 00:27:55.935
<00:27:52.375>to <00:27:52.515>GitHub <00:27:52.655>to <00:27:52.795>my <00:27:52.935>profile, <00:27:53.075>barter <00:27:53.215>hyen <00:27:53.355>io, <00:27:53.495>you <00:27:53.635>would <00:27:53.775>find

562
00:27:56.475 --> 00:27:58.575
<00:27:56.475>pin <00:27:56.941>repositories, <00:27:57.408>budget, <00:27:57.875>angular,

563
00:27:58.575 --> 00:28:00.175
<00:27:58.575>which <00:27:58.855>is <00:27:59.135>the <00:27:59.415>fronted <00:27:59.695>part <00:27:59.975>budget

564
00:28:00.175 --> 00:28:01.295
<00:28:00.175>know, <00:28:00.376>which <00:28:00.578>is <00:28:00.779>the <00:28:00.981>backend <00:28:01.183>part.

565
00:28:01.675 --> 00:28:06.235
<00:28:01.675>Uh, <00:28:01.830>it <00:28:01.986>happens <00:28:02.141>so <00:28:02.297>that <00:28:02.452>my, <00:28:02.608>uh, <00:28:02.763>GitHub, <00:28:02.919>um, <00:28:03.075>nickname

566
00:28:06.815 --> 00:28:09.395
<00:28:06.815>and <00:28:07.095>uh, <00:28:07.375>Twitter <00:28:07.655>are <00:28:07.935>the <00:28:08.215>same.

567
00:28:09.535 --> 00:28:11.835
<00:28:09.535>So <00:28:09.690>say <00:28:09.846>hi <00:28:10.001>on <00:28:10.157>Twitter <00:28:10.312>if <00:28:10.468>you <00:28:10.623>want <00:28:10.779>Barters <00:28:10.935>io.

568
00:28:12.215 --> 00:28:15.115
<00:28:12.215>And <00:28:12.415>now, <00:28:12.615>uh, <00:28:12.814>we <00:28:13.014>have <00:28:13.215>15 <00:28:13.415>minutes <00:28:13.615>left.

569
00:28:15.875 --> 00:28:17.875
<00:28:15.875>I <00:28:16.050>would <00:28:16.225>like <00:28:16.400>to <00:28:16.575>quickly <00:28:16.750>show <00:28:16.925>you <00:28:17.100>some <00:28:17.275>demo.

570
00:28:18.255 --> 00:28:22.515
<00:28:18.255>So <00:28:18.410>I <00:28:18.566>would <00:28:18.721>need <00:28:18.877>to <00:28:19.032>switch <00:28:19.188>my, <00:28:19.343>uh, <00:28:19.499>screen. <00:28:19.655>Yes.

571
00:28:22.775 --> 00:28:27.195
<00:28:22.775>Uh, <00:28:23.055>Mustafa <00:28:23.335>says, <00:28:23.615>Carola <00:28:23.895>says, <00:28:24.175>yes,

572
00:28:27.335 --> 00:28:29.395
<00:28:27.335>we <00:28:27.685>have <00:28:28.035>used <00:28:28.385>similar <00:28:28.735>directive.

573
00:28:29.425 --> 00:28:32.235
<00:28:29.425>This <00:28:29.580>is <00:28:29.736>great. <00:28:29.891>We <00:28:30.047>can <00:28:30.202>do <00:28:30.358>a <00:28:30.513>map <00:28:30.669>in <00:28:30.825>React

574
00:28:32.235 --> 00:28:33.235
<00:28:32.235>to <00:28:32.534>accomplish <00:28:32.834>the <00:28:33.135>equivalent.

575
00:28:33.515 --> 00:28:36.755
<00:28:33.515>I <00:28:33.642>told <00:28:33.769>you, <00:28:33.896>you <00:28:34.024>can, <00:28:34.151>uh, <00:28:34.278>I <00:28:34.405>I <00:28:34.533>would <00:28:34.660>like, <00:28:34.787>I <00:28:34.915>wanted

576
00:28:36.755 --> 00:28:40.215
<00:28:36.755>to <00:28:36.910>show <00:28:37.066>you <00:28:37.221>some <00:28:37.377>concepts <00:28:37.532>that <00:28:37.688>I <00:28:37.843>present <00:28:37.999>on <00:28:38.155>Angular,

577
00:28:40.435 --> 00:28:44.615
<00:28:40.435>but <00:28:40.575>if, <00:28:40.715>if <00:28:40.855>you <00:28:40.995>are <00:28:41.135>reactor <00:28:41.274>view, <00:28:41.415>you <00:28:41.554>would <00:28:41.695>be <00:28:41.835>able

578
00:28:44.675 --> 00:28:46.615
<00:28:44.675>to <00:28:44.955>port <00:28:45.235>them <00:28:45.514>on <00:28:45.794>the <00:28:46.075>different

579
00:28:46.615 --> 00:28:48.455
<00:28:46.615>technologies <00:28:46.965>regardless <00:28:47.315>of <00:28:47.665>the <00:28:48.015>tool.

580
00:28:48.875 --> 00:28:51.335
<00:28:48.875>So <00:28:49.108>let <00:28:49.341>me <00:28:49.575>show <00:28:49.808>you <00:28:50.041>our <00:28:50.275>demo,

581
00:28:54.035 --> 00:28:57.295
<00:28:54.035>and <00:28:54.151>then <00:28:54.268>if <00:28:54.385>we <00:28:54.501>are <00:28:54.618>on <00:28:54.735>time, <00:28:54.851>I <00:28:54.968>have <00:28:55.085>some <00:28:55.201>bonds <00:28:55.318>for <00:28:55.435>you.

582
00:28:57.385 --> 00:28:59.015
<00:28:57.385>Seven <00:28:57.735>steps <00:28:58.085>to <00:28:58.435>secure <00:28:58.785>applications.

583
00:28:59.155 --> 00:29:03.505
<00:28:59.155>So, <00:28:59.310>um, <00:28:59.466>I <00:28:59.621>have <00:28:59.777>10 <00:28:59.932>minutes, <00:29:00.088>something <00:29:00.243>like <00:29:00.399>10 <00:29:00.555>minutes.

584
00:29:03.645 --> 00:29:04.705
<00:29:03.645>So <00:29:03.883>let <00:29:04.121>me <00:29:04.360>be <00:29:04.599>fast.

585
00:29:05.165 --> 00:29:09.725
<00:29:05.165>By <00:29:05.340>the <00:29:05.514>way, <00:29:05.690>if <00:29:05.865>you <00:29:06.040>go <00:29:06.215>to <00:29:06.389>budget, <00:29:06.565>okay?

586
00:29:11.665 --> 00:29:14.725
<00:29:11.665>If <00:29:11.792>you <00:29:11.919>go <00:29:12.046>to <00:29:12.174>budget, <00:29:12.301>do <00:29:12.428>dev <00:29:12.555>hyphen <00:29:12.683>academy <00:29:12.810>com, <00:29:12.937>you <00:29:13.065>have,

587
00:29:14.825 --> 00:29:19.565
<00:29:14.825>um, <00:29:14.980>the <00:29:15.136>applica, <00:29:15.291>the <00:29:15.447>deployed <00:29:15.602>version <00:29:15.758>we <00:29:15.913>can <00:29:16.069>play <00:29:16.225>around.

588
00:29:19.985 --> 00:29:24.645
<00:29:19.985>But <00:29:20.092>we <00:29:20.200>wanna <00:29:20.308>see, <00:29:20.415>uh, <00:29:20.523>the <00:29:20.631>one <00:29:20.738>that <00:29:20.846>I <00:29:20.954>run <00:29:21.061>on <00:29:21.169>local <00:29:21.277>host <00:29:21.385>port

589
00:29:25.315 --> 00:29:27.245
<00:29:25.315>4, <00:29:25.515>2 <00:29:25.715>0 <00:29:25.915>0, <00:29:26.115>let <00:29:26.315>me <00:29:26.515>log <00:29:26.715>out.

590
00:29:27.865 --> 00:29:31.525
<00:29:27.865>So, <00:29:27.992>uh, <00:29:28.119>we <00:29:28.246>have <00:29:28.374>a <00:29:28.501>lot <00:29:28.628>of <00:29:28.755>cool <00:29:28.883>stuff <00:29:29.010>implemented, <00:29:29.137>like, <00:29:29.265>um,

591
00:29:32.145 --> 00:29:34.965
<00:29:32.145>OpenID <00:29:32.345>Connect, <00:29:32.545>log <00:29:32.745>in <00:29:32.945>with <00:29:33.145>GitHub, <00:29:33.345>sign <00:29:33.545>up,

592
00:29:35.005 --> 00:29:38.605
<00:29:35.005>recover <00:29:35.205>password <00:29:35.405>implicit <00:29:35.605>flow <00:29:35.805>with <00:29:36.005>Google <00:29:36.205>from <00:29:36.405>Identity.

593
00:29:38.825 --> 00:29:40.245
<00:29:38.825>So <00:29:39.144>everything <00:29:39.464>is <00:29:39.783>open <00:29:40.102>source.

594
00:29:41.145 --> 00:29:44.725
<00:29:41.145>So <00:29:41.425>I'm <00:29:41.705>gonna <00:29:41.985>go <00:29:42.264>as <00:29:42.545>john

595
00:29:46.955 --> 00:29:49.125
<00:29:46.955>john <00:29:47.235>up <00:29:47.514>com <00:29:47.794>1, <00:29:48.074>2, <00:29:48.355>3.

596
00:29:50.105 --> 00:29:53.155
<00:29:50.105>And <00:29:50.280>I <00:29:50.455>can <00:29:50.630>see <00:29:50.805>that <00:29:50.980>I <00:29:51.155>have <00:29:51.330>some <00:29:51.505>expenses

597
00:29:54.095 --> 00:29:55.915
<00:29:54.095>and <00:29:54.375>I <00:29:54.655>can <00:29:54.935>modify <00:29:55.215>and <00:29:55.495>delete.

598
00:29:55.935 --> 00:29:57.995
<00:29:55.935>So <00:29:56.168>for <00:29:56.401>example, <00:29:56.635>uh, <00:29:56.868>I <00:29:57.101>have <00:29:57.335>spent

599
00:29:58.935 --> 00:30:00.955
<00:29:58.935>11 <00:29:59.215>bucks <00:29:59.495>on <00:29:59.774>foot <00:30:00.054>in <00:30:00.335>KFC.

600
00:30:01.415 --> 00:30:03.635
<00:30:01.415>No, <00:30:01.570>no, <00:30:01.726>no. <00:30:01.881>Let's <00:30:02.037>say <00:30:02.192>it <00:30:02.348>was <00:30:02.503>just <00:30:02.659>10 <00:30:02.815>bucks.

601
00:30:03.895 --> 00:30:08.355
<00:30:03.895>So <00:30:04.070>I'm <00:30:04.245>gonna <00:30:04.420>save <00:30:04.595>it <00:30:04.770>and <00:30:04.945>everything <00:30:05.120>is <00:30:05.295>successful.

602
00:30:08.525 --> 00:30:13.375
<00:30:08.525>Let's <00:30:08.632>log <00:30:08.740>out <00:30:08.848>and <00:30:08.955>let's <00:30:09.063>log <00:30:09.171>in <00:30:09.278>as, <00:30:09.386>uh, <00:30:09.494>Mike, <00:30:09.601>who <00:30:09.709>is, <00:30:09.817>who <00:30:09.925>is,

603
00:30:13.595 --> 00:30:15.775
<00:30:13.595>uh, <00:30:13.828>also <00:30:14.061>bound <00:30:14.295>to <00:30:14.528>the <00:30:14.761>same <00:30:14.995>account,

604
00:30:15.875 --> 00:30:16.975
<00:30:15.875>but <00:30:16.122>with <00:30:16.370>a <00:30:16.617>different <00:30:16.865>role.

605
00:30:20.905 --> 00:30:24.925
<00:30:20.905>So <00:30:21.021>now <00:30:21.138>you <00:30:21.254>can <00:30:21.371>see <00:30:21.488>that <00:30:21.605>I <00:30:21.721>can <00:30:21.838>see <00:30:21.955>KFCI <00:30:22.071>spend <00:30:22.188>in <00:30:22.305>KFC

606
00:30:25.155 --> 00:30:26.485
<00:30:25.155>food <00:30:25.753>10 <00:30:26.351>bucks.

607
00:30:27.185 --> 00:30:30.045
<00:30:27.185>Uh, <00:30:27.418>cool, <00:30:27.651>but <00:30:27.885>I <00:30:28.118>cannot <00:30:28.351>modify <00:30:28.585>it.

608
00:30:30.425 --> 00:30:34.445
<00:30:30.425>I'm <00:30:30.565>not <00:30:30.705>allowed, <00:30:30.845>UI <00:30:30.985>does <00:30:31.125>not <00:30:31.264>show <00:30:31.405>me, <00:30:31.544>um, <00:30:31.685>the, <00:30:31.825>the,

609
00:30:34.445 --> 00:30:37.485
<00:30:34.445>the <00:30:34.645>tools <00:30:34.845>for <00:30:35.044>modifying <00:30:35.245>it, <00:30:35.445>but <00:30:35.645>I'm <00:30:35.845>smart

610
00:30:37.705 --> 00:30:39.765
<00:30:37.705>and <00:30:37.985>I'm <00:30:38.264>gonna <00:30:38.544>bypass <00:30:38.824>the <00:30:39.105>UI

611
00:30:39.765 --> 00:30:44.725
<00:30:39.765>and <00:30:39.940>I'm <00:30:40.115>going <00:30:40.290>to <00:30:40.465>use, <00:30:40.640>um, <00:30:40.815>HTTP, <00:30:40.990>either <00:30:41.165>postman

612
00:30:44.725 --> 00:30:48.925
<00:30:44.725>or <00:30:44.852>whatever <00:30:44.979>else <00:30:45.106>to <00:30:45.234>fake <00:30:45.361>that <00:30:45.488>I'm <00:30:45.615>able <00:30:45.743>to <00:30:45.870>modify <00:30:45.997>this <00:30:46.125>query.

613
00:30:49.265 --> 00:30:52.805
<00:30:49.265>So <00:30:49.405>what <00:30:49.545>we <00:30:49.685>can <00:30:49.825>do, <00:30:49.965>uh, <00:30:50.105>we <00:30:50.245>are <00:30:50.385>going <00:30:50.525>to, <00:30:50.665>again,

614
00:30:53.055 --> 00:30:54.205
<00:30:53.055>let's <00:30:53.400>go <00:30:53.745>to <00:30:54.090>network.

615
00:30:54.575 --> 00:30:55.965
<00:30:54.575>Let's <00:30:54.992>clean <00:30:55.408>some <00:30:55.826>stuff.

616
00:30:56.975 --> 00:31:00.245
<00:30:56.975>Let's <00:30:57.102>see, <00:30:57.229>what <00:30:57.356>is <00:30:57.484>the <00:30:57.611>query <00:30:57.738>that <00:30:57.865>the <00:30:57.993>owner <00:30:58.120>uses <00:30:58.247>to <00:30:58.375>modify?

617
00:31:06.645 --> 00:31:09.455
<00:31:06.645>Let's <00:31:07.111>go <00:31:07.578>here. <00:31:08.045>Mm-hmm.

618
00:31:10.395 --> 00:31:14.465
<00:31:10.395>And <00:31:10.535>I <00:31:10.675>wanna <00:31:10.815>see <00:31:10.955>what <00:31:11.095>exactly <00:31:11.235>is <00:31:11.375>called <00:31:11.514>to <00:31:11.655>the <00:31:11.795>backend,

619
00:31:14.765 --> 00:31:17.505
<00:31:14.765>and <00:31:14.920>I'm <00:31:15.076>gonna <00:31:15.231>try <00:31:15.387>it <00:31:15.542>as <00:31:15.698>an, <00:31:15.853>as <00:31:16.009>a <00:31:16.165>reader.

620
00:31:17.885 --> 00:31:22.585
<00:31:17.885>So <00:31:18.012>I, <00:31:18.139>I <00:31:18.266>modify <00:31:18.394>it, <00:31:18.521>I <00:31:18.648>change <00:31:18.775>it, <00:31:18.903>uh, <00:31:19.030>100 <00:31:19.157>on <00:31:19.285>KFC.

621
00:31:22.585 --> 00:31:25.505
<00:31:22.585>Today <00:31:22.740>is <00:31:22.896>a <00:31:23.051>good <00:31:23.207>day. <00:31:23.362>So <00:31:23.518>what <00:31:23.673>is <00:31:23.829>happening <00:31:23.985>here?

622
00:31:25.675 --> 00:31:30.025
<00:31:25.675>There <00:31:25.875>is <00:31:26.075>a <00:31:26.274>query <00:31:26.475>to <00:31:26.675>API <00:31:26.875>expenses <00:31:27.075>for,

623
00:31:30.605 --> 00:31:34.385
<00:31:30.605>and <00:31:30.780>then <00:31:30.955>we <00:31:31.130>have, <00:31:31.305>uh, <00:31:31.480>then <00:31:31.655>we <00:31:31.830>have <00:31:32.005>headers,

624
00:31:34.525 --> 00:31:37.465
<00:31:34.525>and <00:31:34.758>I <00:31:34.991>can <00:31:35.225>see <00:31:35.458>authorization <00:31:35.691>header <00:31:35.925>bid.

625
00:31:37.575 --> 00:31:41.865
<00:31:37.575>Perfect. <00:31:37.715>So <00:31:37.855>now <00:31:37.995>we, <00:31:38.135>we <00:31:38.275>know <00:31:38.415>that <00:31:38.555>in <00:31:38.695>order <00:31:38.835>to <00:31:38.975>modify

626
00:31:42.295 --> 00:31:46.865
<00:31:42.295>that <00:31:42.435>expense, <00:31:42.575>I <00:31:42.715>need <00:31:42.855>to <00:31:42.995>execute, <00:31:43.135>put <00:31:43.275>query <00:31:43.415>on <00:31:43.555>that <00:31:43.695>endpoint.

627
00:31:47.085 --> 00:31:50.425
<00:31:47.085>So <00:31:47.192>let <00:31:47.300>me <00:31:47.408>copy <00:31:47.515>it. <00:31:47.623>Let <00:31:47.731>me <00:31:47.838>log <00:31:47.946>out, <00:31:48.054>let <00:31:48.161>me <00:31:48.269>log <00:31:48.377>in <00:31:48.485>again

628
00:31:50.605 --> 00:31:52.505
<00:31:50.605>as <00:31:50.838>a <00:31:51.071>reader <00:31:51.305>who <00:31:51.538>doesn't <00:31:51.771>have <00:31:52.005>rights

629
00:31:52.505 --> 00:31:54.145
<00:31:52.505>to <00:31:52.785>do <00:31:53.065>this, <00:31:53.345>which <00:31:53.625>is <00:31:53.905>Mike.

630
00:32:00.055 --> 00:32:01.625
<00:32:00.055>Okay? <00:32:00.335>Now <00:32:00.615>I'm <00:32:00.895>gonna <00:32:01.175>be <00:32:01.455>smart

631
00:32:01.625 --> 00:32:04.625
<00:32:01.625>and <00:32:01.825>I'm <00:32:02.025>gonna <00:32:02.225>try <00:32:02.425>to <00:32:02.625>modify <00:32:02.825>this <00:32:03.025>endpoint.

632
00:32:05.045 --> 00:32:09.025
<00:32:05.045>So <00:32:05.325>let <00:32:05.605>me <00:32:05.885>show <00:32:06.165>you <00:32:06.445>my

633
00:32:09.955 --> 00:32:13.145
<00:32:09.955>smart, <00:32:10.095>this <00:32:10.235>is <00:32:10.375>the <00:32:10.514>tender <00:32:10.655>client, <00:32:10.794>which <00:32:10.935>is <00:32:11.074>built <00:32:11.215>in, <00:32:11.355>into

634
00:32:13.925 --> 00:32:16.385
<00:32:13.925>the, <00:32:14.391>uh, <00:32:14.858>vs <00:32:15.325>code.

635
00:32:17.125 --> 00:32:19.865
<00:32:17.125>And <00:32:17.241>okay, <00:32:17.358>I'm <00:32:17.475>logged <00:32:17.591>in <00:32:17.708>as <00:32:17.825>a <00:32:17.941>reader, <00:32:18.058>so <00:32:18.175>I <00:32:18.291>need <00:32:18.408>to <00:32:18.525>prove

636
00:32:19.865 --> 00:32:21.225
<00:32:19.865>that <00:32:20.039>I'm <00:32:20.214>the <00:32:20.389>person <00:32:20.564>who <00:32:20.739>I'm <00:32:20.914>logged <00:32:21.089>in.

637
00:32:21.365 --> 00:32:24.585
<00:32:21.365>So <00:32:21.492>I'm <00:32:21.619>gonna <00:32:21.746>go <00:32:21.874>here, <00:32:22.001>I'm <00:32:22.128>gonna <00:32:22.255>take <00:32:22.383>my <00:32:22.510>J <00:32:22.637>web <00:32:22.765>token

638
00:32:25.435 --> 00:32:26.455
<00:32:25.435>and <00:32:25.664>I'm <00:32:25.894>gonna <00:32:26.123>copy <00:32:26.352>it.

639
00:32:28.435 --> 00:32:33.325
<00:32:28.435>I'm <00:32:28.575>gonna <00:32:28.715>add <00:32:28.855>it <00:32:28.995>here. <00:32:29.135>And <00:32:29.274>now <00:32:29.415>let's <00:32:29.554>try <00:32:29.695>to <00:32:29.835>query,

640
00:32:34.615 --> 00:32:38.085
<00:32:34.615>let's <00:32:35.081>get, <00:32:35.548>get <00:32:36.015>expenses

641
00:32:39.135 --> 00:32:40.305
<00:32:39.135>here, <00:32:40.188>okay?

642
00:32:40.485 --> 00:32:45.265
<00:32:40.485>Now, <00:32:40.685>what <00:32:40.885>we <00:32:41.084>have <00:32:41.284>here, <00:32:41.485>It's <00:32:41.685>not <00:32:41.885>probably

643
00:32:45.455 --> 00:32:48.105
<00:32:45.455>what <00:32:45.804>I <00:32:46.155>wanted, <00:32:46.504>but <00:32:46.855>let's

644
00:32:49.565 --> 00:32:53.355
<00:32:49.565>delete <00:32:50.265>no <00:32:50.965>content.

645
00:32:56.025 --> 00:32:57.285
<00:32:56.025>Did <00:32:56.251>I <00:32:56.478>copy <00:32:56.705>the <00:32:56.932>proper <00:32:57.159>one?

646
00:33:05.385 --> 00:33:08.165
<00:33:05.385>Yes. <00:33:05.525>So <00:33:05.665>I <00:33:05.805>copied <00:33:05.945>probably <00:33:06.085>the <00:33:06.225>wrong, <00:33:06.365>uh, <00:33:06.504>Jason <00:33:06.645>Web <00:33:06.785>token.

647
00:33:08.185 --> 00:33:09.965
<00:33:08.185>Let <00:33:08.385>me <00:33:08.585>check <00:33:08.784>because <00:33:08.985>now <00:33:09.185>it's <00:33:09.385>a <00:33:09.585>demo,

648
00:33:10.345 --> 00:33:12.645
<00:33:10.345>f****p, <00:33:10.811>it <00:33:11.278>always <00:33:11.745>happens.

649
00:33:13.385 --> 00:33:18.055
<00:33:13.385>Um, <00:33:13.665>I <00:33:13.945>was <00:33:14.225>locked <00:33:14.504>in. <00:33:14.785>John,

650
00:33:26.125 --> 00:33:29.445
<00:33:26.125>I <00:33:26.300>am <00:33:26.475>logged <00:33:26.650>in <00:33:26.825>as <00:33:27.000>John <00:33:27.175>who <00:33:27.350>is <00:33:27.525>owner,

651
00:33:29.905 --> 00:33:31.205
<00:33:29.905>and <00:33:30.139>Mike <00:33:30.373>is <00:33:30.607>just <00:33:30.841>a <00:33:31.074>reader.

652
00:33:31.795 --> 00:33:34.965
<00:33:31.795>This <00:33:31.950>is <00:33:32.106>also <00:33:32.261>the <00:33:32.417>way <00:33:32.572>we <00:33:32.728>manage, <00:33:32.883>uh, <00:33:33.039>those, <00:33:33.195>uh,

653
00:33:34.995 --> 00:33:36.565
<00:33:34.995>user <00:33:35.344>profiles <00:33:35.695>in <00:33:36.044>the <00:33:36.395>system.

654
00:33:37.115 --> 00:33:39.925
<00:33:37.115>Okay, <00:33:37.270>let's <00:33:37.426>go <00:33:37.581>back <00:33:37.737>to <00:33:37.892>Mike. <00:33:38.048>Maybe <00:33:38.203>I <00:33:38.359>didn't <00:33:38.515>refresh.

655
00:33:41.475 --> 00:33:45.005
<00:33:41.475>Gosh, <00:33:41.615>I <00:33:41.754>copied <00:33:41.895>the <00:33:42.034>Jason <00:33:42.175>web <00:33:42.314>token <00:33:42.455>from <00:33:42.594>the <00:33:42.735>previous <00:33:42.875>query.

656
00:33:46.085 --> 00:33:49.085
<00:33:46.085>I <00:33:46.225>should <00:33:46.365>have <00:33:46.505>used <00:33:46.645>the <00:33:46.785>Jason <00:33:46.925>Web <00:33:47.065>to, <00:33:47.205>so <00:33:47.345>I, <00:33:47.485>I,

657
00:33:49.205 --> 00:33:51.645
<00:33:49.205>I <00:33:49.405>send <00:33:49.605>the <00:33:49.804>request <00:33:50.004>on <00:33:50.205>behalf <00:33:50.405>of <00:33:50.605>owner.

658
00:33:51.865 --> 00:33:53.885
<00:33:51.865>That's, <00:33:52.145>I <00:33:52.425>was <00:33:52.705>allowed <00:33:52.985>to <00:33:53.265>delete.

659
00:33:53.985 --> 00:33:56.485
<00:33:53.985>So <00:33:54.159>the <00:33:54.334>demo <00:33:54.510>gods, <00:33:54.685>where <00:33:54.860>are <00:33:55.034>you <00:33:55.209>demo <00:33:55.385>gods?

660
00:33:56.485 --> 00:33:59.285
<00:33:56.485>I <00:33:56.640>prayed <00:33:56.796>to <00:33:56.951>you, <00:33:57.107>so <00:33:57.262>I <00:33:57.418>didn't <00:33:57.573>have <00:33:57.729>any <00:33:57.885>fuckups.

661
00:33:59.945 --> 00:34:01.085
<00:33:59.945>So <00:34:00.287>let's <00:34:00.629>go <00:34:00.971>back.

662
00:34:01.465 --> 00:34:05.925
<00:34:01.465>Uh, <00:34:01.665>Mike, <00:34:01.865>I <00:34:02.064>didn't <00:34:02.264>use <00:34:02.465>the <00:34:02.665>proper <00:34:02.865>Jason

663
00:34:05.985 --> 00:34:07.805
<00:34:05.985>of <00:34:06.685>Token <00:34:07.385>demo.

664
00:34:08.505 --> 00:34:10.445
<00:34:08.505>Met <00:34:08.785>me. <00:34:09.065>So <00:34:09.345>let's <00:34:09.625>go <00:34:09.905>back.

665
00:34:11.125 --> 00:34:14.475
<00:34:11.125>I <00:34:11.358>should <00:34:11.591>have <00:34:11.824>gone <00:34:12.058>to <00:34:12.291>application, <00:34:12.525>uh,

666
00:34:14.725 --> 00:34:16.635
<00:34:14.725>local <00:34:15.005>storage <00:34:15.284>and <00:34:15.565>use <00:34:15.844>this <00:34:16.125>one.

667
00:34:17.195 --> 00:34:19.835
<00:34:17.195>I, <00:34:17.370>I, <00:34:17.545>I <00:34:17.720>was <00:34:17.895>referring <00:34:18.070>to <00:34:18.245>the <00:34:18.420>previous <00:34:18.595>query

668
00:34:19.975 --> 00:34:23.035
<00:34:19.975>and <00:34:20.091>the <00:34:20.208>JS <00:34:20.324>web <00:34:20.441>token <00:34:20.558>was <00:34:20.674>the <00:34:20.791>one <00:34:20.908>that <00:34:21.025>was <00:34:21.141>used <00:34:21.258>by <00:34:21.375>John.

669
00:34:23.555 --> 00:34:26.835
<00:34:23.554>I <00:34:23.682>should <00:34:23.809>have <00:34:23.936>used <00:34:24.064>that <00:34:24.191>one. <00:34:24.318>That's <00:34:24.445>why <00:34:24.573>it <00:34:24.700>was <00:34:24.827>not <00:34:24.955>working.

670
00:34:27.395 --> 00:34:29.515
<00:34:27.395>I <00:34:27.628>cop. <00:34:27.861>Now, <00:34:28.094>now <00:34:28.328>let's, <00:34:28.561>let's <00:34:28.795>stop.

671
00:34:29.775 --> 00:34:31.995
<00:34:29.775>I'm <00:34:29.975>logging <00:34:30.175>as <00:34:30.375>a <00:34:30.575>mic, <00:34:30.775>I'm <00:34:30.975>a <00:34:31.175>reader.

672
00:34:32.355 --> 00:34:35.635
<00:34:32.355>I <00:34:32.471>should <00:34:32.588>not <00:34:32.705>be <00:34:32.821>able <00:34:32.938>to <00:34:33.054>delete <00:34:33.171>query, <00:34:33.288>uh, <00:34:33.405>or, <00:34:33.521>or, <00:34:33.638>or <00:34:33.755>modify.

673
00:34:35.975 --> 00:34:40.725
<00:34:35.975>So <00:34:36.114>I <00:34:36.255>would <00:34:36.395>use <00:34:36.534>this <00:34:36.674>token <00:34:36.815>that <00:34:36.955>is <00:34:37.094>I <00:34:37.235>refreshed, <00:34:37.375>okay?

674
00:34:43.785 --> 00:34:45.645
<00:34:43.784>Now <00:34:44.065>I'm <00:34:44.344>gonna <00:34:44.625>fake, <00:34:44.904>not <00:34:45.185>fake,

675
00:34:45.705 --> 00:34:48.605
<00:34:45.705>but <00:34:45.880>I'm <00:34:46.054>gonna <00:34:46.230>behave <00:34:46.404>as <00:34:46.580>if <00:34:46.755>I <00:34:46.929>was <00:34:47.105>reader

676
00:34:49.505 --> 00:34:51.495
<00:34:49.505>and <00:34:50.205>query <00:34:50.905>expenses

677
00:34:52.955 --> 00:34:54.335
<00:34:52.955>Or <00:34:54.197>Delete.

678
00:34:54.485 --> 00:34:56.695
<00:34:54.485>What <00:34:54.718>expense <00:34:54.951>do <00:34:55.185>we <00:34:55.418>have <00:34:55.651>left <00:34:55.885>here?

679
00:34:57.145 --> 00:35:00.095
<00:34:57.145>Let's <00:34:57.320>see, <00:34:57.495>what <00:34:57.670>is <00:34:57.845>the <00:34:58.020>idea <00:34:58.195>of <00:34:58.370>this <00:34:58.545>expense?

680
00:35:01.355 --> 00:35:03.815
<00:35:01.355>I'm <00:35:01.821>gonna <00:35:02.288>query, <00:35:02.755>refresh,

681
00:35:03.835 --> 00:35:06.335
<00:35:03.835>and <00:35:04.035>I'm <00:35:04.235>gonna <00:35:04.435>see <00:35:04.635>that <00:35:04.835>when <00:35:05.035>application <00:35:05.235>ask

682
00:35:06.335 --> 00:35:11.335
<00:35:06.335>for <00:35:07.035>expenses, <00:35:07.735>come

683
00:35:13.065 --> 00:35:14.355
<00:35:13.065>What <00:35:13.452>are <00:35:13.839>those <00:35:14.226>expenses?

684
00:35:20.725 --> 00:35:20.805
Hmm,

685
00:35:24.255 --> 00:35:26.265
<00:35:24.255>strange <00:35:24.955>demo <00:35:25.655>guts.

686
00:35:26.265 --> 00:35:30.875
<00:35:26.265>Where <00:35:26.440>are <00:35:26.615>you <00:35:26.790>here? <00:35:26.964>Huh? <00:35:27.140>This <00:35:27.315>is <00:35:27.490>the <00:35:27.665>one.

687
00:35:32.295 --> 00:35:35.955
<00:35:32.295>So <00:35:32.450>we <00:35:32.606>have <00:35:32.761>expense <00:35:32.917>that <00:35:33.072>is <00:35:33.228>bound <00:35:33.383>to <00:35:33.539>account <00:35:33.695>two

688
00:35:36.415 --> 00:35:37.525
<00:35:36.415>and <00:35:36.748>ID <00:35:37.081>is <00:35:37.414>free.

689
00:35:37.955 --> 00:35:41.165
<00:35:37.955>Okay? <00:35:38.110>So <00:35:38.266>I'm <00:35:38.421>gonna <00:35:38.577>try <00:35:38.732>to, <00:35:38.888>this, <00:35:39.043>this <00:35:39.199>has <00:35:39.355>account.

690
00:35:41.355 --> 00:35:45.965
<00:35:41.355>This <00:35:41.495>is <00:35:41.635>Id <00:35:41.775>free, <00:35:41.915>this <00:35:42.055>expense <00:35:42.195>has <00:35:42.335>yes, <00:35:42.475>API <00:35:42.615>expenses, <00:35:42.755>man.

691
00:35:45.965 --> 00:35:48.805
<00:35:45.965>This <00:35:46.105>is <00:35:46.245>not <00:35:46.385>the <00:35:46.525>one, <00:35:46.665>this <00:35:46.805>is <00:35:46.945>the <00:35:47.085>query. <00:35:47.225>API <00:35:47.365>expenses.

692
00:35:49.425 --> 00:35:53.645
<00:35:49.425>So <00:35:49.625>not <00:35:49.825>try <00:35:50.025>to <00:35:50.225>delete <00:35:50.425>this <00:35:50.625>one. <00:35:50.825>Boom.

693
00:35:54.265 --> 00:35:56.645
<00:35:54.265>You <00:35:54.464>are <00:35:54.665>not <00:35:54.865>authorized <00:35:55.065>to <00:35:55.265>perform <00:35:55.464>this <00:35:55.665>operation.

694
00:35:56.645 --> 00:35:59.525
<00:35:56.645>Because <00:35:56.800>I <00:35:56.956>was <00:35:57.111>locked <00:35:57.267>in <00:35:57.422>on <00:35:57.578>behalf <00:35:57.733>of <00:35:57.889>the <00:35:58.045>reader.

695
00:36:00.835 --> 00:36:03.595
<00:36:00.835>I <00:36:01.115>tried <00:36:01.395>to <00:36:01.675>delete <00:36:01.955>the <00:36:02.235>expense,

696
00:36:03.975 --> 00:36:07.235
<00:36:03.975>but <00:36:04.150>my <00:36:04.325>role <00:36:04.500>does <00:36:04.674>not <00:36:04.850>allow <00:36:05.025>me <00:36:05.200>to <00:36:05.375>delete.

697
00:36:07.795 --> 00:36:09.595
<00:36:07.795>Previously, <00:36:08.028>I, <00:36:08.261>I <00:36:08.495>managed <00:36:08.728>to <00:36:08.961>do <00:36:09.195>this

698
00:36:09.595 --> 00:36:14.355
<00:36:09.595>because <00:36:09.770>I <00:36:09.944>wrongly <00:36:10.120>copied <00:36:10.294>the <00:36:10.470>token <00:36:10.645>that <00:36:10.819>was <00:36:10.995>belonging

699
00:36:14.375 --> 00:36:15.475
<00:36:14.375>to <00:36:14.870>the <00:36:15.365>owner.

700
00:36:15.815 --> 00:36:18.915
<00:36:15.815>An <00:36:16.015>owner <00:36:16.215>is <00:36:16.415>allowed <00:36:16.615>to <00:36:16.815>delete <00:36:17.015>those <00:36:17.215>entities.

701
00:36:19.575 --> 00:36:22.555
<00:36:19.575>So <00:36:19.714>now <00:36:19.855>we <00:36:19.995>see, <00:36:20.134>even <00:36:20.274>though <00:36:20.415>I <00:36:20.555>faked <00:36:20.694>the <00:36:20.835>front <00:36:20.975>end,

702
00:36:22.995 --> 00:36:24.875
<00:36:22.995>I <00:36:23.170>the <00:36:23.345>backend <00:36:23.520>said, <00:36:23.694>no, <00:36:23.870>no, <00:36:24.045>no, <00:36:24.220>no, <00:36:24.395>no,

703
00:36:24.925 --> 00:36:26.235
<00:36:24.925>sorry, <00:36:25.219>you <00:36:25.514>are <00:36:25.809>not <00:36:26.104>authorized.

704
00:36:26.535 --> 00:36:28.075
<00:36:26.535>And <00:36:26.812>this <00:36:27.089>was <00:36:27.366>my <00:36:27.643>life <00:36:27.921>demo.

705
00:36:28.575 --> 00:36:32.835
<00:36:28.575>And <00:36:28.714>how <00:36:28.855>much <00:36:28.995>time <00:36:29.134>we <00:36:29.274>have <00:36:29.415>left <00:36:29.555>for <00:36:29.694>the <00:36:29.835>last <00:36:29.975>part?

706
00:36:33.865 --> 00:36:35.155
<00:36:33.865>Five <00:36:34.445>minutes. <00:36:35.026>Perfect.

707
00:36:35.935 --> 00:36:38.875
<00:36:35.935>So <00:36:36.134>now <00:36:36.335>I <00:36:36.535>have <00:36:36.735>a <00:36:36.935>bonus <00:36:37.134>for <00:36:37.335>you.

708
00:36:39.455 --> 00:36:41.995
<00:36:39.455>Uh, <00:36:39.735>we <00:36:40.015>have <00:36:40.295>covered <00:36:40.575>several <00:36:40.855>ideas

709
00:36:42.375 --> 00:36:46.235
<00:36:42.375>and <00:36:42.575>concepts <00:36:42.775>regarding, <00:36:42.975>uh, <00:36:43.175>a <00:36:43.375>role <00:36:43.575>based, <00:36:43.775>uh,

710
00:36:46.545 --> 00:36:47.795
<00:36:46.545>full <00:36:47.107>stack <00:36:47.670>application.

711
00:36:48.095 --> 00:36:51.115
<00:36:48.095>And <00:36:48.234>I <00:36:48.375>wanna <00:36:48.515>show <00:36:48.654>you, <00:36:48.794>uh, <00:36:48.935>a <00:36:49.075>bonus <00:36:49.214>module, <00:36:49.355>which, <00:36:49.495>uh,

712
00:36:51.115 --> 00:36:53.395
<00:36:51.115>if <00:36:51.290>you're <00:36:51.464>into <00:36:51.640>security <00:36:51.814>might <00:36:51.990>be <00:36:52.165>useful <00:36:52.339>for <00:36:52.515>you.

713
00:36:53.455 --> 00:36:54.555
<00:36:53.455>We <00:36:53.702>have <00:36:53.950>five <00:36:54.197>minutes <00:36:54.444>left.

714
00:36:56.295 --> 00:36:58.835
<00:36:56.295>The <00:36:56.435>seven <00:36:56.575>steps, <00:36:56.715>which <00:36:56.855>I <00:36:56.995>believe <00:36:57.135>are <00:36:57.275>useful <00:36:57.415>if <00:36:57.555>you <00:36:57.695>want

715
00:36:58.835 --> 00:37:02.595
<00:36:58.835>to <00:36:58.990>be <00:36:59.146>caught, <00:36:59.301>uh, <00:36:59.457>aware <00:36:59.612>of <00:36:59.768>the <00:36:59.923>different <00:37:00.079>security, <00:37:00.235>um,

716
00:37:02.925 --> 00:37:06.075
<00:37:02.925>risks <00:37:03.100>in <00:37:03.275>your, <00:37:03.450>um, <00:37:03.625>application <00:37:03.800>to <00:37:03.975>make <00:37:04.150>secure <00:37:04.325>applications.

717
00:37:06.245 --> 00:37:07.835
<00:37:06.245>First <00:37:06.525>of <00:37:06.805>all, <00:37:07.085>the <00:37:07.365>fundamentals <00:37:07.645>is

718
00:37:07.835 --> 00:37:10.355
<00:37:07.835>to <00:37:08.115>understand <00:37:08.395>the <00:37:08.675>web <00:37:08.955>security <00:37:09.235>model.

719
00:37:11.175 --> 00:37:14.395
<00:37:11.175>So <00:37:11.375>there <00:37:11.575>are <00:37:11.775>many <00:37:11.975>different <00:37:12.175>aspects <00:37:12.375>of <00:37:12.575>that,

720
00:37:14.465 --> 00:37:17.635
<00:37:14.465>like <00:37:14.698>content <00:37:14.931>security <00:37:15.165>policy, <00:37:15.398>same <00:37:15.631>origin <00:37:15.865>policy,

721
00:37:17.805 --> 00:37:20.435
<00:37:17.805>cross <00:37:18.038>origin, <00:37:18.271>resource <00:37:18.504>sharing, <00:37:18.738>sub <00:37:18.971>resource <00:37:19.205>integrity,

722
00:37:20.935 --> 00:37:24.195
<00:37:20.935>hashes <00:37:21.215>announces, <00:37:21.495>uh, <00:37:21.775>signatures, <00:37:22.055>uh, <00:37:22.335>signatures.

723
00:37:24.335 --> 00:37:28.075
<00:37:24.335>So <00:37:24.510>the <00:37:24.685>web <00:37:24.860>security <00:37:25.035>model <00:37:25.210>is <00:37:25.385>something <00:37:25.560>that <00:37:25.735>conceptualize

724
00:37:28.255 --> 00:37:31.315
<00:37:28.255>how <00:37:28.535>the <00:37:28.815>end <00:37:29.095>and <00:37:29.375>backend <00:37:29.655>communicate,

725
00:37:31.455 --> 00:37:33.555
<00:37:31.455>and <00:37:31.735>what <00:37:32.015>are <00:37:32.295>the <00:37:32.575>different <00:37:32.855>principles

726
00:37:33.555 --> 00:37:34.715
<00:37:33.555>implemented <00:37:33.903>in <00:37:34.251>this <00:37:34.599>model.

727
00:37:35.805 --> 00:37:37.585
<00:37:35.805>The <00:37:36.038>second <00:37:36.271>step <00:37:36.504>is <00:37:36.738>to <00:37:36.971>learn <00:37:37.205>how

728
00:37:37.585 --> 00:37:39.865
<00:37:37.585>to <00:37:37.935>prevent <00:37:38.285>common <00:37:38.635>security <00:37:38.985>vulnerabilities,

729
00:37:40.055 --> 00:37:41.745
<00:37:40.055>because <00:37:40.404>there <00:37:40.754>are <00:37:41.105>many <00:37:41.455>common

730
00:37:41.805 --> 00:37:44.545
<00:37:41.805>and <00:37:41.960>well <00:37:42.116>known <00:37:42.271>yet, <00:37:42.427>uh, <00:37:42.582>even <00:37:42.738>though <00:37:42.893>they <00:37:43.049>are <00:37:43.205>here

731
00:37:44.645 --> 00:37:47.985
<00:37:44.645>for <00:37:44.845>many <00:37:45.045>years, <00:37:45.245>there <00:37:45.445>are <00:37:45.645>still <00:37:45.845>web <00:37:46.045>developers

732
00:37:48.005 --> 00:37:49.865
<00:37:48.005>who <00:37:48.238>have <00:37:48.471>not <00:37:48.705>heard, <00:37:48.938>heard <00:37:49.171>about <00:37:49.405>it,

733
00:37:50.325 --> 00:37:51.345
<00:37:50.325>and <00:37:50.508>if <00:37:50.692>they <00:37:50.875>heard <00:37:51.059>about <00:37:51.243>it,

734
00:37:51.345 --> 00:37:52.825
<00:37:51.345>they <00:37:51.567>don't <00:37:51.788>know <00:37:52.011>how <00:37:52.232>to <00:37:52.455>prevent <00:37:52.676>them.

735
00:37:53.245 --> 00:37:58.185
<00:37:53.245>So <00:37:53.400>oas <00:37:53.556>top <00:37:53.711>10 <00:37:53.867>lists, <00:37:54.022>uh, <00:37:54.178>a <00:37:54.333>lot <00:37:54.489>of <00:37:54.645>common

736
00:37:58.945 --> 00:38:00.145
<00:37:58.945>actually <00:37:59.485>security <00:38:00.025>issues.

737
00:38:00.725 --> 00:38:03.025
<00:38:00.725>For <00:38:00.880>example, <00:38:01.036>cross <00:38:01.191>site <00:38:01.347>scripting, <00:38:01.502>when <00:38:01.658>an <00:38:01.813>attacker <00:38:01.969>is <00:38:02.125>able

738
00:38:03.025 --> 00:38:05.265
<00:38:03.025>to <00:38:03.225>inject <00:38:03.425>some <00:38:03.625>malicious <00:38:03.825>code <00:38:04.025>in <00:38:04.225>your <00:38:04.425>application

739
00:38:05.485 --> 00:38:06.505
<00:38:05.485>and <00:38:05.791>read <00:38:06.097>your <00:38:06.403>cookies,

740
00:38:06.685 --> 00:38:10.065
<00:38:06.685>and <00:38:06.801>if <00:38:06.918>it <00:38:07.035>read <00:38:07.151>your <00:38:07.268>cookies, <00:38:07.384>it <00:38:07.501>may <00:38:07.618>log <00:38:07.735>in <00:38:07.851>on <00:38:07.968>your <00:38:08.085>behalf

741
00:38:10.125 --> 00:38:11.745
<00:38:10.125>and <00:38:10.475>then <00:38:10.825>perform <00:38:11.175>some <00:38:11.525>operation.

742
00:38:13.005 --> 00:38:14.225
<00:38:13.005>Uh, <00:38:13.554>number <00:38:14.103>three.

743
00:38:14.285 --> 00:38:17.025
<00:38:14.285>And <00:38:14.460>if <00:38:14.634>all <00:38:14.810>of <00:38:14.984>those <00:38:15.160>steps, <00:38:15.335>I <00:38:15.509>want <00:38:15.685>you

744
00:38:17.025 --> 00:38:18.345
<00:38:17.025>to <00:38:17.223>focus <00:38:17.421>the <00:38:17.619>most <00:38:17.817>on <00:38:18.015>this <00:38:18.212>one

745
00:38:18.345 --> 00:38:20.385
<00:38:18.345>because <00:38:18.578>this <00:38:18.811>is <00:38:19.044>like <00:38:19.278>really <00:38:19.511>fundamental <00:38:19.745>one.

746
00:38:20.725 --> 00:38:23.985
<00:38:20.725>You <00:38:20.924>have <00:38:21.125>to <00:38:21.325>choose <00:38:21.525>a <00:38:21.725>proper <00:38:21.924>authorization <00:38:22.125>architecture.

747
00:38:24.845 --> 00:38:28.965
<00:38:24.845>And <00:38:25.000>we <00:38:25.156>have, <00:38:25.311>um, <00:38:25.467>two <00:38:25.622>perspectives <00:38:25.778>from, <00:38:25.933>uh, <00:38:26.089>from <00:38:26.245>the

748
00:38:29.625 --> 00:38:32.125
<00:38:29.625>origin <00:38:30.091>or <00:38:30.558>deployment <00:38:31.025>perspective

749
00:38:32.505 --> 00:38:33.805
<00:38:32.505>or <00:38:32.797>from <00:38:33.090>the <00:38:33.382>state <00:38:33.674>perspective.

750
00:38:34.265 --> 00:38:36.245
<00:38:34.265>You <00:38:34.615>can <00:38:34.964>choose <00:38:35.315>different <00:38:35.665>architectures

751
00:38:36.245 --> 00:38:39.405
<00:38:36.245>for <00:38:36.420>your <00:38:36.595>authorization <00:38:36.770>mechanism <00:38:36.944>from <00:38:37.120>the <00:38:37.295>origin <00:38:37.470>or, <00:38:37.645>or,

752
00:38:39.405 --> 00:38:40.525
<00:38:39.405>or <00:38:39.741>the <00:38:40.077>deployment <00:38:40.413>perspective.

753
00:38:40.785 --> 00:38:43.165
<00:38:40.785>You <00:38:41.018>may <00:38:41.251>have <00:38:41.484>simple <00:38:41.718>same <00:38:41.951>origin <00:38:42.185>websites,

754
00:38:43.385 --> 00:38:44.525
<00:38:43.385>and <00:38:43.641>that's <00:38:43.898>a <00:38:44.154>no <00:38:44.411>brainer.

755
00:38:44.625 --> 00:38:47.835
<00:38:44.625>If <00:38:44.752>you <00:38:44.879>use, <00:38:45.006>if <00:38:45.134>you <00:38:45.261>can, <00:38:45.388>if <00:38:45.515>you <00:38:45.643>can <00:38:45.770>use <00:38:45.897>cookies, <00:38:46.025>uh,

756
00:38:48.015 --> 00:38:51.555
<00:38:48.015>and <00:38:48.170>you <00:38:48.326>have <00:38:48.481>the <00:38:48.637>same <00:38:48.792>origin <00:38:48.948>boundary, <00:38:49.103>H <00:38:49.259>tt <00:38:49.415>P,

757
00:38:51.555 --> 00:38:55.675
<00:38:51.555>only <00:38:51.730>those <00:38:51.904>secure <00:38:52.080>cookies, <00:38:52.254>same <00:38:52.430>origin, <00:38:52.605>you <00:38:52.779>are, <00:38:52.955>uh,

758
00:38:55.865 --> 00:38:58.075
<00:38:55.865>this <00:38:56.040>is <00:38:56.214>in <00:38:56.390>most <00:38:56.564>cases <00:38:56.740>the <00:38:56.915>most <00:38:57.089>secure <00:38:57.265>way.

759
00:38:58.935 --> 00:39:00.595
<00:38:58.935>If <00:38:59.285>you <00:38:59.634>have <00:38:59.985>distributed <00:39:00.335>deployment,

760
00:39:00.705 --> 00:39:03.075
<00:39:00.705>that <00:39:01.171>authorization <00:39:01.638>server <00:39:02.105>application,

761
00:39:03.275 --> 00:39:05.995
<00:39:03.275>API <00:39:03.475>are <00:39:03.675>are <00:39:03.875>hosted <00:39:04.075>on <00:39:04.275>the <00:39:04.475>different <00:39:04.675>domains.

762
00:39:06.255 --> 00:39:07.755
<00:39:06.255>You <00:39:06.592>have <00:39:06.930>same <00:39:07.267>origin <00:39:07.605>boundary

763
00:39:07.935 --> 00:39:10.755
<00:39:07.935>and <00:39:08.168>cookies <00:39:08.401>may <00:39:08.634>not <00:39:08.868>be, <00:39:09.101>uh, <00:39:09.335>feasible.

764
00:39:10.895 --> 00:39:12.435
<00:39:10.895>So <00:39:11.126>you <00:39:11.357>need <00:39:11.587>to <00:39:11.819>use <00:39:12.050>some <00:39:12.281>tokens

765
00:39:12.555 --> 00:39:14.395
<00:39:12.555>because <00:39:12.835>cookies <00:39:13.115>cannot <00:39:13.395>cross <00:39:13.674>those <00:39:13.955>boundaries.

766
00:39:14.855 --> 00:39:18.435
<00:39:14.855>And <00:39:15.030>you <00:39:15.205>may <00:39:15.380>use <00:39:15.555>some, <00:39:15.730>uh, <00:39:15.905>special, <00:39:16.080>uh, <00:39:16.255>keys

767
00:39:18.655 --> 00:39:22.355
<00:39:18.655>or <00:39:18.935>tokens <00:39:19.215>given <00:39:19.495>by <00:39:19.775>authorization <00:39:20.055>system.

768
00:39:22.895 --> 00:39:25.275
<00:39:22.895>Uh, <00:39:23.050>you <00:39:23.206>can <00:39:23.361>put <00:39:23.517>it <00:39:23.672>in <00:39:23.828>the <00:39:23.983>header, <00:39:24.139>for <00:39:24.295>example.

769
00:39:25.775 --> 00:39:29.795
<00:39:25.775>Uh, <00:39:25.930>when <00:39:26.086>you <00:39:26.241>request <00:39:26.397>something <00:39:26.552>from <00:39:26.708>your <00:39:26.863>app, <00:39:27.019>cross <00:39:27.175>origin

770
00:39:29.935 --> 00:39:33.395
<00:39:29.935>to <00:39:30.110>API, <00:39:30.285>so <00:39:30.460>that <00:39:30.634>API <00:39:30.810>can <00:39:30.985>authorize <00:39:31.160>these <00:39:31.335>queries.

771
00:39:33.855 --> 00:39:38.155
<00:39:33.855>So <00:39:34.010>this <00:39:34.166>was <00:39:34.321>the <00:39:34.477>perspective <00:39:34.632>from <00:39:34.788>the, <00:39:34.943>um, <00:39:35.099>origin, <00:39:35.255>uh,

772
00:39:38.215 --> 00:39:40.235
<00:39:38.215>or <00:39:38.565>the <00:39:38.915>deployment, <00:39:39.265>uh, <00:39:39.615>site,

773
00:39:40.575 --> 00:39:42.235
<00:39:40.575>but <00:39:40.924>it's <00:39:41.274>also <00:39:41.625>state <00:39:41.975>perspective.

774
00:39:42.855 --> 00:39:45.435
<00:39:42.855>Do <00:39:43.088>we <00:39:43.321>have <00:39:43.555>stateful <00:39:43.788>or <00:39:44.021>stateless <00:39:44.255>authorization?

775
00:39:45.695 --> 00:39:48.995
<00:39:45.695>So <00:39:45.870>this <00:39:46.045>perspective, <00:39:46.220>um, <00:39:46.395>can, <00:39:46.570>uh, <00:39:46.745>help <00:39:46.920>you <00:39:47.095>decide

776
00:39:49.265 --> 00:39:52.155
<00:39:49.265>what <00:39:49.545>are <00:39:49.825>your <00:39:50.105>non-functional, <00:39:50.384>um, <00:39:50.665>decisions.

777
00:39:52.455 --> 00:39:55.955
<00:39:52.455>So <00:39:52.582>does <00:39:52.709>the <00:39:52.836>state <00:39:52.964>of <00:39:53.091>the <00:39:53.218>user <00:39:53.345>is <00:39:53.473>on <00:39:53.600>the, <00:39:53.727>on <00:39:53.855>the,

778
00:39:55.955 --> 00:39:57.795
<00:39:55.955>on <00:39:56.188>the <00:39:56.421>server, <00:39:56.654>which <00:39:56.888>is <00:39:57.121>a <00:39:57.355>stateful.

779
00:39:57.935 --> 00:40:00.075
<00:39:57.935>And <00:39:58.134>then <00:39:58.335>you <00:39:58.535>just <00:39:58.735>send <00:39:58.935>the <00:39:59.134>session <00:39:59.335>id,

780
00:40:00.635 --> 00:40:02.995
<00:40:00.635>I <00:40:00.790>don't <00:40:00.946>care <00:40:01.101>about <00:40:01.257>mechanism, <00:40:01.412>I <00:40:01.568>just <00:40:01.723>want <00:40:01.879>to <00:40:02.035>say

781
00:40:02.995 --> 00:40:04.795
<00:40:02.995>that <00:40:03.134>the <00:40:03.275>only <00:40:03.415>thing <00:40:03.555>that <00:40:03.694>is <00:40:03.835>needed <00:40:03.975>is <00:40:04.115>a <00:40:04.255>session <00:40:04.395>ID

782
00:40:04.795 --> 00:40:06.715
<00:40:04.795>because <00:40:05.028>server <00:40:05.261>can <00:40:05.495>find <00:40:05.728>the <00:40:05.961>session <00:40:06.195>id.

783
00:40:06.815 --> 00:40:09.995
<00:40:06.815>We <00:40:06.931>have <00:40:07.048>one <00:40:07.165>minute <00:40:07.281>left <00:40:07.398>and <00:40:07.515>I <00:40:07.631>have <00:40:07.748>four <00:40:07.865>or <00:40:07.981>five <00:40:08.098>slides <00:40:08.215>more.

784
00:40:10.775 --> 00:40:13.515
<00:40:10.775>Uh, <00:40:10.975>or <00:40:11.175>you <00:40:11.375>can <00:40:11.575>have <00:40:11.775>a <00:40:11.975>contained <00:40:12.175>session

785
00:40:13.615 --> 00:40:14.795
<00:40:13.615>inside <00:40:13.969>of <00:40:14.323>this <00:40:14.677>token.

786
00:40:14.795 --> 00:40:17.555
<00:40:14.795>This <00:40:14.950>user <00:40:15.106>state <00:40:15.261>is <00:40:15.417>actually <00:40:15.572>living <00:40:15.728>inside <00:40:15.883>of <00:40:16.039>the <00:40:16.195>token,

787
00:40:17.555 --> 00:40:19.875
<00:40:17.555>moving <00:40:17.754>around <00:40:17.955>between <00:40:18.154>front <00:40:18.355>end <00:40:18.555>and <00:40:18.754>the <00:40:18.955>client.

788
00:40:20.175 --> 00:40:21.875
<00:40:20.175>So <00:40:20.455>this <00:40:20.735>is <00:40:21.015>the <00:40:21.295>state <00:40:21.575>perspective,

789
00:40:23.415 --> 00:40:26.155
<00:40:23.415>and <00:40:23.765>those <00:40:24.115>different <00:40:24.465>architectures <00:40:24.815>have

790
00:40:26.225 --> 00:40:28.035
<00:40:26.225>different <00:40:26.691>pros <00:40:27.158>and <00:40:27.625>cons.

791
00:40:28.295 --> 00:40:31.275
<00:40:28.295>And <00:40:28.450>usually <00:40:28.606>you <00:40:28.761>end <00:40:28.917>up <00:40:29.072>as <00:40:29.228>a <00:40:29.383>tradeoff, <00:40:29.539>you <00:40:29.695>know,

792
00:40:31.465 --> 00:40:34.355
<00:40:31.465>between <00:40:31.931>security <00:40:32.398>business <00:40:32.865>requirements,

793
00:40:34.745 --> 00:40:38.955
<00:40:34.745>technical <00:40:35.095>feasibility, <00:40:35.444>uh, <00:40:35.795>u <00:40:36.145>usability

794
00:40:39.145 --> 00:40:42.955
<00:40:39.145>because <00:40:39.345>those <00:40:39.545>architectures <00:40:39.745>differ, <00:40:39.945>um, <00:40:40.145>in <00:40:40.345>those <00:40:40.545>areas.

795
00:40:43.135 --> 00:40:46.785
<00:40:43.135>So <00:40:43.310>usually <00:40:43.485>you <00:40:43.660>end <00:40:43.835>up <00:40:44.010>with <00:40:44.185>the <00:40:44.360>tradeoff, <00:40:44.535>uh,

796
00:40:47.005 --> 00:40:48.665
<00:40:47.005>secure <00:40:47.355>role <00:40:47.705>based, <00:40:48.055>permission <00:40:48.405>based

797
00:40:48.665 --> 00:40:50.105
<00:40:48.665>authorization <00:40:49.961>implementation.

798
00:40:50.865 --> 00:40:54.645
<00:40:50.865>Hmm, <00:40:51.004>I <00:40:51.145>think <00:40:51.285>we <00:40:51.424>have <00:40:51.564>just <00:40:51.705>covered <00:40:51.845>this <00:40:51.984>in <00:40:52.125>the <00:40:52.265>presentation.

799
00:40:54.645 --> 00:40:57.525
<00:40:54.645>So <00:40:54.785>this <00:40:54.925>is <00:40:55.065>the <00:40:55.205>step <00:40:55.345>four, <00:40:55.485>which <00:40:55.625>we <00:40:55.765>briefly, <00:40:55.905>uh, <00:40:56.045>covered.

800
00:40:58.835 --> 00:41:01.365
<00:40:58.835>Step <00:40:59.115>five, <00:40:59.395>additional <00:40:59.675>layers <00:40:59.955>of <00:41:00.235>security,

801
00:41:01.905 --> 00:41:04.765
<00:41:01.905>two <00:41:02.255>factor <00:41:02.605>authentication, <00:41:02.955>logging, <00:41:03.305>throttling

802
00:41:04.825 --> 00:41:08.605
<00:41:04.825>to <00:41:05.024>prevent <00:41:05.225>brute <00:41:05.424>force <00:41:05.625>attacks, <00:41:05.825>credential, <00:41:06.024>staffing, <00:41:06.225>uh,

803
00:41:08.705 --> 00:41:12.485
<00:41:08.705>or <00:41:08.985>different <00:41:09.265>automated <00:41:09.545>ways, <00:41:09.825>additional <00:41:10.105>sanitization

804
00:41:12.485 --> 00:41:14.845
<00:41:12.485>and <00:41:12.685>validation, <00:41:12.885>uh, <00:41:13.085>in <00:41:13.285>the, <00:41:13.485>of <00:41:13.685>the <00:41:13.885>input.

805
00:41:16.515 --> 00:41:18.565
<00:41:16.515>Okay, <00:41:16.748>we're <00:41:16.981>over <00:41:17.214>time. <00:41:17.448>Two <00:41:17.681>last <00:41:17.915>slides.

806
00:41:19.345 --> 00:41:21.405
<00:41:19.345>Uh, <00:41:19.694>different <00:41:20.044>levels <00:41:20.395>of <00:41:20.745>logging.

807
00:41:21.465 --> 00:41:23.005
<00:41:21.465>You <00:41:21.742>wanna <00:41:22.019>know <00:41:22.296>what <00:41:22.573>happens <00:41:22.851>inside.

808
00:41:23.005 --> 00:41:25.165
<00:41:23.005>You <00:41:23.238>want <00:41:23.471>your <00:41:23.705>application <00:41:23.938>to <00:41:24.171>be <00:41:24.405>accountable.

809
00:41:25.665 --> 00:41:28.245
<00:41:25.665>You, <00:41:25.865>you <00:41:26.065>may, <00:41:26.265>you <00:41:26.465>may <00:41:26.665>log <00:41:26.865>access <00:41:27.065>level.

810
00:41:28.465 --> 00:41:32.205
<00:41:28.465>So <00:41:28.605>on <00:41:28.745>the <00:41:28.885>HTTP <00:41:29.025>level, <00:41:29.165>you, <00:41:29.305>you <00:41:29.445>want <00:41:29.585>to <00:41:29.725>know <00:41:29.865>U-R-L-A-P-I,

811
00:41:32.295 --> 00:41:34.445
<00:41:32.295>everything <00:41:32.575>that <00:41:32.855>goes <00:41:33.135>into <00:41:33.415>the <00:41:33.695>system.

812
00:41:34.665 --> 00:41:37.165
<00:41:34.665>And <00:41:34.898>application <00:41:35.131>events, <00:41:35.365>login, <00:41:35.598>you <00:41:35.831>want <00:41:36.065>one.

813
00:41:37.165 --> 00:41:40.005
<00:41:37.165>Once <00:41:37.320>we <00:41:37.476>know <00:41:37.631>who <00:41:37.787>we <00:41:37.942>are <00:41:38.098>from <00:41:38.253>the <00:41:38.409>application <00:41:38.565>perspective,

814
00:41:40.385 --> 00:41:43.525
<00:41:40.385>we <00:41:40.560>know <00:41:40.735>you, <00:41:40.910>you <00:41:41.085>wanna <00:41:41.260>log <00:41:41.435>every <00:41:41.610>meaningful <00:41:41.785>operation,

815
00:41:43.525 --> 00:41:47.005
<00:41:43.525>like <00:41:43.758>transaction, <00:41:43.991>money, <00:41:44.225>transfer, <00:41:44.458>login, <00:41:44.691>logout, <00:41:44.925>um,

816
00:41:47.005 --> 00:41:48.805
<00:41:47.005>because <00:41:47.355>you <00:41:47.705>know <00:41:48.055>who, <00:41:48.405>when

817
00:41:48.865 --> 00:41:53.765
<00:41:48.865>and <00:41:49.004>what <00:41:49.145>did <00:41:49.285>in <00:41:49.424>the <00:41:49.564>system <00:41:49.705>the <00:41:49.845>last, <00:41:49.984>you <00:41:50.125>wanna <00:41:50.265>test

818
00:41:54.755 --> 00:41:57.565
<00:41:54.755>what <00:41:54.895>you <00:41:55.035>have <00:41:55.175>done <00:41:55.315>with <00:41:55.455>some <00:41:55.595>tools <00:41:55.735>that <00:41:55.875>can <00:41:56.015>help <00:41:56.155>you

819
00:41:57.565 --> 00:41:59.205
<00:41:57.565>to <00:41:57.798>test <00:41:58.031>the <00:41:58.265>security <00:41:58.498>of <00:41:58.731>your <00:41:58.965>application.

820
00:41:59.545 --> 00:42:02.965
<00:41:59.545>For <00:41:59.720>example, <00:41:59.895>burp <00:42:00.070>suit <00:42:00.245>that, <00:42:00.420>uh, <00:42:00.595>is <00:42:00.770>in <00:42:00.945>suit

821
00:42:03.705 --> 00:42:05.845
<00:42:03.705>to <00:42:03.938>try <00:42:04.171>to <00:42:04.404>break <00:42:04.638>into <00:42:04.871>the <00:42:05.105>application

822
00:42:05.865 --> 00:42:07.325
<00:42:05.865>and <00:42:06.303>perform <00:42:06.741>some <00:42:07.178>audits.

823
00:42:07.545 --> 00:42:08.605
<00:42:07.545>And <00:42:07.735>this <00:42:07.926>is <00:42:08.117>the <00:42:08.308>last <00:42:08.499>step.

824
00:42:09.465 --> 00:42:12.125
<00:42:09.465>And <00:42:09.640>finally, <00:42:09.815>if <00:42:09.990>you <00:42:10.165>want <00:42:10.340>to <00:42:10.515>master <00:42:10.690>these <00:42:10.865>skills,

825
00:42:12.505 --> 00:42:16.445
<00:42:12.505>you <00:42:12.645>can <00:42:12.785>sign <00:42:12.925>up <00:42:13.065>to <00:42:13.205>our <00:42:13.345>bootcamp <00:42:13.485>web <00:42:13.625>security <00:42:13.765>academy <00:42:13.905>under

826
00:42:16.555 --> 00:42:17.565
<00:42:16.555>this <00:42:17.464>URLs.

827
00:42:17.795 --> 00:42:20.045
<00:42:17.795>It's <00:42:17.970>a <00:42:18.145>12 <00:42:18.320>week <00:42:18.495>intensive <00:42:18.670>bootcamp <00:42:18.845>when <00:42:19.020>we <00:42:19.195>together

828
00:42:20.235 --> 00:42:24.405
<00:42:20.235>with <00:42:20.410>the <00:42:20.585>group <00:42:20.760>master <00:42:20.935>this <00:42:21.110>skills, <00:42:21.285>um, <00:42:21.460>very, <00:42:21.635>very,

829
00:42:24.595 --> 00:42:28.445
<00:42:24.595>very <00:42:24.944>hard <00:42:25.294>and <00:42:25.645>47 <00:42:25.995>minutes.

830
00:42:28.805 --> 00:42:30.765
<00:42:28.805>I <00:42:28.944>was <00:42:29.085>trying <00:42:29.225>to <00:42:29.365>be <00:42:29.504>on <00:42:29.645>time. <00:42:29.785>Thank <00:42:29.924>you <00:42:30.065>very <00:42:30.205>much.

831
00:42:31.105 --> 00:42:35.525
<00:42:31.105>Uh, <00:42:31.260>I <00:42:31.416>will <00:42:31.571>answer <00:42:31.727>all <00:42:31.882>your <00:42:32.038>questions <00:42:32.193>after <00:42:32.349>the <00:42:32.505>presentation.

832
00:42:37.215 --> 00:42:38.405
<00:42:37.215>Thank <00:42:37.482>you <00:42:37.750>very <00:42:38.018>much, <00:42:38.286>Barash.

833
00:42:38.595 --> 00:42:42.285
<00:42:38.595>Very <00:42:38.828>informative, <00:42:39.061>very <00:42:39.294>hands-on <00:42:39.528>session, <00:42:39.761>lots <00:42:39.995>of,

834
00:42:42.425 --> 00:42:43.565
<00:42:42.425>uh, <00:42:42.938>content <00:42:43.451>packed.

835
00:42:43.585 --> 00:42:47.245
<00:42:43.585>And, <00:42:43.818>uh, <00:42:44.051>less <00:42:44.285>than <00:42:44.518>45 <00:42:44.751>minutes <00:42:44.985>actually,

836
00:42:47.245 --> 00:42:50.645
<00:42:47.245>because <00:42:47.372>I, <00:42:47.499>I <00:42:47.626>stole <00:42:47.754>a <00:42:47.881>few <00:42:48.008>minutes, <00:42:48.135>uh, <00:42:48.263>from <00:42:48.390>your <00:42:48.517>time, <00:42:48.645>uh,

837
00:42:51.825 --> 00:42:53.325
<00:42:51.825>uh, <00:42:52.500>the <00:42:53.174>introduction.

838
00:42:53.745 --> 00:42:55.085
<00:42:53.745>Yes. <00:42:54.147>Uh, <00:42:54.549>so, <00:42:54.951>um,

839
00:42:55.185 --> 00:42:58.445
<00:42:55.185>and <00:42:55.360>this <00:42:55.535>topic <00:42:55.710>resonates <00:42:55.884>very <00:42:56.060>well <00:42:56.235>with <00:42:56.410>our <00:42:56.585>attends.

840
00:42:58.445 --> 00:43:00.165
<00:42:58.445>There <00:42:58.678>are <00:42:58.911>plenty <00:42:59.145>of <00:42:59.378>questions <00:42:59.611>in <00:42:59.845>q

841
00:43:00.165 --> 00:43:01.965
<00:43:00.165>and <00:43:00.320>a, <00:43:00.476>so <00:43:00.631>I <00:43:00.787>just <00:43:00.942>kindly <00:43:01.098>ask <00:43:01.253>you <00:43:01.409>to <00:43:01.565>go

842
00:43:02.065 --> 00:43:03.485
<00:43:02.065>and, <00:43:02.384>um, <00:43:02.704>and <00:43:03.023>answer <00:43:03.343>them.

843
00:43:04.465 --> 00:43:06.525
<00:43:04.465>And <00:43:04.640>on <00:43:04.815>that. <00:43:04.990>Thank <00:43:05.165>you <00:43:05.340>much. <00:43:05.515>It <00:43:05.690>was <00:43:05.865>great.