-
Notifications
You must be signed in to change notification settings - Fork 22
/
policy_parser.xul
207 lines (162 loc) · 7.03 KB
/
policy_parser.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type"text/css" ?>
<?xml-stylesheet href="chrome://browser/skin/browser.css" type="text/css" ?>
<!DOCTYPE page SYSTEM "chrome://tabulator/locale/en-US/tabulatorsidebar.dtd">
<page id="sbPolicy Parser" title="&policysidebar.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="test()">
<script type="application/x-javascript" src="js/util.js"/>
<script type="application/x-javascript" src="js/uri.js"/>
<script type="application/x-javascript" src="js/rdf/rdfparser.js"/>
<script type="application/x-javascript" src="js/rdf/term.js"/>
<script type="application/x-javascript" src="js/rdf/identity.js"/>
<script type="application/x-javascript" src="js/webdav.js"/>
<script type="application/x-javascript" src="test.js"/>
<script src="js/policy_parser/acl_editor.js" type="text/javascript"></script>
<script src="js/policy_parser/webdav.js" type="text/javascript"></script>
<script src="js/policy_parser/reasoner.js" type="text/javascript"></script>
<script src="js/policy_parser/policy_parser.js" type="text/javascript"></script>
<tabbox id="tablist">
<tabs>
<tab label="Access Control Policy Editor"/>
<tab label="AIR Policy Editor"/>
</tabs>
<tabpanels>
<tabpanel id="aclTab">
<vbox flex="1">
<description>
Sharing and Permissions
</description>
<groupbox orient="vertical">
<spacer flex="1"/>
<grid class="grid_outline">
<columns>
<column flex="4">
<label value="Resource"/>
</column>
<column flex="2">
<label value="Person"/>
</column>
<column flex="1">
<label value="Privilege"/>
</column>
<column flex="1"/>
</columns>
<rows id="add_rows">
<row align="center">
<spacer flex="2"/>
</row>
</rows>
</grid>
<spacer flex="2"/>
<box orient="horizontal">
<spacer flex="1"/>
<button flex="1" label="Change ACL" onclick="set()"/>
<spacer flex="1"/>
<button flex="1" label="Reset" onclick="reset()"/>
<spacer flex="1"/>
</box>
</groupbox>
</vbox>
</tabpanel>
<tabpanel id="NLTab">
<vbox flex="1">
<spacer style="height: 10px"/>
<groupbox orient="vertical">
<vbox flex="1">
<box>
<label value="Policy Name:"/>
<textbox id="name" type="autocomplete" autocompletesearch="history"/>
</box>
<spacer style="height: 10px"/>
<box>
<label value="Domain:"/>
<menulist id="domain">
<menupopup>
<menuitem label="University (MIT)" value="http://people.csail.mit.edu/oshani/ontologies/university.n3"/>
<menuitem label="State (MA)" value="http://people.csail.mit.edu/oshani/ontologies/state.n3"/>
<menuitem label="Federal (USA)" value="http://people.csail.mit.edu/oshani/ontologies/federal.n3"/>
</menupopup>
</menulist>
<button label="View" oncommand="viewOnt()"/>
</box>
</vbox>
<spacer style="height: 10px"/>
<vbox flex="1">
<label value="Sentence:"/>
<hbox>
<radiogroup id="sentence_pref" onclick="predefined()" >
<hbox>
<radio id="select" value="0" label="Select from pre-defined" accesskey="S" selected="true"/>
<menulist id="sentence_menu" onmousedown="show()">
<menupopup>
<menuitem label="University Example 1" value="MIT can use prox card data for criminal investigation"/>
<menuitem label="University Example 2" value="MIT may use prox card data for criminal investigation"/>
<menuitem label="University Example 3" value="MIT can give records to FBI to investigate crimes"/>
<menuitem label="University Example 4" value="MIT can give FBI records for criminal investigations"/>
<menuitem label="University Example 5" value="MIT students can not transfer prox cards to another student"/>
<menuitem label="University Example 6" value="A person may access data on the private mit domain if the person has permission for that data"/>
<menuitem label="Federal Example 1" value="Police may search people's homes if police have people's permission"/>
<menuitem label="Federal Example 2" value="TSA can transfer data to the fbi if the data is associated with terrorism"/>
<menuitem label="Federal Example 3" value="A service provider may not use phone records to deny service to a customer"/>
<menuitem label="State Example 1" value="Anyone can access data in the possession of the state of Massachusetts"/>
</menupopup>
</menulist>
</hbox>
<radio id="write" value="1" label="Write your own" accesskey="W" />
</radiogroup>
</hbox>
<textbox multiline="true" id="sentence_text" disabled="true"/>
</vbox>
<spacer style="height: 10px"/>
<hbox>
<spacer flex="1"/>
<button label="Parse" oncommand="run()"/>
<spacer flex="1"/>
</hbox>
</groupbox>
<vbox id="progressBox"></vbox>
<groupbox orient="vertical">
<label value="Store the generated policy here:"/>
<textbox id="store_location" type="autocomplete" autocompletesearch="history" value="http://dig.csail.mit.edu/2008/webdav/policy.n3"/>
<hbox>
<spacer flex="1"/>
<button label="Store Policy" oncommand="store()"/>
<spacer flex="1"/>
<button label="View Policy" oncommand="view()"/>
<spacer flex="1"/>
</hbox>
</groupbox>
<spacer style="height: 10px"/>
<groupbox orient="vertical">
<spacer style="height: 10px"/>
<description>
Demo with the AIR reasoner:
</description>
<groupbox orient="vertical">
<label value="Select the log file:"/>
<hbox>
<menulist id="log">
<menupopup>
<menuitem label="University (MIT) log" value="http://people.csail.mit.edu/oshani/ontologies/MIT_log.n3"/>
<menuitem label="State (MA) log" value="http://people.csail.mit.edu/oshani/ontologies/MA_log.n3"/>
<menuitem label="Federal (USA) log" value="http://people.csail.mit.edu/oshani/ontologies/USA_log.n3"/>
</menupopup>
</menulist>
<spacer flex="1"/>
<button label="Fetch Log" oncommand="fetchLog()"/>
<spacer flex="1"/>
<button label="View Log" oncommand="viewLog()"/>
</hbox>
</groupbox>
<spacer style="height: 10px"/>
<hbox>
<spacer flex="1"/>
<button label="Run Reasoner" oncommand="reasoner()"/>
<spacer flex="1"/>
</hbox>
</groupbox>
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
</page>